Skip to content
Testaroo
txt401 B

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.

Preview, first 15 linestxt
package ledger

import "errors"

// ErrShortBalance is returned when a posting would drive the balance negative.
var ErrShortBalance = errors.New("ledger: insufficient balance")

// Apply posts one delta against the running balance and returns the new total.
func Apply(balance, delta int64) (int64, error) {
	if balance+delta < 0 {
		return balance, ErrShortBalance
	}
	return balance + delta, nil
}

Specifications

Seed
20260807
Repository Name
internal/ledger/apply.go.orig
Produced By
patch --backup
Language
Go
Lines
14
Line Endings
LF
Encoding
UTF-8

Testing contract

Expected to pass
Scenario
Recover the pre-patch state of a file from the .orig backup after a partial application.
Expected result
The file is byte-identical to the patch's documented before-state and contains no conflict markers or diff syntax.

What is a .txt file?

TXT is a plain-text file containing unformatted character data with no styling or structure beyond line breaks. Its interpretation depends on character encoding, most commonly UTF-8, and on line-ending convention. It is the most universal and portable text container.

How to use this file

Use an example TXT to test encoding detection, line-ending (LF versus CRLF) handling, and any tool that reads or streams raw text input.

How to use this file for testing

“Orig File - Untouched Backup Saved Beside a Failed Patch” is a deterministic Testaroo fixture for Visual diff / regression, Code parsing, Editor testing. A/B image twins with controlled pixel changes, anti-alias variants, and UI chrome crops for screenshot diff and visual regression tools.

Documented properties for this file: seed 20260807 · Go · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.

Diff and patch fixtures name their target paths and the exact edge case they exercise, rename, mode change, binary hunk, CRLF↔LF, or missing trailing newline. Apply or render them against the documented before-state; every author, path, and hash is fictional.

Treat A/B twins as a visual regression unit: run your pixel or perceptual diff, assert a non-zero delta on the changed twin, and keep thresholds calibrated against the documented change kind in specs.

Generated by generation/version_control.py. Free for any use, no attribution required, license.