Skip to content

Commit

Permalink
Fix format test for new behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Aug 20, 2021
1 parent 551bafc commit 3676779
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions regress/format-strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,13 @@ test_conditional_with_pane_in_mode "#{?pane_in_mode,[abc,xyz],bonus}" "[abc" "xy
test_conditional_with_pane_in_mode "#{?pane_in_mode,[abc#,xyz],bonus}" "[abc,xyz]" "bonus"


# Escape comma inside of #(...)
# Note: #() commands are run asynchronous and are substituted with result of the
# *previous* run or a placeholder (like "<'echo ,' not ready") if the command
# has not been run before. The format is updated as soon as the command
# finishes. As we are printing the message only once it never gets updated
# and the displayed message is "<'echo ,' not ready>"
# Escape comma inside of #(...) Note: #() commands are run asynchronous and are
# substituted with result of the *previous* run, an empty string if the command
# is new, or a placeholder after a few seconds. The format is updated as soon
# as the command finishes. As we are printing the message only once it never
# gets updated and the displayed message is empty.
test_format "#{?pane_in_mode,#(echo #,),xyz}" "xyz"
test_conditional_with_pane_in_mode "#{?pane_in_mode,#(echo #,),xyz}" "<'echo ,' not ready>" "xyz"
test_conditional_with_pane_in_mode "#{?pane_in_mode,#(echo #,),xyz}" "" "xyz"
# This caching does not work :-(
#$TMUX display-message -p "#(echo #,)" > /dev/null
#test_conditional_with_pane_in_mode "#{?pane_in_mode,#(echo #,),xyz}" "," "xyz"
Expand Down

0 comments on commit 3676779

Please sign in to comment.