Skip to content
Novus Examples

Source files for parsers and linters

Short, known-correct source files in many languages with classes, functions, generics, enums, and error handling — for testing parsers, linters, formatters, language detection, and diff viewers.

229 of 229 files
Preview of Python — Hello World
py
168 B
Actual file preview for Python — Hello World

Python — Hello World

The classic hello-world in idiomatic Python 3, with a shebang, a module docstring, and the standard main guard — the minimal correct program for testing highlighters and interpreters.

File
PY · Python
Preview of TypeScript — Hello World
mts
144 B
Actual file preview for TypeScript — Hello World

TypeScript — Hello World

The classic hello-world in TypeScript (shipped as .mts to avoid the MPEG-TS .ts collision) — a typed function for testing TypeScript-aware highlighters and the tsc compiler.

File
MTS · TypeScript
Preview of TypeScript — Shapes (union, generics, enum)
mts
1.1 KB
Actual file preview for TypeScript — Shapes (union, generics, enum)

TypeScript — Shapes (union, generics, enum)

A realistic TypeScript snippet with an enum, a discriminated union, generics, exhaustive switch handling, and a typed reduce — for testing the type checker, highlighters, and the TS ESLint parser.

File
MTS · TypeScript
Preview of HTML — Hello World
html
220 B
Actual file preview for HTML — Hello World

HTML — Hello World

A minimal, valid HTML5 document — doctype, head, and a single heading — for testing HTML parsers, highlighters, and validators against the simplest well-formed page.

File
HTML · HTML
Preview of HTML — Semantic article page
html
1 KB
Actual file preview for HTML — Semantic article page

HTML — Semantic article page

A realistic semantic HTML page with landmark elements (header, nav, main, article, footer), a figure with alt text and caption, and lists — for testing HTML parsers, accessibility tooling, and highlighters.

File
HTML · HTML
Preview of CSS — Hello World
css
205 B
Actual file preview for CSS — Hello World

CSS — Hello World

A minimal stylesheet that centres a heading with grid — the simplest useful CSS file for testing highlighters, CSS parsers, and minifiers.

File
CSS · Css
Preview of Java — Hello World
java
163 B
Actual file preview for Java — Hello World

Java — Hello World

The classic hello-world in Java — a public class with the standard main method — for testing highlighters, javac, and Java parsers.

File
JAVA · Java
Preview of C — Hello World
c
123 B
Actual file preview for C — Hello World

C — Hello World

The classic hello-world in C — an include, main, and printf — for testing highlighters, C compilers, and parsers against the canonical first program.

File
C · C
Preview of C++ — Series (class template, STL)
cpp
924 B
Actual file preview for C++ — Series (class template, STL)

C++ — Series (class template, STL)

A realistic C++ snippet with a class template, STL algorithms (max_element, accumulate), std::move, and range handling — for testing highlighters, g++/clang++, and parsers against real templates.

File
CPP · C++
Preview of Go — Hello World
go
111 B
Actual file preview for Go — Hello World

Go — Hello World

The classic hello-world in Go — package main, an import, and fmt.Println, tab-indented like gofmt — for testing highlighters, the Go compiler, and parsers.

File
GO · Go
Preview of Rust — Shapes (enum, trait, pattern matching)
rs
942 B
Actual file preview for Rust — Shapes (enum, trait, pattern matching)

Rust — Shapes (enum, trait, pattern matching)

A realistic Rust snippet with an enum carrying data, a trait and impl, exhaustive match, iterators, and Option handling — for testing highlighters, rustc, clippy, and parsers against real ownership-era code.

File
RS · Rust
Preview of PHP — Invoice (enum, class, promoted properties)
php
1.1 KB
Actual file preview for PHP — Invoice (enum, class, promoted properties)

PHP — Invoice (enum, class, promoted properties)

A realistic modern-PHP snippet with strict types, a namespace, a backed enum, a final class with constructor-promoted readonly properties, and array_reduce with an arrow function — for testing highlighters, PHPStan, and parsers.

File
PHP · PHP
Preview of Shell — Hello World
sh
79 B
Actual file preview for Shell — Hello World

Shell — Hello World

The classic hello-world in Bash — a shebang and echo, with LF line endings so it runs on Unix — for testing highlighters, ShellCheck, and shell parsers.

File
SH · Shell
Preview of Shell — Backup script (strict mode, functions)
sh
706 B
Actual file preview for Shell — Backup script (strict mode, functions)

Shell — Backup script (strict mode, functions)

A realistic Bash script using strict mode (set -euo pipefail), functions, default parameters, a loop, and conditionals — an illustrative fixture (review before running) for testing highlighters, ShellCheck, and shfmt.

File
SH · Shell
Preview of SQL — Hello World
sql
72 B
Actual file preview for SQL — Hello World

SQL — Hello World

The classic first query in SQL — a single SELECT of a literal — for testing highlighters, SQL parsers, and query editors.

File
SQL · Sql
Preview of SQL — Library schema (DDL, view, join)
sql
994 B
Actual file preview for SQL — Library schema (DDL, view, join)

SQL — Library schema (DDL, view, join)

A realistic SQL script with CREATE TABLE constraints and foreign keys, INSERT seed data, a CREATE VIEW, and a grouped aggregate query with a join — for testing SQL parsers, formatters, and highlighters.

File
SQL · Sql
Preview of Swift — Task list (struct, protocol, optionals)
swift
1013 B
Actual file preview for Swift — Task list (struct, protocol, optionals)

Swift — Task list (struct, protocol, optionals)

A realistic Swift snippet with an enum, a protocol, a struct with a computed property, optionals and optional binding, and higher-order functions — for testing highlighters, the Swift compiler, SwiftLint, and parsers.

File
SWIFT · Swift
Preview of Minified JS bundle referencing an external source map
js
118 B
Actual file preview for Minified JS bundle referencing an external source map

Minified JS bundle referencing an external source map

A one-line minified bundle built from two ES modules, ending in the `//# sourceMappingURL=` comment that points at the v3 map shipped beside it. For testing that a debugger, error reporter or bundler analyser follows the annotation and resolves the map relative to the bundle.

File
JS · Build Output
Use case
Web assetsCode parsing+1· Paired fixture
Preview of Source map v3 (external, with sourcesContent)
json
390 B
Actual file preview for Source map v3 (external, with sourcesContent)

