Skip to content

Commit fef242a

Browse files
committed
test(enter: false): Test command-level skipping
1 parent 7da46a9 commit fef242a

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

tests/test_workspacebuilder.py

+76
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,60 @@ def test_find_current_active_pane(server, monkeypatch):
919919
- panes:
920920
- shell_command:
921921
- echo "___$((1 + 3))___"
922+
"""
923+
),
924+
"___4___",
925+
True,
926+
],
927+
[
928+
textwrap.dedent(
929+
"""
930+
session_name: Should not execute
931+
windows:
932+
- panes:
933+
- shell_command:
934+
- cmd: echo "___$((1 + 3))___"
935+
enter: false
936+
"""
937+
),
938+
"___4___",
939+
False,
940+
],
941+
[
942+
textwrap.dedent(
943+
"""
944+
session_name: Should not execute
945+
windows:
946+
- panes:
947+
- shell_command:
948+
- cmd: echo "___$((1 + 3))___"
949+
enter: false
950+
"""
951+
),
952+
"___4___",
953+
False,
954+
],
955+
[
956+
textwrap.dedent(
957+
"""
958+
session_name: Should execute
959+
windows:
960+
- panes:
961+
- shell_command: echo "___$((1 + 3))___"
962+
"""
963+
),
964+
"___4___",
965+
True,
966+
],
967+
[
968+
textwrap.dedent(
969+
"""
970+
session_name: Should execute
971+
windows:
972+
- panes:
973+
- shell_command:
974+
- cmd: echo "other command"
975+
- cmd: echo "___$((1 + 3))___"
922976
"""
923977
),
924978
"___4___",
@@ -930,6 +984,10 @@ def test_find_current_active_pane(server, monkeypatch):
930984
"pane_enter_false_longform",
931985
"pane_enter_default_shortform",
932986
"pane_enter_default_longform",
987+
"pane_command_enter_false_shortform",
988+
"pane_command_enter_false_longform",
989+
"pane_command_enter_default_shortform",
990+
"pane_command_enter_default_longform",
933991
],
934992
)
935993
def test_load_workspace_enter(
@@ -985,6 +1043,23 @@ def test_load_workspace_enter(
9851043
"""
9861044
session_name: Should not execute
9871045
windows:
1046+
- panes:
1047+
- shell_command:
1048+
- cmd: echo "___$((1 + 3))___"
1049+
sleep: 2
1050+
- cmd: echo "___$((1 + 3))___"
1051+
sleep: 2
1052+
- cmd: echo "___$((1 + 3))___"
1053+
sleep: 2
1054+
"""
1055+
),
1056+
"___4___",
1057+
],
1058+
[
1059+
textwrap.dedent(
1060+
"""
1061+
session_name: Should not execute
1062+
windows:
9881063
- panes:
9891064
- shell_command:
9901065
- echo "___$((1 + 3))___"
@@ -997,6 +1072,7 @@ def test_load_workspace_enter(
9971072
ids=[
9981073
"pane_sleep_3_shortform",
9991074
"pane_sleep_3_longform",
1075+
"pane_sleep_6_longform",
10001076
],
10011077
)
10021078
def test_load_workspace_sleep(

0 commit comments

Comments
 (0)