Skip to content
Testaroo

Explore the test library

Find files, editable templates and browser test targets by what you need to make or test. The directory below is cut by format; the two collections under it cut the same library by subject and by workflow.

125 results

Page 5 of 6; 24 results per page.

Show the canonical directory
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 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 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 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: Hello World
swift
63 B
Actual file preview for Swift: Hello World

Swift: Hello World

The classic hello-world in Swift (a single print) for testing highlighters, the Swift compiler, and parsers.

File
SWIFT · Swift
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 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