Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/test_compat_posix.bats
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ _stub_ps_printing() {
esac

# The real ps hands us a path with a space -- the premise of the stub above.
[[ "$raw" == *"Application Support"* ]]
# A non-last `[[ ]]` cannot fail the test on bash 3.2, so this states the
# premise the way the skip guard above already does.
case "$raw" in
*"Application Support"*) ;;
*) echo "ps reported [$raw], which does not carry the space-containing path" >&2
return 1 ;;
esac

run compat_get_comm "$_PROC_PID"
[ "$status" -eq 0 ]
Expand Down
Loading