Skip to content

Commit 4a37150

Browse files
committed
Fix a test for "__bp_install"
1 parent 918b451 commit 4a37150

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/bash-preexec.bats

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,11 @@ set_exit_code_and_run_precmd() {
5050
@test "__bp_install should remove trap logic and itself from PROMPT_COMMAND" {
5151
__bp_install_after_session_init
5252

53-
[[ "$PROMPT_COMMAND" == *"trap - DEBUG"* ]] || return 1
54-
[[ "$PROMPT_COMMAND" == *"__bp_install"* ]] || return 1
53+
[[ "$PROMPT_COMMAND" == *"$bash_preexec_install_string"* ]] || return 1
5554

5655
eval "$PROMPT_COMMAND"
5756

58-
[[ "$PROMPT_COMMAND" != *"trap DEBUG"* ]] || return 1
59-
[[ "$PROMPT_COMMAND" != *"__bp_install"* ]] || return 1
57+
[[ "$PROMPT_COMMAND" != *"$bash_preexec_install_string"* ]] || return 1
6058
}
6159

6260
@test "__bp_install should preserve an existing DEBUG trap" {

0 commit comments

Comments
 (0)