diff options
| author | Aram Drevekenin <aram@poor.dev> | 2020-11-05 10:26:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-05 10:26:33 +0100 |
| commit | bdcd3b74fffdb2dcdeb38dab9f38b6d0c5af781c (patch) | |
| tree | 8c8d4ef5d1b440c20c9a133e954c0a5276c35490 /src/tests/integration/basic.rs | |
| parent | Merge pull request #23 from mosaic-org/qballer/refactor-readme (diff) | |
| download | sl0ppij-bdcd3b74fffdb2dcdeb38dab9f38b6d0c5af781c.tar.gz sl0ppij-bdcd3b74fffdb2dcdeb38dab9f38b6d0c5af781c.tar.xz sl0ppij-bdcd3b74fffdb2dcdeb38dab9f38b6d0c5af781c.zip | |
feat(screen): allow to toggle pane fullscreen with ctrl-f (#24)
Diffstat (limited to 'src/tests/integration/basic.rs')
| -rw-r--r-- | src/tests/integration/basic.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/integration/basic.rs b/src/tests/integration/basic.rs index eb7be818..7067c8f6 100644 --- a/src/tests/integration/basic.rs +++ b/src/tests/integration/basic.rs @@ -157,3 +157,26 @@ pub fn max_panes () { assert_snapshot!(snapshot); } } + +#[test] +pub fn toggle_focused_pane_fullscreen () { + let fake_win_size = Winsize { // TODO: combine with above + ws_col: 121, + ws_row: 20, + ws_xpixel: 0, + ws_ypixel: 0, + }; + let mut fake_input_output = get_fake_os_input(&fake_win_size); + // split-largest_terminal * 3, toggle-fullscreen * 2, ctrl-p, toggle-fullscreen * 2, ctrl-p, toggle-fullscreen * 2, ctrl-p, toggle-fullscreen * 2 and quit + // (ctrl-z + ctrl-z + ctrl-z + ctrl-z + ctrl-f, ctrl-f, ctrl-p, ctrl-f, ctrl-f, ctrl-p, ctrl-f, + // ctrl-f, ctrl-p, ctrl-f, ctrl-f, ctrl-q) + fake_input_output.add_terminal_input(&[26, 26, 26, 6, 6, 16, 6, 6, 16, 6, 6, 16, 6, 6, 17]); + let mut opts = Opt::default(); + opts.max_panes = Some(4); + start(Box::new(fake_input_output.clone()), opts); + let output_frames = fake_input_output.stdout_writer.output_frames.lock().unwrap(); + let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size); + for snapshot in snapshots { + assert_snapshot!(snapshot); + } +} |
