Skip to content

test: fix BOM parsing assertion in parse_with_opts#1044

Draft
xuh0923 wants to merge 1 commit into
DaveGamble:developfrom
xuh0923:test-fix-parse-with-opts-bom-assert
Draft

test: fix BOM parsing assertion in parse_with_opts#1044
xuh0923 wants to merge 1 commit into
DaveGamble:developfrom
xuh0923:test-fix-parse-with-opts-bom-assert

Conversation

@xuh0923

@xuh0923 xuh0923 commented Jun 27, 2026

Copy link
Copy Markdown

Issue
The UTF-8 BOM parsing test in tests/parse_with_opts.c parsed both BOM and non-BOM inputs, but asserted with_bom twice.

That means the test did not actually verify that the plain {} input parsed successfully, even though the comparison below depends on both items being valid.

Changes

  • replace the duplicated with_bom assertion with an assertion for without_bom

Verification

  • build and run tests/parse_with_opts.c with gcc -Wall -Wextra -Werror -std=c89

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