mirror of
https://github.com/tmux/tmux.git
synced 2026-10-07 18:24:22 +00:00
Allow simple commands to be fired.
This commit is contained in:
3
parser-test/test-configs/command-body-unsupported.tmux
Normal file
3
parser-test/test-configs/command-body-unsupported.tmux
Normal file
@@ -0,0 +1,3 @@
|
||||
# Command body unsupported checkpoint.
|
||||
# Expected at this stage: should parse, then fatal/XXX when invocation reaches ARGS_COMMANDS.
|
||||
bind-key F1 { display-message "parser command body" }
|
||||
2
parser-test/test-configs/env-tilde.tmux
Normal file
2
parser-test/test-configs/env-tilde.tmux
Normal file
@@ -0,0 +1,2 @@
|
||||
display-message "HOME=$HOME"
|
||||
display-message ~
|
||||
5
parser-test/test-configs/failure-sequence.tmux
Normal file
5
parser-test/test-configs/failure-sequence.tmux
Normal file
@@ -0,0 +1,5 @@
|
||||
# Failure scope test.
|
||||
# Expected with sequence skipping: bad command fails, following command in same sequence is skipped,
|
||||
# then next top-level sequence still runs.
|
||||
display-message "parser failure: before bad command" ; no-such-tmux-command ; display-message "parser failure: should be skipped"
|
||||
display-message "parser failure: next sequence should still run"
|
||||
10
parser-test/test-configs/if-else-elif.tmux
Normal file
10
parser-test/test-configs/if-else-elif.tmux
Normal file
@@ -0,0 +1,10 @@
|
||||
# %if/%elif/%else.
|
||||
# Expected: elif branch is selected.
|
||||
%if 0
|
||||
display-message "parser elif: selected if branch - wrong"
|
||||
%elif 1
|
||||
display-message "parser elif: selected elif branch"
|
||||
%else
|
||||
display-message "parser elif: selected else branch - wrong"
|
||||
%endif
|
||||
display-message "parser elif: after endif"
|
||||
8
parser-test/test-configs/if-true.tmux
Normal file
8
parser-test/test-configs/if-true.tmux
Normal file
@@ -0,0 +1,8 @@
|
||||
# %if true branch.
|
||||
# Expected: first branch is selected.
|
||||
%if 1
|
||||
display-message "parser if true: selected if branch"
|
||||
%else
|
||||
display-message "parser if true: selected else branch - wrong"
|
||||
%endif
|
||||
display-message "parser if true: after endif"
|
||||
3
parser-test/test-configs/inline-if.tmux
Normal file
3
parser-test/test-configs/inline-if.tmux
Normal file
@@ -0,0 +1,3 @@
|
||||
# Inline %if form.
|
||||
# Expected: inline true branch selected, then following command in same sequence is processed.
|
||||
display-message "parser inline if: before" ; %if 1 display-message "parser inline if: branch" %endif ; display-message "parser inline if: after"
|
||||
3
parser-test/test-configs/semicolon.tmux
Normal file
3
parser-test/test-configs/semicolon.tmux
Normal file
@@ -0,0 +1,3 @@
|
||||
# Semicolon sequence.
|
||||
# Expected: one top-level sequence containing three commands.
|
||||
set -g status on ; set -g message-style fg=yellow ; display-message "parser semicolon sequence"
|
||||
5
parser-test/test-configs/simple.tmux
Normal file
5
parser-test/test-configs/simple.tmux
Normal file
@@ -0,0 +1,5 @@
|
||||
# Simple straight-line commands.
|
||||
# Expected: all commands parse and run in order.
|
||||
set -g status off
|
||||
set -g message-style fg=green
|
||||
display-message "parser simple: status=#{status}"
|
||||
Reference in New Issue
Block a user