Source map v3 (external, with sourcesContent)

A complete v3 source map for the minified bundle: two sources with their full original text inlined in sourcesContent, two names, and five VLQ-encoded mapping segments. For testing source-map decoders and stack-trace symbolication without any network fetch of the originals.

File
JSON · Build Output
Use case
Web assetsCode parsing+1· Paired fixture
Preview of Source map v3 with sourcesContent omitted
json
214 B
Actual file preview for Source map v3 with sourcesContent omitted

Source map v3 with sourcesContent omitted

The same v3 map with the sourcesContent array removed, which is how most production builds ship: the mappings resolve but the original text has to be fetched from the paths in `sources`. For testing the fallback path of a debugger when originals are unavailable.

File
JSON · Build Output
Use case
Web assetsCode parsing+1· Conversion set
Preview of Minified JS bundle with an inline base64 source map
js
579 B
Actual file preview for Minified JS bundle with an inline base64 source map

Minified JS bundle with an inline base64 source map

The same bundle with its v3 map embedded as a base64 data: URI in the sourceMappingURL comment - the single-file form dev builds emit. For testing that a tool decodes an inline map instead of trying to fetch it as a relative path.

File
JS · Build Output · base64
Use case
Web assetsCode parsing+1· Conversion set
Preview of Source map index map (sections with offsets)
json
1 KB
Actual file preview for Source map index map (sections with offsets)

Source map index map (sections with offsets)

An index map: instead of a top-level `mappings` string it carries a `sections` array of offset-and-map pairs, the form used when several independently built chunks are concatenated. For testing decoders that assume every map has mappings at the root.

File
JSON · Build Output
Use case
Web assetsCode parsing+1· Conversion set
Preview of Minified CSS with an external source map
css
86 B
Actual file preview for Minified CSS with an external source map

Minified CSS with an external source map

A minified stylesheet closing with the CSS form of the annotation, `/*# sourceMappingURL= */` - the comment syntax differs from JavaScript's and is a common reason a CSS map is silently ignored. For testing stylesheet source-map resolution.

File
CSS · Build Output
Use case
Web assetsCode parsing+1· Paired fixture
Preview of Source map v3 for a stylesheet
json
222 B
Actual file preview for Source map v3 for a stylesheet

Source map v3 for a stylesheet

The v3 map for the minified stylesheet: one source with its text inlined, an empty names array, and three segments covering the selector and both declarations. For testing that a decoder handles maps with no names at all.

File
JSON · Build Output
Use case
Web assetsCode parsing+1· Paired fixture
Preview of Source map with sourceRoot, relative sources and an ignore list
json
378 B
Actual file preview for Source map with sourceRoot, relative sources and an ignore list

Source map with sourceRoot, relative sources and an ignore list

A v3 map that resolves its sources through a `sourceRoot` scheme URL, uses `../` relative paths, leaves one sourcesContent entry null, and marks the second source as third-party via x_google_ignoreList. For testing URL joining and ignore-list support in a debugger.

File
JSON · Build Output
Use case
Web assetsCode parsing+1· Conversion set
Preview of JUnit XML — Aggregate <testsuites> Root
xml
2.3 KB
Actual file preview for JUnit XML — Aggregate <testsuites> Root

JUnit XML — Aggregate <testsuites> Root

Three suites under a <testsuites> root whose own attributes already hold the aggregate totals. A parser that sums the children and also trusts the root double-counts every case, which is the classic cause of a dashboard reporting 24 tests for a 12-test run.

File
XML · Junit XML · UTF-8
Use case
Error handlingConversion testing+1· Conversion set
Preview of JUnit XML — Bare <testsuite> Root (No Wrapper)
xml
897 B
Actual file preview for JUnit XML — Bare <testsuite> Root (No Wrapper)

JUnit XML — Bare <testsuite> Root (No Wrapper)

The single-suite form Gradle and Ant write: the root element is <testsuite> with no <testsuites> wrapper at all. Parsers hardcoded to descend from <testsuites> read this file as empty rather than failing, so it silently reports a run of zero tests.

File
XML · Junit XML · UTF-8
Use case
Error handlingConversion testing+1· Conversion set
Preview of JUnit XML — No Time Attributes
xml
421 B
Actual file preview for JUnit XML — No Time Attributes

JUnit XML — No Time Attributes

A report from a runner that never records durations: neither the suite nor any case carries a time attribute. Dashboards that parse time unconditionally throw here, and ones that default it to zero quietly report a suite that took no time at all.

File
XML · Junit XML · UTF-8
Use case
Error handlingConversion testing+1· Conversion set
Preview of JUnit XML — Same Test Reported Twice
xml
814 B
Actual file preview for JUnit XML — Same Test Reported Twice

JUnit XML — Same Test Reported Twice

The same classname and name appear twice with different outcomes — what a parameterised runner or a merged report can produce. Any store keyed on classname+name overwrites the first result and reports the suite as green or red depending purely on document order.

File
XML · Junit XML · UTF-8
Use case
Error handlingConversion testing+1· Conversion set
Preview of JUnit XML — File and Line Attributes
xml
1.3 KB
Actual file preview for JUnit XML — File and Line Attributes

JUnit XML — File and Line Attributes

Cases annotated with the source file and line they were declared on, as pytest and several JS runners emit. This is what a code-review annotation bot needs to place a failure comment on the right line of the right file.

File
XML · Junit XML · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Coverage — LCOV Tracefile with BRDA Branch Records
lcov
2.7 KB
Actual file preview for Coverage — LCOV Tracefile with BRDA Branch Records

Coverage — LCOV Tracefile with BRDA Branch Records

The reference LCOV tracefile: one record per source file with FN/FNDA function records, real BRDA branch records (block, branch and taken count, with '-' for a branch never reached) and DA line hits, closed by the LF/LH, FNF/FNH and BRF/BRH counters. Every file in this group describes the same four-file source tree and reports 127/140 lines, 17/24 branch outcomes and 18/20 functions, so a converter can be diffed against a known answer.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Cobertura XML
xml
12.9 KB
Actual file preview for Coverage — Cobertura XML

Coverage — Cobertura XML

