-
Notifications
You must be signed in to change notification settings - Fork 443
Closed
Labels
Component: Bash CodeEverything regarding the bash codeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsBroken behavior in specific environments like in parallel mode or only on some operating systemsSize: MediumChanges in the same fileChanges in the same fileStatus: ConfirmedThe reproducer worked as describedThe reproducer worked as describedType: Bug
Milestone
Description
setup_suite() {
echo -n "$IFS" | hexdump -C
[ "$IFS" = $' \t\n' -o "$IFS" = '' ]
}
# bats test_tags=x
@test "x" { :; }
$ bats --tap .
1..1
ok 1 x
$ bats --filter-tags x --tap .
1..1
not ok 1 setup_suite
# (from function `setup_suite' in test file ./setup_suite.bash, line 3)
# `[ "$IFS" = $' \t\n' ]' failed
# 00000000 2c |,|
# 00000001
workaround:
setup_suite() {
local IFS
unset IFS
[ "$IFS" = '' ]
}
likely culprit: https://github.com/bats-core/bats-core/blob/f1f5115e3621e47fc41a32e36450afa95fdb2830/libexec/bats-core/bats-preprocess#L93C14-L93C14
GNU bash, version 5.2.15(1)-release
Metadata
Metadata
Assignees
Labels
Component: Bash CodeEverything regarding the bash codeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsBroken behavior in specific environments like in parallel mode or only on some operating systemsSize: MediumChanges in the same fileChanges in the same fileStatus: ConfirmedThe reproducer worked as describedThe reproducer worked as describedType: Bug