Problem
Current --help output:
--assert-body string Assert body equals the provided value
--assert-header stringArray Assert header equals the provided regexp
--assert-header-eq stringArray Assert header equals the provided regexp
--assert-redirect string Assert response redirects to the provided URL
--assert-redirect-eq string Assert response redirects to the provided URL
| Flag |
Says |
Should say |
--assert-body |
"body equals the provided value" |
matches the provided regexp |
--assert-header |
"header equals the provided regexp" |
matches the provided regexp |
--assert-header-eq |
"header equals the provided regexp" |
equals the provided value |
--assert-redirect / --assert-redirect-eq |
identical strings |
one is a regexp, one is exact |
Why it matters
--help is the only reference a user has at the terminal, and right now it cannot be used to tell the regexp variants from the exact-match ones — which is the single most important distinction in the whole flag set.
Affected code
main.go — registerAssertionFlags
Also worth documenting there
--assert-header-eq NAME with no value silently degrades to an "is present" assertion (parseHeaderAssertions), so there is no way to assert that a header equals the empty string.
Problem
Current
--helpoutput:--assert-body--assert-header--assert-header-eq--assert-redirect/--assert-redirect-eqWhy it matters
--helpis the only reference a user has at the terminal, and right now it cannot be used to tell the regexp variants from the exact-match ones — which is the single most important distinction in the whole flag set.Affected code
main.go—registerAssertionFlagsAlso worth documenting there
--assert-header-eq NAMEwith no value silently degrades to an "is present" assertion (parseHeaderAssertions), so there is no way to assert that a header equals the empty string.