Skip to content

Four flag descriptions in --help are wrong (copy-paste errors) #37

Description

@korya

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions