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.
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.
| File | Format | Size | What it catches |
mixed-indentation.py | Python | 146 bytes | Python that mixes tab and space indentation inside one block, which the interpreter rejects. |
sample.py | Python | 693 bytes | A Python module with type hints, a dataclass, a generator, f-strings and a triple-quoted docstring. |
sample.ts | TypeScript | 774 bytes | A TypeScript module using generics, a discriminated union, enums, decorators and JSX-free type syntax. |
schema.sql | SQL | 1.0 KB | A DDL and DML script with constraints, an index, a view, a transaction and dollar-free string literals. |