Test files › Source code

Sample Source code test files

What are source code test files?

Source files used to test syntax highlighters, code upload, diff tools and how servers label code. They include the cases that trip tools up, such as mixed tabs and spaces, and a .ts file, an extension some servers wrongly serve as MPEG video.

MIME types

4 free source code test files for QA and developers: mixed-indentation.py, sample.py, sample.ts, schema.sql. Each with a published SHA-256.

FileFormatSizeWhat it catches
mixed-indentation.pyPython146 bytesPython that mixes tab and space indentation inside one block, which the interpreter rejects.
sample.pyPython693 bytesA Python module with type hints, a dataclass, a generator, f-strings and a triple-quoted docstring.
sample.tsTypeScript774 bytesA TypeScript module using generics, a discriminated union, enums, decorators and JSX-free type syntax.
schema.sqlSQL1.0 KBA DDL and DML script with constraints, an index, a view, a transaction and dollar-free string literals.

← All test files