test(compat): make the space-containing-path premise able to fail - #887
Merged
Conversation
The premise assertion was a non-last `[[ ]]`, which cannot fail a test on bash 3.2 -- so it stated the premise without checking it. It now uses the same case/esac shape the skip guard above it already uses, and prints what ps actually reported. main is currently one over its enforced-assertions baseline because of this line, so every branch cut from main fails that check. The count returns to 638 with this change. Mutation: replacing the pattern with one `raw` cannot match turns test 5 red and leaves the other four green. bats tests/test_compat_posix.bats: 5/5.
This was referenced Aug 19, 2026
test(compat): make the space-in-path premise able to fail (main is over its assertion baseline)
#890
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainis one over its enforced-assertions baseline right now, so theenforceable assertionscheck fails on every branch cut from it. Two open PRs hit this before it was traced, and neither had added the line.What happened
tests/test_compat_posix.bats:112states the premise of its last test with a non-last[[ ]]:On bash 3.2 a non-last
[[ ]]cannot fail the test, so the line read as a check without being one. That is exactly what the baseline counts, and it took the count from 638 to 639.It reached
mainbecause the branch that introduced it predated theenforceable assertionsjob: 15 checks ran on that head, and this was not among them. CI runs the workflow as it exists on the branch, so an old enough branch is not measured by a checkmainrequires.The change
The premise now uses the same
case/esacshape as the skip guard directly above it, and prints whatpsactually reported on failure.Positive control
Replacing the pattern with one
$rawcannot match turns test 5 red and leaves the other four green:check-enforced-assertions.sh: 639 before, 638 after — at the baseline.bats tests/test_compat_posix.bats: 5/5.