-
-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resurrection): various serialization issues (#3636)
* fix(serialization): use kdl-rs for serialization * style(fmt): remove dead code * tests(serialization): update snapshots * style(fmt): rustfmt
- Loading branch information
Showing
12 changed files
with
1,217 additions
and
296 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...rc/snapshots/zellij_utils__session_serialization__tests__can_serialize_multiple_tabs.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 2025 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="First tab" { | ||
} | ||
tab name="Second tab" { | ||
pane split_direction="vertical" { | ||
pane size=10 | ||
pane size=10 | ||
} | ||
} | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
...snapshots/zellij_utils__session_serialization__tests__can_serialize_new_tab_template.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 2047 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
new_tab_template { | ||
pane | ||
pane | ||
floating_panes { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
} | ||
} | ||
|
76 changes: 76 additions & 0 deletions
76
...pshots/zellij_utils__session_serialization__tests__can_serialize_swap_floating_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 2111 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
swap_floating_layout { | ||
floating_panes max_panes=1 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes min_panes=1 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes exact_panes=1 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
} | ||
swap_floating_layout name="swap_floating_layout_2" { | ||
floating_panes max_panes=2 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes min_panes=2 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes exact_panes=2 { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
floating_panes { | ||
pane { | ||
} | ||
pane { | ||
} | ||
pane { | ||
} | ||
} | ||
} | ||
} | ||
|
44 changes: 44 additions & 0 deletions
44
...snapshots/zellij_utils__session_serialization__tests__can_serialize_swap_tiled_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 2079 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
swap_tiled_layout { | ||
tab max_panes=1 { | ||
pane | ||
pane | ||
} | ||
tab min_panes=1 { | ||
pane | ||
pane | ||
} | ||
tab exact_panes=1 { | ||
pane | ||
pane | ||
} | ||
tab { | ||
pane | ||
pane | ||
} | ||
} | ||
swap_tiled_layout name="swap_tiled_layout_2" { | ||
tab max_panes=2 { | ||
pane | ||
pane | ||
} | ||
tab min_panes=2 { | ||
pane | ||
pane | ||
} | ||
tab exact_panes=2 { | ||
pane | ||
pane | ||
} | ||
tab { | ||
pane | ||
pane | ||
} | ||
} | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
...ls/src/snapshots/zellij_utils__session_serialization__tests__can_serialize_tab_focus.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1654 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="Tab #1" focus=true { | ||
} | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
...ts/zellij_utils__session_serialization__tests__can_serialize_tab_hide_floating_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1667 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="Tab #1" hide_floating_panes=true { | ||
} | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
...ils/src/snapshots/zellij_utils__session_serialization__tests__can_serialize_tab_name.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1641 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="my \"tab \\name" { | ||
} | ||
} | ||
|
74 changes: 74 additions & 0 deletions
74
...ts/zellij_utils__session_serialization__tests__can_serialize_tab_with_floating_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1929 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="Tab with \"floating panes\"" { | ||
floating_panes { | ||
pane { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 0 | ||
} | ||
pane cwd="/tmp/\"my/cool cwd" { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 10 | ||
} | ||
pane edit="/tmp/\"my/cool cwd/my-file" { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 20 | ||
} | ||
pane command="/tmp/\"my/cool cwd/command.sh" { | ||
start_suspended true | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 30 | ||
} | ||
pane command="/tmp/\"my/cool cwd/command.sh" { | ||
start_suspended true | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 40 | ||
args "--arg1" "arg\"2" "arg > \\3" | ||
} | ||
pane { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 50 | ||
plugin location="file:/tmp/\"my/cool cwd/plugin.wasm" | ||
} | ||
pane { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 60 | ||
plugin location="file:/tmp/\"my/cool cwd/plugin.wasm" { | ||
"key 1\"\\" "val 1\"\\" | ||
"key 2\"\\" "val 2\"\\" | ||
} | ||
} | ||
pane { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 70 | ||
} | ||
pane name="my cool \\ \"pane_title\"" focus=true contents_file="initial_contents_1" { | ||
height 10 | ||
width 10 | ||
x 0 | ||
y 80 | ||
} | ||
} | ||
} | ||
} | ||
|
15 changes: 15 additions & 0 deletions
15
...ots/zellij_utils__session_serialization__tests__can_serialize_tab_with_stacked_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1973 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="Tab with \"stacked panes\"" { | ||
pane stacked=true { | ||
pane | ||
pane expanded=true | ||
pane | ||
} | ||
} | ||
} | ||
|
31 changes: 31 additions & 0 deletions
31
...shots/zellij_utils__session_serialization__tests__can_serialize_tab_with_tiled_panes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1799 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
tab name="Tab with \"tiled panes\"" { | ||
pane size=10 | ||
pane cwd="/tmp/\"my/cool cwd" size=10 | ||
pane edit="/tmp/\"my/cool cwd/my-file" size=10 | ||
pane command="/tmp/\"my/cool cwd/command.sh" size=10 { | ||
start_suspended true | ||
} | ||
pane command="/tmp/\"my/cool cwd/command.sh" size=10 { | ||
args "--arg1" "arg\"2" "arg > \\3" | ||
start_suspended true | ||
} | ||
pane size=10 { | ||
plugin location="file:/tmp/\"my/cool cwd/plugin.wasm" | ||
} | ||
pane size=10 { | ||
plugin location="file:/tmp/\"my/cool cwd/plugin.wasm" { | ||
"key 1\"\\" "val 1\"\\" | ||
"key 2\"\\" "val 2\"\\" | ||
} | ||
} | ||
pane size=10 borderless=true | ||
pane name="my cool \\ \"pane_title\"" focus=true contents_file="initial_contents_1" size=10 | ||
} | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
zellij-utils/src/snapshots/zellij_utils__session_serialization__tests__global_cwd.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
source: zellij-utils/src/session_serialization.rs | ||
assertion_line: 1168 | ||
expression: kdl.0 | ||
--- | ||
layout { | ||
cwd "/path/to/m\"y/global cwd" | ||
} | ||
|