The Cobertura serialisation of the same run, with packages, classes, per-method line rates and condition-coverage attributes on every branching line. Cobertura expresses coverage as rates rather than counts, so this is the file that catches converters rounding a percentage into a hit count. Every file in this group describes the same four-file source tree and reports 127/140 lines, 17/24 branch outcomes and 18/20 functions, so a converter can be diffed against a known answer.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — JaCoCo XML
xml
16 KB
Actual file preview for Coverage — JaCoCo XML

Coverage — JaCoCo XML

The JaCoCo serialisation, which reports missed/covered pairs rather than found/hit and adds INSTRUCTION and COMPLEXITY counters no other format carries. Converters routinely swap missed for covered here, which inverts the whole report. Every file in this group describes the same four-file source tree and reports 127/140 lines, 17/24 branch outcomes and 18/20 functions, so a converter can be diffed against a known answer.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Clover XML
xml
9.4 KB
Actual file preview for Coverage — Clover XML

Coverage — Clover XML

The Clover serialisation, whose <metrics> element rolls statements, conditionals and methods into a single elements/coveredelements pair. Anything reading only that pair reports a blended percentage that matches none of the other three formats unless the components are separated first. Every file in this group describes the same four-file source tree and reports 127/140 lines, 17/24 branch outcomes and 18/20 functions, so a converter can be diffed against a known answer.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Istanbul coverage-final.json
json
43.8 KB
Actual file preview for Coverage — Istanbul coverage-final.json

Coverage — Istanbul coverage-final.json

The raw Istanbul document nyc and Jest write before any reporter runs: statementMap, fnMap and branchMap giving source locations, with the s, f and b objects holding the hit counts. Branch counts here are arrays per branch point, which is why converting to LCOV doubles the branch total if the array is not flattened. Every file in this group describes the same four-file source tree and reports 127/140 lines, 17/24 branch outcomes and 18/20 functions, so a converter can be diffed against a known answer.

File
JSON · Coverage
Use case
JSON parsingConversion testing+1· Conversion set
Preview of Coverage — LCOV Without Branch Records
lcov
2.3 KB
Actual file preview for Coverage — LCOV Without Branch Records

Coverage — LCOV Without Branch Records

The same tracefile with every BRDA, BRF and BRH line removed — what a runner emits when branch instrumentation is off. A gate that reads branch coverage from this file must report it as unavailable, not as 0%, or an unconfigured project looks like a badly tested one.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — LCOV with Function Records Only
lcov
1.1 KB
Actual file preview for Coverage — LCOV with Function Records Only

Coverage — LCOV with Function Records Only

Records containing FN/FNDA/FNF/FNH and nothing else: no DA lines, no LF or LH. Merge tools that assume every record ends with LF/LH either crash here or invent a zero line count for a file that simply was not line-instrumented.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — LCOV with Two Test Runs Over the Same Files
lcov
3 KB
Actual file preview for Coverage — LCOV with Two Test Runs Over the Same Files

Coverage — LCOV with Two Test Runs Over the Same Files

Two TN: blocks — a unit run and an integration run — each carrying a full record for the same two source files. A correct merge sums the DA hit counts per line and recomputes LH; a tool that keeps the last record seen throws away the unit run entirely.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — LCOV at Zero Coverage
lcov
2.6 KB
Actual file preview for Coverage — LCOV at Zero Coverage

Coverage — LCOV at Zero Coverage

Every instrumented line present with a hit count of zero — the shape of a report from a run in which the tests never loaded the instrumented code. It is not an empty file, and conflating the two hides a broken test harness behind a missing-report warning.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — LCOV at 100%
lcov
2.7 KB
Actual file preview for Coverage — LCOV at 100%

Coverage — LCOV at 100%

Every line hit at least once, so LH equals LF exactly. The upper-bound control for a coverage gate, and the case that catches percentage formatting that renders 100% as 100.0% or, worse, rounds 99.95% up to it.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — LCOV with Several TN: Test Names
lcov
2.6 KB
Actual file preview for Coverage — LCOV with Several TN: Test Names

Coverage — LCOV with Several TN: Test Names

Three named test runs in one tracefile, each covering a different part of the tree, reported via the TN: record most tools quietly discard. Keeping the name is what lets a report answer which suite covered a given line.

File
LCOV · Coverage · 4 records
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Cobertura Condition-Coverage Attributes
xml
12.9 KB
Actual file preview for Coverage — Cobertura Condition-Coverage Attributes

Coverage — Cobertura Condition-Coverage Attributes

Cobertura with a condition-coverage attribute on every branching line, written in the "50% (1/2)" form. The percentage and the fraction can disagree in real reports, so a parser should read the fraction and treat the percentage as derived.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Cobertura with One Package per Directory
xml
12.9 KB
Actual file preview for Coverage — Cobertura with One Package per Directory

Coverage — Cobertura with One Package per Directory

The same coverage split into one package per source directory with dotted names, the layout a JVM project produces. Reports that key on class name alone collide as soon as two packages hold a class of the same name, which this file is shaped to expose.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Cobertura at Zero Coverage
xml
12.8 KB
Actual file preview for Coverage — Cobertura at Zero Coverage

Coverage — Cobertura at Zero Coverage

A structurally complete Cobertura report in which line-rate and branch-rate are 0.0 everywhere. The counterpart to the zero-coverage LCOV file, for checking that a converter keeps the class and method structure when there is nothing covered to describe.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Cobertura with Several Source Roots
xml
13.1 KB
Actual file preview for Coverage — Cobertura with Several Source Roots

Coverage — Cobertura with Several Source Roots

Three <source> roots with class filenames given relative to them, which is how Cobertura represents a multi-root project. A viewer must try each root in turn to resolve a file; one that assumes a single root shows "source not found" for most of the report.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — JaCoCo with Every Counter Type
xml
16 KB
Actual file preview for Coverage — JaCoCo with Every Counter Type

Coverage — JaCoCo with Every Counter Type

All six JaCoCo counter types present at every level of the document — method, class, sourcefile, package and report. Tools usually read only the report-level LINE counter; this file is for checking that per-method and per-package rollups agree with it.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — JaCoCo with Several Session Records
xml
16.2 KB
Actual file preview for Coverage — JaCoCo with Several Session Records

Coverage — JaCoCo with Several Session Records

A report merged from three separate JVM sessions, each recorded as its own <sessioninfo> with start and dump timestamps. The counters are already the merged totals, so summing per-session anything from this file is a mistake it exists to catch.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — JaCoCo Multi-Module <group>
xml
16.7 KB
Actual file preview for Coverage — JaCoCo Multi-Module <group>

