diff options
| author | Aram Drevekenin <aram@poor.dev> | 2020-10-15 17:58:07 +0200 |
|---|---|---|
| committer | Aram Drevekenin <aram@poor.dev> | 2020-10-15 17:58:07 +0200 |
| commit | 6a68f4c71041eae8c847a9b368cc5ccd8d16f047 (patch) | |
| tree | 5849bd3466849d5129b90c236b47039c5359fcbf /src/tests/integration/basic.rs | |
| parent | fix(vim): properly delete last line (diff) | |
| download | sl0ppij-6a68f4c71041eae8c847a9b368cc5ccd8d16f047.tar.gz sl0ppij-6a68f4c71041eae8c847a9b368cc5ccd8d16f047.tar.xz sl0ppij-6a68f4c71041eae8c847a9b368cc5ccd8d16f047.zip | |
feat(scrolling): basic 1-line scroll-up and scroll-down inside a pane
Diffstat (limited to 'src/tests/integration/basic.rs')
| -rw-r--r-- | src/tests/integration/basic.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/integration/basic.rs b/src/tests/integration/basic.rs index 123f96e6..49cfeda5 100644 --- a/src/tests/integration/basic.rs +++ b/src/tests/integration/basic.rs @@ -98,3 +98,21 @@ pub fn resize_right_and_up_on_the_same_axis() { assert_snapshot!(snapshot); } } + +#[test] +pub fn scrolling_inside_a_pane() { + 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); + fake_input_output.add_terminal_input(&[2, 14, 27, 27, 29, 29, 17]); // split-horizontally, split-vertically, scroll up twice, scroll down twice and quit (ctrl-b + ctrl+[ * 2 + ctrl+] * 2, ctrl-q) + start(Box::new(fake_input_output.clone())); + 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); + } +} |
