Skip to content

Commit

Permalink
Fix a test for "__bp_install"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 27, 2022
1 parent 918b451 commit 4a37150
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/bash-preexec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ set_exit_code_and_run_precmd() {
@test "__bp_install should remove trap logic and itself from PROMPT_COMMAND" {
__bp_install_after_session_init

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

eval "$PROMPT_COMMAND"

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

@test "__bp_install should preserve an existing DEBUG trap" {
Expand Down

0 comments on commit 4a37150

Please sign in to comment.