diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-23 10:51:44 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 07:39:25 -0500 |
| commit | 165402ddebb9f3a7e0cfc26b5223d9add488071b (patch) | |
| tree | b8e86f3d0f59099b90ce6ae0b53d2277bb5221d0 /runtime/test/loader_test.cpp | |
| parent | 21625bca8c675c62f9dbffc318ce6a59d57faf31 (diff) | |
audit_shader4_regs: --limit must be at least 1; 0 audited nothing and printed a zero report
`--limit 0` passed the non-negative check, `files[:0]` kept no listing, and the
tool printed `=== CS (0 shaders; ...) ===` for every stage with exit 0: a typo
gave a plausible empty audit. 0 is distinguishable from no limit (the default
is None), so it is now an argparse error naming the option, exit 2, the same
type function and wording as `anim_index`'s `byte_count`. A negative value and
a non-number are rejected the same way; `audit()` raises ValueError below 1.
Tests: `--limit 0`, `-1` and `x` exit 2 with no report and no JSON;
`--limit 1` on a two-listing folder audits one. The JSON-refusal test that
used `--limit 0` to exclude the listing now uses a second listing and
`--limit 1`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/loader_test.cpp')
0 files changed, 0 insertions, 0 deletions