Problem
Repeating an assertion flag behaves differently depending on the flag's type:
StringArray flags (--assert-header, --assert-header-eq, --assert-header-missing) accumulate — every occurrence becomes an assertion.
- Scalar flags (
--assert-status, --assert-body, --assert-body-eq, --assert-redirect, --assert-redirect-eq) overwrite — last one wins, silently.
Reproduction
$ http-assert --assert-status 500 --assert-status 200 http://127.0.0.1:8791/ok
[+] PASSED ← only the 200 assertion ran; the 500 vanished
Why it matters
Silently discarding an assertion is the worst failure mode for a test tool — the run goes green having checked less than the user asked for.
Suggested fix
Document the distinction, and either warn when a scalar assertion flag is overwritten or promote the body/redirect assertions to StringArray so they accumulate like the header ones.
Problem
Repeating an assertion flag behaves differently depending on the flag's type:
StringArrayflags (--assert-header,--assert-header-eq,--assert-header-missing) accumulate — every occurrence becomes an assertion.--assert-status,--assert-body,--assert-body-eq,--assert-redirect,--assert-redirect-eq) overwrite — last one wins, silently.Reproduction
Why it matters
Silently discarding an assertion is the worst failure mode for a test tool — the run goes green having checked less than the user asked for.
Suggested fix
Document the distinction, and either warn when a scalar assertion flag is overwritten or promote the body/redirect assertions to
StringArrayso they accumulate like the header ones.