diff options
| author | Aram Drevekenin <aram@poor.dev> | 2020-12-17 16:33:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-17 16:33:18 +0100 |
| commit | 97980d618f9a79321b511fd23a114eef88c8632f (patch) | |
| tree | f4c00508b2203a86a1c35473d4f4acddac67b924 /src/tests/integration/compatibility.rs | |
| parent | fix(compatibility): fix neovim change mode (#108) (diff) | |
| download | sl0ppij-97980d618f9a79321b511fd23a114eef88c8632f.tar.gz sl0ppij-97980d618f9a79321b511fd23a114eef88c8632f.tar.xz sl0ppij-97980d618f9a79321b511fd23a114eef88c8632f.zip | |
fix(compatibility): fix bash linewrap (#109)
Diffstat (limited to 'src/tests/integration/compatibility.rs')
| -rw-r--r-- | src/tests/integration/compatibility.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/integration/compatibility.rs b/src/tests/integration/compatibility.rs index 467a99ca..65dc8da9 100644 --- a/src/tests/integration/compatibility.rs +++ b/src/tests/integration/compatibility.rs @@ -363,3 +363,28 @@ pub fn neovim_insert_mode() { assert_snapshot!(snapshot); } } + +#[test] +pub fn bash_cursor_linewrap() { + // this test makes sure that when we enter a command that is beyond the screen border, that it + // immediately goes down one line + let fake_win_size = PositionAndSize { + columns: 116, + rows: 28, + x: 0, + y: 0, + }; + let fixture_name = "bash_cursor_linewrap"; + let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name); + fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]); + start(Box::new(fake_input_output.clone()), Opt::default()); + 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); + } +} |
