We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f872f3f + 99d05b9 commit 1f77dc0Copy full SHA for 1f77dc0
test/bash-preexec.bats
@@ -74,13 +74,13 @@ set_exit_code_and_run_precmd() {
74
@test "__bp_install should remove trap logic and itself from PROMPT_COMMAND" {
75
__bp_install_after_session_init
76
77
- [[ "$PROMPT_COMMAND" == *"trap - DEBUG"* ]] || return 1
78
- [[ "$PROMPT_COMMAND" == *"__bp_install"* ]] || return 1
+ # Assert that before running, the command contains the install string, and
+ # afterwards it does not
79
+ [[ "$PROMPT_COMMAND" == *"$__bp_install_string"* ]] || return 1
80
81
eval_PROMPT_COMMAND
82
- [[ "$PROMPT_COMMAND" != *"trap DEBUG"* ]] || return 1
83
- [[ "$PROMPT_COMMAND" != *"__bp_install"* ]] || return 1
+ [[ "$PROMPT_COMMAND" != *"$__bp_install_string"* ]] || return 1
84
}
85
86
@test "__bp_install should preserve an existing DEBUG trap" {
0 commit comments