Skip to content

Commit

Permalink
Fix false-negative test case for __bp_install
Browse files Browse the repository at this point in the history
This is an oversight of changing `trap DEBUG` to `trap - DEBUG` in

#106

The oversight did not cause a test error because the test always
succeeds.  The problem is that even if __bp_install is broken and
fails to remove `trap - DEBUG`, the current test case failed to detect
the failure and produce a false negative.  This patch fixes it.
  • Loading branch information
akinomyoga committed Feb 3, 2024
1 parent f872f3f commit 2a4ac8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/bash-preexec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ set_exit_code_and_run_precmd() {

eval_PROMPT_COMMAND

[[ "$PROMPT_COMMAND" != *"trap DEBUG"* ]] || return 1
[[ "$PROMPT_COMMAND" != *"trap - DEBUG"* ]] || return 1
[[ "$PROMPT_COMMAND" != *"__bp_install"* ]] || return 1
}

Expand Down

0 comments on commit 2a4ac8f

Please sign in to comment.