Coverage — JaCoCo Multi-Module <group>

The aggregate form a multi-module build produces: packages nested inside a <group> rather than directly under <report>. Parsers with a hardcoded report/package path find nothing here and report a module with no coverage at all.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — JaCoCo Method-Level Counters
xml
16 KB
Actual file preview for Coverage — JaCoCo Method-Level Counters

Coverage — JaCoCo Method-Level Counters

Per-method INSTRUCTION, LINE, COMPLEXITY and METHOD counters for all 20 methods, 2 of which were never entered. This is the detail a "which functions are untested" report needs and the level at which most converters stop.

File
XML · Coverage
Use case
Conversion testingCode parsing+1· Conversion set
Preview of Coverage — Gate Boundary at 80.00% (meets the gate exactly)
lcov
1.4 KB
Actual file preview for Coverage — Gate Boundary at 80.00% (meets the gate exactly)

Coverage — Gate Boundary at 80.00% (meets the gate exactly)

A tracefile sitting meets the gate exactly against the 80% minimum in this group's gate config: 112 of 140 lines, 80.00%. 80.00% is exactly the configured minimum, so a > comparison fails the build and a >= comparison passes it — the single most common off-by-one in a coverage gate.

File
LCOV · Coverage · 4 records
Use case
Conversion testingConfig testing+1· Conversion set
Preview of Gherkin — Checkout Feature (Background, Outline, Doc String)
feature
1.4 KB
Actual file preview for Gherkin — Checkout Feature (Background, Outline, Doc String)

Gherkin — Checkout Feature (Background, Outline, Doc String)

The source feature for this whole group: a Background with a data table, a plain scenario, a Scenario Outline expanded by two Examples tables, and a scenario asserting against a doc string. It compiles to exactly six pickles and 32 pickle steps — the numbers the cucumber-messages and cucumber.json twins next to it report.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Gherkin — Background, Feature Tags and Hooks
feature
718 B
Actual file preview for Gherkin — Background, Feature Tags and Hooks

Gherkin — Background, Feature Tags and Hooks

A named Background whose two steps are prepended to all three scenarios, plus feature-level tags that every scenario inherits and scenario-level tags that only some carry. Tag filtering is where this file earns its keep: @slow selects one scenario by its own tag and all three by inheritance from the feature.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Gherkin — Scenario Outline with Two Examples Tables
feature
579 B
Actual file preview for Gherkin — Scenario Outline with Two Examples Tables

Gherkin — Scenario Outline with Two Examples Tables

One outline expanded by two separate Examples tables, the second of which carries its own @edge tag. Expansion must produce five scenarios, and only the two from the tagged table may match a run filtered on @edge — a distinction parsers that flatten the tables lose.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Gherkin — Data Table and Doc String Arguments
feature
607 B
Actual file preview for Gherkin — Data Table and Doc String Arguments

Gherkin — Data Table and Doc String Arguments

A step argument table with a header row, followed by two doc strings — one plain and one carrying a json content type after the opening delimiter. Doc string indentation is relative to the delimiter, so the receipt body must keep its internal column alignment while losing the six leading spaces.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Gherkin — Rule Keyword (Gherkin 6)
feature
722 B
Actual file preview for Gherkin — Rule Keyword (Gherkin 6)

Gherkin — Rule Keyword (Gherkin 6)

