Skip to content

Commit 2a4ac8f

Browse files
committed
Fix false-negative test case for __bp_install
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.
1 parent f872f3f commit 2a4ac8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/bash-preexec.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ set_exit_code_and_run_precmd() {
7979

8080
eval_PROMPT_COMMAND
8181

82-
[[ "$PROMPT_COMMAND" != *"trap DEBUG"* ]] || return 1
82+
[[ "$PROMPT_COMMAND" != *"trap - DEBUG"* ]] || return 1
8383
[[ "$PROMPT_COMMAND" != *"__bp_install"* ]] || return 1
8484
}
8585

0 commit comments

Comments
 (0)