The help text in src/unit_test.c states:
Unknown arguments are reported but ignored.
However, parse_arg() returns -1 when it encounters an unknown key:
/* Unknown key: report just so typos don't silently pass. */
fprintf(stderr, "Unknown argument '-%s=%s'\n", key, value);
return -1;
This propagates through read_args() and causes tf_init() to return EXIT_FAILURE, terminating the program before any tests run.
Windows/MSVC build):
> tests.exe --typo=1
Unknown argument '-typo=1'
> echo $LASTEXITCODE
1
vs. a valid argument, which runs normally:
> tests.exe -i=1
...
Total execution time: 38.234 seconds
> echo $LASTEXITCODE
0
Given the comment in parse_arg() ("report just so typos don't silently pass"), the fail-fast behavior looks intentional — in which case the fix
is just updating the help text. But I wanted to check before opening a PR: should the documentation be corrected to match the actual
(fail-fast) behavior, or should the behavior be changed to match the documented "ignored" claim.