Two Rule blocks, the first with its own Background that applies only to the examples inside it. Parsers written before Gherkin 6 either reject Rule outright or, worse, hoist the Background to the whole feature and add a step to the third example that was never there.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Gherkin — French Keywords (# language: fr)
feature
685 B
Actual file preview for Gherkin — French Keywords (# language: fr)

Gherkin — French Keywords (# language: fr)

A feature written entirely in French keywords, declared by the # language: fr header that must be the first line of the file. Parsers that hardcode English keywords read this as a feature with no scenarios rather than reporting an error, so it fails silently.

File
FEATURE · Bdd · fr
Use case
InternationalizationCode parsing+1· Conversion set
Preview of Gherkin — Step Argument and Expression Types
feature
624 B
Actual file preview for Gherkin — Step Argument and Expression Types

Gherkin — Step Argument and Expression Types

Steps exercising every argument shape a step-definition matcher has to handle: quoted strings with escaped inner quotes, integers, decimals, a comma-and-and list, the But keyword, and angle brackets in a plain Scenario where they are literal text rather than outline placeholders.

File
FEATURE · Bdd · UTF-8
Use case
Code parsingConversion testing+1· Conversion set
Preview of Robot Framework — Checkout Suite
robot
1.2 KB
Actual file preview for Robot Framework — Checkout Suite

Robot Framework — Checkout Suite

A complete Robot Framework suite with all four common sections, scalar, list and dictionary variables, a continued line using ..., and user keywords with arguments. Robot separates arguments on two or more spaces, so a parser splitting on a single space merges every keyword call into one token.

File
ROBOT · Runners · UTF-8
Use case
Code parsingEditor testing+1· Conversion set
Preview of Robot Framework — Data-Driven Test Template
robot
682 B
Actual file preview for Robot Framework — Data-Driven Test Template

Robot Framework — Data-Driven Test Template

The template form, in which the *** Test Cases *** header itself names the argument columns and each row becomes one test. Five tests share a single keyword body, and a parser that reads the header row as a test name reports six.

File
ROBOT · Runners · UTF-8
Use case
Code parsingEditor testing+1· Conversion set
Preview of Robot Framework — Shared Keyword Resource
robot
768 B
Actual file preview for Robot Framework — Shared Keyword Resource

Robot Framework — Shared Keyword Resource

A resource file: keywords, variables and imports with no *** Test Cases *** section at all, meant to be imported by the suites next to it. Tooling that requires at least one test case rejects a perfectly ordinary resource, and keyword defaults such as ${qty}=1 are where argument parsers usually stop.

File
ROBOT · Runners · UTF-8
Use case
Code parsingEditor testing+1· Conversion set
Preview of Unified Diff - Single Hunk, Single File
diff
272 B
Actual file preview for Unified Diff - Single Hunk, Single File

Unified Diff - Single Hunk, Single File

One added guard line in a shell script, rendered as a POSIX `diff -u` with three lines of context and timestamped ---/+++ headers. The smallest complete unified diff, and the baseline the context-format and normal-format twins in this group encode identically.

File
DIFF · Diffs · UTF-8
Use case
Visual diff / regressionCode parsing+1· Paired fixture
Preview of Context Diff - Classic *** / --- Format
diff
303 B
Actual file preview for Context Diff - Classic *** / --- Format

Context Diff - Classic *** / --- Format

The same change as the unified twin, emitted in the pre-unified context format: `*** before` and `--- after` blocks separated by a row of asterisks, with `!`, `+` and `-` change markers. Parsers that assume every diff starts with `---`/`+++` misread this one as a unified diff with no hunks.

File
DIFF · Diffs · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Normal Diff - ed-Style Change Commands
diff
80 B
Actual file preview for Normal Diff - ed-Style Change Commands

Normal Diff - ed-Style Change Commands

The default output of bare `diff`: ed-style commands such as `3a4` with `<` and `>` bodies and no file headers at all. Tooling that identifies diffs by looking for `---`, `+++` or `@@` cannot even tell this is a diff, which is exactly what makes it a useful negative fixture.

File
DIFF · Diffs · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Unified Diff - Reverse of the Single-Hunk Diff
diff
272 B
Actual file preview for Unified Diff - Reverse of the Single-Hunk Diff

Unified Diff - Reverse of the Single-Hunk Diff

The exact inverse of the single-hunk fixture: the same edit expressed as a deletion instead of an insertion. Applying both in sequence must return the file to its original bytes, which makes this the fixture for `patch -R` and for revert paths.

File
DIFF · Diffs · UTF-8
Use case
Visual diff / regressionCode parsing+1· Paired fixture
Preview of Unified Diff - Several Hunks in One File
diff
739 B
Actual file preview for Unified Diff - Several Hunks in One File

Unified Diff - Several Hunks in One File

One TypeScript module edited in 2 places at once, so the hunks are far enough apart not to merge. Use it to check that a parser advances its line cursor by the hunk header rather than by counting emitted lines.

File
DIFF · Diffs · TypeScript
Preview of Unified Diff - Three Files in One Stream
diff
1.3 KB
Actual file preview for Unified Diff - Three Files in One Stream

Unified Diff - Three Files in One Stream

Three unrelated files changed in a single diff stream, with no `diff --git` lines to mark the boundaries — the only separator is the next `---` header. Splitters that key on `diff --git` see one file here instead of three.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - New File Against /dev/null
diff
525 B
Actual file preview for Unified Diff - New File Against /dev/null

Unified Diff - New File Against /dev/null

A file created from nothing: the old side is `/dev/null` and the hunk header carries the zero-length range `-0,0`. Parsers that compute a 1-based start line from the old range produce line 1 instead of line 0 unless they special-case a zero count.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Deleted File Against /dev/null
diff
295 B
Actual file preview for Unified Diff - Deleted File Against /dev/null

Unified Diff - Deleted File Against /dev/null

The mirror of the added-file fixture: every line is a deletion and the new range is `+0,0`. A renderer that writes an empty file instead of unlinking it, or that reports the change as a truncation, fails this one.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Zero Context (diff -U0)
diff
438 B
Actual file preview for Unified Diff - Zero Context (diff -U0)

Unified Diff - Zero Context (diff -U0)

`diff -U0` output: hunks contain nothing but +/- lines, and pure insertions produce ranges such as `-9,0`. Coverage and blame tools that need zero-context diffs hit this shape constantly, and hunk mergers that assume at least one context line get the offsets wrong.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Ten Lines of Context (diff -U10)
diff
1.1 KB
Actual file preview for Unified Diff - Ten Lines of Context (diff -U10)

Unified Diff - Ten Lines of Context (diff -U10)

The same edit as the zero-context fixture with ten lines of context, which merges the separate hunks into fewer, larger ones. Pair the two to check that a hunk-merging or context-trimming routine reaches the same applied result from either input.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Bare Line Number in the Hunk Header
diff
126 B
Actual file preview for Unified Diff - Bare Line Number in the Hunk Header

Unified Diff - Bare Line Number in the Hunk Header

A one-line file changed in place. Both ranges have length one, so the header is written `@@ -1 +1 @@` with no comma and no count — the abbreviation the unified format allows and that regexes of the form `-(\d+),(\d+)` fail to match.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Function Heading After the Hunk Header
diff
845 B
Actual file preview for Unified Diff - Function Heading After the Hunk Header

Unified Diff - Function Heading After the Hunk Header

git appends the enclosing declaration after the closing `@@` of each hunk header. The text is free-form and is not part of the range, so a parser that splits the header on `@@` and takes the last field reads the function signature as a range.

File
DIFF · Diffs · Go
Preview of Unified Diff - Diff of a Checked-In Patch File
diff
414 B
Actual file preview for Unified Diff - Diff of a Checked-In Patch File

Unified Diff - Diff of a Checked-In Patch File

Quilt, Debian and vendor trees check patches into the repository, so editing one produces a diff whose body is itself full of `+++`, `---` and `@@` lines and whose section heading is a `diff --git` line. Any scanner that finds file boundaries by searching for those tokens anywhere in the stream splits this single-file diff into several phantom files.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - No Newline Marker on the Old Side Only
diff
255 B
Actual file preview for Unified Diff - No Newline Marker on the Old Side Only

Unified Diff - No Newline Marker on the Old Side Only

The before-state has no final newline and the after-state gains one, so the marker appears once, immediately after the last `-` line. The change is invisible in a rendered side-by-side view yet alters the file's bytes, which is why line-based comparators report a spurious no-op.

File
DIFF · Diffs · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Unified Diff - No Newline Marker on Both Sides
diff
308 B
Actual file preview for Unified Diff - No Newline Marker on Both Sides

Unified Diff - No Newline Marker on Both Sides

Neither version ends with a newline, so the marker appears twice in one hunk: once after the last removed line and once after the last added line. Parsers that treat the marker as a terminator rather than an annotation stop reading at the first one and lose the added line.

File
DIFF · Diffs · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Unified Diff - Whitespace-Only Change
diff
304 B
Actual file preview for Unified Diff - Whitespace-Only Change

Unified Diff - Whitespace-Only Change

Indentation is converted from tabs to spaces and one line gains trailing whitespace, so the diff is large and the program is unchanged. It is the fixture for `-w`/`--ignore-all-space` handling and for review UIs that offer a hide-whitespace toggle.

File
DIFF · Diffs · UTF-8
Preview of Unified Diff - Pasted Into an Email Body
diff
1018 B
Actual file preview for Unified Diff - Pasted Into an Email Body

Unified Diff - Pasted Into an Email Body

A patch as it actually arrives in a mailing-list message: prose above it, a sign-off and an email signature below it, and a signature separator that looks like the start of a deletion. Extractors must find the diff without swallowing the surrounding text.

File
DIFF · Diffs · UTF-8
Preview of Git Patch - Single File With Full Mail Headers
patch
1.3 KB
Actual file preview for Git Patch - Single File With Full Mail Headers

Git Patch - Single File With Full Mail Headers

A complete format-patch message: the mbox `From <sha> Mon Sep 17 00:00:00 2001` line, RFC 5322 headers, a commit message with a Signed-off-by trailer, the `---` separator, a diffstat and the diff. The signature separator is `-- ` with the trailing space git actually writes, which editors love to strip.

File
PATCH · Patches · UTF-8
Preview of Git Patch - new file mode Header
patch
1 KB
Actual file preview for Git Patch - new file mode Header

Git Patch - new file mode Header

A file creation carried by the `new file mode 100644` extended header rather than by the paths alone. The mode is the authoritative signal: the `--- /dev/null` line tells you the old side is empty, but only the header tells you what permissions to create the file with.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - deleted file mode Header
patch
761 B
Actual file preview for Git Patch - deleted file mode Header

Git Patch - deleted file mode Header

A deletion of an executable file, so the `deleted file mode 100755` header records the mode the file had rather than the mode to create. A patcher that writes an empty file here instead of unlinking leaves a broken executable behind.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Mode Change With No Hunks
patch
488 B
Actual file preview for Git Patch - Mode Change With No Hunks

Git Patch - Mode Change With No Hunks

A permission change and nothing else: the file section has `old mode`/`new mode` headers, no `index` line, no `---`/`+++` pair and no hunks at all. Parsers that require at least one hunk per file drop this change entirely and report an empty patch.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Mode Change Plus Content Edit
patch
724 B
Actual file preview for Git Patch - Mode Change Plus Content Edit

Git Patch - Mode Change Plus Content Edit

The same file changes permissions and content in one commit, so the mode headers are followed by an `index` line and a normal hunk. Applying only the hunk and silently ignoring the mode is the common failure, and it leaves a script that is no longer executable.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Symlink Created With mode 120000
patch
581 B
Actual file preview for Git Patch - Symlink Created With mode 120000

Git Patch - Symlink Created With mode 120000

Git stores a symlink as a blob whose contents are the link target with no trailing newline, so this patch adds a single + line followed by the no-newline marker and marks it mode 120000. A patcher that ignores the mode writes a regular text file containing a path.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Pure Rename at similarity index 100%
patch
540 B
Actual file preview for Git Patch - Pure Rename at similarity index 100%

Git Patch - Pure Rename at similarity index 100%

A rename with no content change at all: `similarity index 100%`, `rename from`, `rename to`, and then nothing — no index line and no hunks. This is the single most common patch shape that naive parsers lose, because there is no `@@` anywhere in the file section.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Rename Plus Edits at similarity index 68%
patch
1.3 KB
Actual file preview for Git Patch - Rename Plus Edits at similarity index 68%

Git Patch - Rename Plus Edits at similarity index 68%

A rename that also edits the file, so the similarity index drops to 68% and the rename headers are followed by an index line and real hunks whose `---`/`+++` paths differ from each other. A patcher that applies hunks to the path on the `---` line writes to the file that no longer exists.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Copy Detection at similarity index 85%
patch
1.2 KB
Actual file preview for Git Patch - Copy Detection at similarity index 85%

Git Patch - Copy Detection at similarity index 85%

`copy from`/`copy to` headers, produced only when copy detection is enabled with `-C`. The source file still exists afterwards, which is the whole difference from a rename — and the difference a parser that maps both header pairs onto one 'moved' concept silently erases.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Abbreviated index Hashes
patch
1.1 KB
Actual file preview for Git Patch - Abbreviated index Hashes

Git Patch - Abbreviated index Hashes

The `index` line abbreviates both blob ids to seven characters, which is what plain format-patch emits and what most patches in the wild carry. Three-way application can still fall back to path matching, but the blobs cannot be looked up unambiguously in a large repository.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionMetadata testing+1· Conversion set
Preview of Git Patch - Full 40-Character index Hashes
patch
1.2 KB
Actual file preview for Git Patch - Full 40-Character index Hashes

Git Patch - Full 40-Character index Hashes

The same patch with `--full-index`, so both blob ids are the complete 40 hex characters. This is what `git apply --3way` needs to find the pre-image blob, and comparing the two twins shows a parser must accept any hash length between 4 and 40.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionMetadata testing+1· Conversion set
Preview of Git Patch - Every Extended Header in One Commit
patch
3.5 KB
Actual file preview for Git Patch - Every Extended Header in One Commit

Git Patch - Every Extended Header in One Commit

The torture test: one commit that creates a file, deletes an executable, renames at 100%, copies with detection on, changes a mode while editing, and adds a binary blob. The diffstat carries the matching create/delete/rename/mode-change summary lines that follow the file table.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Patch - Empty Commit With No Diff
patch
308 B
Actual file preview for Git Patch - Empty Commit With No Diff

Git Patch - Empty Commit With No Diff

format-patch output for a commit created with `--allow-empty`: full mail headers, a commit message, the `---` separator, and then straight to the signature with no diffstat and no diff. Pipelines that treat 'no diff found' as a parse error reject a message that git itself considers valid.

File
PATCH · Patches · UTF-8
Preview of Git Patch - Bare --- Line Inside the Commit Message
patch
1.3 KB
Actual file preview for Git Patch - Bare --- Line Inside the Commit Message

Git Patch - Bare --- Line Inside the Commit Message

The commit message uses `---` as a horizontal rule, so the file contains two lines that look like the diffstat separator. git's own mailinfo ends the message at the FIRST one, which quietly truncates the message and drops the rounding table — the patch still applies, but the recorded history is wrong.

File
PATCH · Patches · UTF-8
Preview of Git Patch - Scissors Line Above the Real Commit Message
patch
1.3 KB
Actual file preview for Git Patch - Scissors Line Above the Real Commit Message

Git Patch - Scissors Line Above the Real Commit Message

A patch sent as a reply: the mail subject starts with `Re:`, quoted text sits above a `-- >8 --` scissors line, and the real commit subject and body sit below it. `git am --scissors` discards everything above the cut; a parser that trusts the mail Subject header records 'Re: [PATCH] ...' as the commit title.

File
PATCH · Patches · UTF-8
Preview of Git Format-Patch Series - 0000 Cover Letter
patch
726 B
Actual file preview for Git Format-Patch Series - 0000 Cover Letter

Git Format-Patch Series - 0000 Cover Letter

The `--cover-letter` message git writes ahead of a series: a `[PATCH 0/3]` subject, a shortlog of the authors and their subjects, and the combined diffstat — but no diff of its own. Series tooling has to recognise it as metadata and not try to apply it.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Format-Patch Series - 0001 of 3
patch
1.5 KB
Actual file preview for Git Format-Patch Series - 0001 of 3

Git Format-Patch Series - 0001 of 3

Patch 1 of a three-message series, threaded under the cover letter with In-Reply-To and References headers. Applying the three out of order breaks: the series is only self-consistent in numeric order.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Format-Patch Series - 0002 of 3
patch
1.2 KB
Actual file preview for Git Format-Patch Series - 0002 of 3

Git Format-Patch Series - 0002 of 3

Patch 2 of a three-message series, threaded under the cover letter with In-Reply-To and References headers. Applying the three out of order breaks: the series is only self-consistent in numeric order.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Format-Patch Series - 0003 of 3
patch
762 B
Actual file preview for Git Format-Patch Series - 0003 of 3

Git Format-Patch Series - 0003 of 3

Patch 3 of a three-message series, threaded under the cover letter with In-Reply-To and References headers. Applying the three out of order breaks: the series is only self-consistent in numeric order.

File
PATCH · Patches · UTF-8
Use case
Visual diff / regressionCode parsing+1· Conversion set
Preview of Git Format-Patch Series - All Four Messages as One Mbox
mbox
4.2 KB
Actual file preview for Git Format-Patch Series - All Four Messages as One Mbox

Git Format-Patch Series - All Four Messages as One Mbox

The same four messages concatenated into a single mbox, which is exactly what `git format-patch --stdout` produces and what `git am` consumes. The From_ separator lines use git's fixed sentinel date, so a splitter cannot rely on the timestamp being real.

File
MBOX · Patches · UTF-8
Use case
Email parsingVisual diff / regression+1· Conversion set
Preview of Git Patch - Intentionally Invalid, Truncated Mid-Hunk
patch
569 B
Actual file preview for Git Patch - Intentionally Invalid, Truncated Mid-Hunk

Git Patch - Intentionally Invalid, Truncated Mid-Hunk

An intentionally invalid patch: the file ends three lines into a hunk that declares many more, as it would after a truncated download or a mail client cutting the message. Nothing is corrupt at the byte level, so a parser must notice the count mismatch rather than applying a partial hunk.

File
PATCH · Patches · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Git Patch - Intentionally Invalid Hunk Line Counts
patch
1.2 KB
Actual file preview for Git Patch - Intentionally Invalid Hunk Line Counts

Git Patch - Intentionally Invalid Hunk Line Counts

An intentionally invalid patch whose hunk header claims 99 lines on each side while the body supplies far fewer. Every other byte is a well-formed patch, so this isolates one question: does the applier verify the declared counts, or does it trust them and read past the end of the hunk?

File
PATCH · Patches · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Combined Diff - diff --cc With Two Parents
diff
256 B
Actual file preview for Combined Diff - diff --cc With Two Parents

Combined Diff - diff --cc With Two Parents

What `git show` prints for a merge commit: a `diff --cc` header, an index line naming three blobs, `@@@` hunk markers, and two prefix columns instead of one. The `++` line is the giveaway a reviewer is looking for — content that appears in the merge result but in neither parent.

File
DIFF · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Combined Diff - Octopus Merge With Three Parents
diff
272 B
Actual file preview for Combined Diff - Octopus Merge With Three Parents

Combined Diff - Octopus Merge With Three Parents

An octopus merge, so the hunk marker grows to `@@@@` and every line carries three prefix columns. Any parser that hard-codes `@@@` or assumes two columns reads the third column as the first character of the line's content.

File
DIFF · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Combined Diff - Per-Parent mode Line
diff
299 B
Actual file preview for Combined Diff - Per-Parent mode Line

Combined Diff - Per-Parent mode Line

When the file mode differs between the parents and the merge result, a combined diff adds a `mode a,b..result` line below the index line — a comma-separated shape that appears nowhere else in git's output. Parsers written for the single-parent `old mode`/`new mode` pair do not recognise it.

File
DIFF · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Merge Conflict - Two-Way (merge) Marker Style
txt
128 B
Actual file preview for Merge Conflict - Two-Way (merge) Marker Style

Merge Conflict - Two-Way (merge) Marker Style

A working-tree file left mid-merge in git's default `merge` conflict style: our version, a row of equals signs, their version, and branch labels on the opening and closing markers. Both sides happen to end with the same line, which the zdiff3 twin in this group hoists out and this style repeats.

File
TXT · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Merge Conflict - diff3 Marker Style With Base Section
txt
172 B
Actual file preview for Merge Conflict - diff3 Marker Style With Base Section

Merge Conflict - diff3 Marker Style With Base Section

The same conflict with `merge.conflictStyle=diff3`, which inserts the merge base between the two sides behind a row of pipes. Tools that split a conflict on `=======` alone silently fold the ancestor text into the ours side.

File
TXT · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Merge Conflict - zdiff3 Marker Style
txt
161 B
Actual file preview for Merge Conflict - zdiff3 Marker Style

Merge Conflict - zdiff3 Marker Style

The identical merge under `merge.conflictStyle=zdiff3`, which hoists lines common to both sides out of the conflict region — here 'jitter: on' moves below the closing marker. Diff this against the diff3 twin to see that the same conflict produces different file contents depending on one config value.

File
TXT · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Merge Conflict - Three Regions in One File
txt
424 B
Actual file preview for Merge Conflict - Three Regions in One File

Merge Conflict - Three Regions in One File

One file left with three independent unresolved regions and clean text between them, which is what a real deployment-values merge looks like. Editors that jump to 'the next conflict' and resolvers that report a boolean rather than a count both get exercised here.

File
TXT · Merges · UTF-8
Preview of Package Manifest - Intentionally Invalid, Conflict Markers in JSON
json
244 B
Actual file preview for Package Manifest - Intentionally Invalid, Conflict Markers in JSON

Package Manifest - Intentionally Invalid, Conflict Markers in JSON

A package manifest left mid-merge, so the file is intentionally invalid JSON: conflict markers sit inside the dependencies object. Any tool that reads manifests has to fail on this with a message about the conflict rather than a bare syntax error at line 5.

File
JSON · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Merge Conflict - Real Region Beside Marker Lookalikes
md
489 B
Actual file preview for Merge Conflict - Real Region Beside Marker Lookalikes

Merge Conflict - Real Region Beside Marker Lookalikes

Documentation about merge conflicts that quotes the markers inside a fenced code block, and then genuinely conflicts further down. A pre-commit hook that greps for `^<<<<<<<` reports two hits and blocks a clean commit; one that understands Markdown fences reports the one that matters.

File
MD · Merges · UTF-8
Preview of Merge Conflict - Nested Markers From a Conflicted Resolution
txt
217 B
Actual file preview for Merge Conflict - Nested Markers From a Conflicted Resolution

Merge Conflict - Nested Markers From a Conflicted Resolution

Someone committed a file that still contained conflict markers, and merging that commit produced markers inside markers. Region matchers that pair the first `<<<<<<<` with the first `=======` split this file in the wrong place and produce two overlapping regions that cannot both be resolved.

File
TXT · Merges · UTF-8
Preview of Reject File - Hunks git apply Could Not Place
diff
737 B
Actual file preview for Reject File - Hunks git apply Could Not Place

Reject File - Hunks git apply Could Not Place

What `git apply --reject` leaves behind when a hunk will not apply: the failed hunks alone, under a header that is neither `diff --git` nor a plain `---`/`+++` pair. Ships with its .orig twin so the pair can drive a resolve-the-reject workflow end to end.

File
DIFF · Merges · UTF-8
Use case
Error handlingVisual diff / regression+1· Paired fixture
Preview of Orig File - Untouched Backup Saved Beside a Failed Patch
txt
401 B
Actual file preview for Orig File - Untouched Backup Saved Beside a Failed Patch

Orig File - Untouched Backup Saved Beside a Failed Patch

The `.orig` backup GNU patch writes beside a file it has modified: the exact pre-patch content, kept so a failed application can be unwound. Paired with the .rej fixture, it is the complete state a developer actually finds after a patch goes wrong.

File
TXT · Merges · Go
Use case
Visual diff / regressionCode parsing+1· Paired fixture
Preview of CODEOWNERS - Intentionally Invalid, Five Distinct Defects
txt
571 B
Actual file preview for CODEOWNERS - Intentionally Invalid, Five Distinct Defects

CODEOWNERS - Intentionally Invalid, Five Distinct Defects

An intentionally invalid ownership file carrying five defects that all parse as plausible lines: an owner that is neither a handle nor an email, a team with no organisation, a character class, a negation, and a path with an unescaped space. Each is a separate assertion for a linter, and none of them is a syntax error a naive line splitter would notice.

File
TXT · Repo Config · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set
Preview of Git Log - --oneline Output
log
291 B
Actual file preview for Git Log - --oneline Output

Git Log - --oneline Output

Six commits as `git log --oneline` prints them: an abbreviated hash, a space, and the subject line. Every subject follows Conventional Commits, including one with a `!` breaking marker, so a release-notes generator can be scored against a known answer.

File
LOG · History · UTF-8
Preview of Git Log - Default Format With Conventional Commit Bodies
log
1.7 KB
Actual file preview for Git Log - Default Format With Conventional Commit Bodies

Git Log - Default Format With Conventional Commit Bodies

The default `git log` format for the same six commits: full 40-character hashes, Author and Date headers, and message bodies indented by exactly four spaces with genuinely empty separator lines. One commit carries a `BREAKING CHANGE:` footer and another a `Fixes:` footer, which is the shape a changelog generator has to find.

File
LOG · History · UTF-8
Preview of Git Log - --name-status With Rename Scores
log
568 B
Actual file preview for Git Log - --name-status With Rename Scores

Git Log - --name-status With Rename Scores

Per-commit file lists with single-letter status codes, tab-separated. Rename rows are the trap: `R100` is followed by TWO paths instead of one, so a splitter that takes field 2 as the filename reports the old path for renames and the new path for everything else.

File
LOG · History · UTF-8
Preview of Git Status - Porcelain v1 With Every Status Pair
log
190 B
Actual file preview for Git Status - Porcelain v1 With Every Status Pair

Git Status - Porcelain v1 With Every Status Pair

Porcelain v1 output covering staged-only, worktree-only, added, renamed, deleted, unmerged, untracked and ignored entries. The two status characters are positional and a space is meaningful, so trimming the line before parsing turns ' M' (modified but unstaged) into 'M' (staged).

File
LOG · History · UTF-8
Use case
Log parsingVisual diff / regression+1· Conversion set
Preview of Git Status - Porcelain v2 With Branch Headers
log
757 B
Actual file preview for Git Status - Porcelain v2 With Branch Headers

Git Status - Porcelain v2 With Branch Headers

The v2 format for the same working tree: `# branch.*` headers first, then one record per entry whose leading character selects a completely different field layout. Rename records put the new path first and separate the two paths with a TAB rather than an arrow, and unmerged records carry three object ids instead of two.

File
LOG · History · UTF-8
Use case
Log parsingVisual diff / regression+1· Conversion set
Preview of Commit Message - Intentionally Invalid, Four Rule Violations
txt
281 B
Actual file preview for Commit Message - Intentionally Invalid, Four Rule Violations

Commit Message - Intentionally Invalid, Four Rule Violations

An intentionally invalid commit message that breaks four commitlint rules at once: no conventional type, a 116-character header, no blank line separating subject from body, and a body that starts mid-sentence. Every rule should fire independently, which is what makes this useful for checking that a linter reports all violations rather than stopping at the first.

File
TXT · History · UTF-8
Use case
Error handlingVisual diff / regression+1· Conversion set