Documentation
¶
Overview ¶
Package testutil holds helpers shared across the tests/ tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RepoRoot ¶
RepoRoot returns the repository root directory, located by walking up from the caller's source file until a go.mod is found. Being depth-independent it works from any package under tests/ without a hard-coded "../.." offset that silently breaks when the test layout is reorganized.
func SyntheticCorpus ¶
SyntheticCorpus returns n synthetic secret-bearing prompt strings for masking tests and benchmarks. Each entry embeds real-looking secrets (email, IPv4, Stripe/npm keys, passwords) that trigger the shipped built-in rules across all five built-in data types, varied by index so distinct entries yield distinct placeholders while repeats exercise cross-text dedup. It is self-contained (no external data files), so masking tests stay green on any clean checkout.
Types ¶
This section is empty.