Skip to content

Avoid parsing flags in test init#209

Open
HNO3Miracle wants to merge 1 commit into
fogleman:masterfrom
HNO3Miracle:fix-test-flag-parsing
Open

Avoid parsing flags in test init#209
HNO3Miracle wants to merge 1 commit into
fogleman:masterfrom
HNO3Miracle:fix-test-flag-parsing

Conversation

@HNO3Miracle

@HNO3Miracle HNO3Miracle commented Jun 22, 2026

Copy link
Copy Markdown

Summary:

  • Register the custom -save test flag without calling flag.Parse() in init.
  • This avoids failing Go test binaries before Go registers its own -test.* flags.

Testing:

  • GOPATH=/tmp/upstream-gopath GO111MODULE=off go test github.com/fogleman/gg -run '^$'

Note:

  • Full tests still depend on GOPATH dependencies and image hashes outside this change.

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@HNO3Miracle HNO3Miracle changed the title Do not parse test flags in init Avoid parsing flags in test init Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant