diff options
Diffstat (limited to 'zellij-server/src/panes/unit/grid_tests.rs')
-rw-r--r-- | zellij-server/src/panes/unit/grid_tests.rs | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/zellij-server/src/panes/unit/grid_tests.rs b/zellij-server/src/panes/unit/grid_tests.rs index 1cd623b6e..7612a05d1 100644 --- a/zellij-server/src/panes/unit/grid_tests.rs +++ b/zellij-server/src/panes/unit/grid_tests.rs @@ -1,5 +1,6 @@ use super::super::Grid; use ::insta::assert_snapshot; +use zellij_tile::data::Palette; fn read_fixture(fixture_name: &str) -> Vec<u8> { let mut path_to_file = std::path::PathBuf::new(); @@ -15,7 +16,7 @@ fn read_fixture(fixture_name: &str) -> Vec<u8> { #[test] fn vttest1_0() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-0"; let content = read_fixture(fixture_name); for byte in content { @@ -27,7 +28,7 @@ fn vttest1_0() { #[test] fn vttest1_1() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-1"; let content = read_fixture(fixture_name); for byte in content { @@ -39,7 +40,7 @@ fn vttest1_1() { #[test] fn vttest1_2() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-2"; let content = read_fixture(fixture_name); for byte in content { @@ -51,7 +52,7 @@ fn vttest1_2() { #[test] fn vttest1_3() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-3"; let content = read_fixture(fixture_name); for byte in content { @@ -63,7 +64,7 @@ fn vttest1_3() { #[test] fn vttest1_4() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-4"; let content = read_fixture(fixture_name); for byte in content { @@ -75,7 +76,7 @@ fn vttest1_4() { #[test] fn vttest1_5() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest1-5"; let content = read_fixture(fixture_name); for byte in content { @@ -87,7 +88,7 @@ fn vttest1_5() { #[test] fn vttest2_0() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-0"; let content = read_fixture(fixture_name); for byte in content { @@ -99,7 +100,7 @@ fn vttest2_0() { #[test] fn vttest2_1() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-1"; let content = read_fixture(fixture_name); for byte in content { @@ -111,7 +112,7 @@ fn vttest2_1() { #[test] fn vttest2_2() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-2"; let content = read_fixture(fixture_name); for byte in content { @@ -123,7 +124,7 @@ fn vttest2_2() { #[test] fn vttest2_3() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-3"; let content = read_fixture(fixture_name); for byte in content { @@ -135,7 +136,7 @@ fn vttest2_3() { #[test] fn vttest2_4() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-4"; let content = read_fixture(fixture_name); for byte in content { @@ -147,7 +148,7 @@ fn vttest2_4() { #[test] fn vttest2_5() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-5"; let content = read_fixture(fixture_name); for byte in content { @@ -159,7 +160,7 @@ fn vttest2_5() { #[test] fn vttest2_6() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-6"; let content = read_fixture(fixture_name); for byte in content { @@ -171,7 +172,7 @@ fn vttest2_6() { #[test] fn vttest2_7() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-7"; let content = read_fixture(fixture_name); for byte in content { @@ -183,7 +184,7 @@ fn vttest2_7() { #[test] fn vttest2_8() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-8"; let content = read_fixture(fixture_name); for byte in content { @@ -195,7 +196,7 @@ fn vttest2_8() { #[test] fn vttest2_9() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-9"; let content = read_fixture(fixture_name); for byte in content { @@ -207,7 +208,7 @@ fn vttest2_9() { #[test] fn vttest2_10() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-10"; let content = read_fixture(fixture_name); for byte in content { @@ -219,7 +220,7 @@ fn vttest2_10() { #[test] fn vttest2_11() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-11"; let content = read_fixture(fixture_name); for byte in content { @@ -231,7 +232,7 @@ fn vttest2_11() { #[test] fn vttest2_12() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-12"; let content = read_fixture(fixture_name); for byte in content { @@ -243,7 +244,7 @@ fn vttest2_12() { #[test] fn vttest2_13() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-13"; let content = read_fixture(fixture_name); for byte in content { @@ -255,7 +256,7 @@ fn vttest2_13() { #[test] fn vttest2_14() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest2-14"; let content = read_fixture(fixture_name); for byte in content { @@ -267,7 +268,7 @@ fn vttest2_14() { #[test] fn vttest3_0() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(41, 110); + let mut grid = Grid::new(41, 110, Palette::default()); let fixture_name = "vttest3-0"; let content = read_fixture(fixture_name); for byte in content { @@ -279,7 +280,7 @@ fn vttest3_0() { #[test] fn vttest8_0() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-0"; let content = read_fixture(fixture_name); for byte in content { @@ -291,7 +292,7 @@ fn vttest8_0() { #[test] fn vttest8_1() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-1"; let content = read_fixture(fixture_name); for byte in content { @@ -303,7 +304,7 @@ fn vttest8_1() { #[test] fn vttest8_2() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-2"; let content = read_fixture(fixture_name); for byte in content { @@ -315,7 +316,7 @@ fn vttest8_2() { #[test] fn vttest8_3() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-3"; let content = read_fixture(fixture_name); for byte in content { @@ -327,7 +328,7 @@ fn vttest8_3() { #[test] fn vttest8_4() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-4"; let content = read_fixture(fixture_name); for byte in content { @@ -339,7 +340,7 @@ fn vttest8_4() { #[test] fn vttest8_5() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "vttest8-5"; let content = read_fixture(fixture_name); for byte in content { @@ -351,7 +352,7 @@ fn vttest8_5() { #[test] fn csi_b() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "csi-b"; let content = read_fixture(fixture_name); for byte in content { @@ -363,7 +364,7 @@ fn csi_b() { #[test] fn csi_capital_i() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "csi-capital-i"; let content = read_fixture(fixture_name); for byte in content { @@ -375,7 +376,7 @@ fn csi_capital_i() { #[test] fn csi_capital_z() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "csi-capital-z"; let content = read_fixture(fixture_name); for byte in content { @@ -387,7 +388,7 @@ fn csi_capital_z() { #[test] fn terminal_reports() { let mut vte_parser = vte::Parser::new(); - let mut grid = Grid::new(51, 97); + let mut grid = Grid::new(51, 97, Palette::default()); let fixture_name = "terminal_reports"; let content = read_fixture(fixture_name); for byte in content { |