summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/unit
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-utils/src/input/unit')
-rw-r--r--zellij-utils/src/input/unit/layout_test.rs11
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap6
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap4
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap5
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap36
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_pane_template.snap12
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_tab_template.snap12
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_added_to_close_on_exit_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_overrides_close_on_exit_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__combined_tab_and_pane_template_both_with_children.snap17
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_added_to_cwd_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_override_cwd_in_template.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd.snap4
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_pane_templates.snap7
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_tab_templates.snap6
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_given_to_panes_without_cwd.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor_overrides_global_cwd_in_layout_file.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_prepended_to_panes_with_cwd.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_with_tab_cwd_given_to_panes_without_cwd.snap4
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_close_on_exit.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_start_suspended.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_default_tab_template.snap20
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_branched_pane_templates.snap11
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_pane_templates.snap8
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_excluded_from_sync.snap45
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_templates.snap22
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tab_and_pane_templates.snap7
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tabs_and_floating_panes.snap5
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_is_overriden_by_its_consumers_bare_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_overriden_by_its_consumers_command_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_remains_when_its_consumer_command_does_not_have_a_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_is_overriden_by_its_consumers_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_receives_its_consumers_bare_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_cwd_overriden_by_its_consumers_bare_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_with_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_without_cwd.snap2
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_edit.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_command_propagated_to_its_consumer_edit.snap3
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_given_to_panes_without_cwd.snap4
-rw-r--r--zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_prepended_to_panes_with_cwd.snap4
43 files changed, 303 insertions, 3 deletions
diff --git a/zellij-utils/src/input/unit/layout_test.rs b/zellij-utils/src/input/unit/layout_test.rs
index 7ff2567a9..a38abe028 100644
--- a/zellij-utils/src/input/unit/layout_test.rs
+++ b/zellij-utils/src/input/unit/layout_test.rs
@@ -1009,6 +1009,17 @@ fn combined_tab_and_pane_template_both_with_children() {
}
#[test]
+fn layout_with_pane_excluded_from_sync() {
+ let kdl_layout = r#"
+ layout {
+ pane exclude_from_sync=true
+ }
+ "#;
+ let layout = Layout::from_kdl(kdl_layout, "layout_file_name".into(), None, None).unwrap();
+ assert_snapshot!(format!("{:#?}", layout));
+}
+
+#[test]
fn cannot_define_tab_template_name_with_space() {
let kdl_layout = r#"
layout {
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap
index 65450c122..d01949514 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap
@@ -33,6 +33,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -58,6 +59,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -67,6 +69,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
[],
),
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap
index 5db6198b3..d31f721f0 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap
@@ -36,6 +36,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -61,6 +62,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -70,6 +72,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
[],
),
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap
index 92e0e4365..31ea7cb7d 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap
@@ -1,6 +1,5 @@
---
source: zellij-utils/src/input/./unit/layout_test.rs
-assertion_line: 1896
expression: "format!(\"{:#?}\", layout)"
---
Layout {
@@ -27,6 +26,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -39,6 +39,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: true,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -51,6 +52,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -60,6 +62,7 @@ Layout {
external_children_index: None,
children_are_stacked: true,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -69,6 +72,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
[],
),
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap
index c9aa7f872..85fa560d4 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap
@@ -27,6 +27,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -39,6 +40,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -48,6 +50,7 @@ Layout {
external_children_index: None,
children_are_stacked: true,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -57,6 +60,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
[],
),
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap
index 36186c3c1..2a6a8b2cf 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap
@@ -31,6 +31,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
TiledPaneLayout {
children_split_direction: Horizontal,
@@ -43,6 +44,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -52,6 +54,7 @@ Layout {
external_children_index: None,
children_are_stacked: true,
is_expanded_in_stack: true,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -61,6 +64,7 @@ Layout {
external_children_index: None,
children_are_stacked: true,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -70,6 +74,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
[],
),
diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap
index e2860ea05..98d4fef5a 100644
--- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap
+++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap
@@ -23,6 +23,7 @@ Layout {
external_children_index: None,
children_are_stacked: false,
is_expanded_in_stack: false,
+ exclude_from_sync: None,
},
],
split_size: None,
@@ -32,6 +33,7 @@ Layout {
external_children_index: None,