Panics · P18 Terminal: paint faults log, a pty side caps at what it holds, a default shell past the list keeps the last
This commit is contained in:
1 parent
b29d66ccc0
commit
0bb3f4e858
6 files changed
+114
-23
No files matched your search
@@ -79,3 +79,34 @@ fn a_link_keeps_its_combining_marks(cx: &mut TestAppContext) {
|
||||
assert_eq!(target, Target::Url("https://e.dev/cafe\u{301}/x".into()));
|
||||
});
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn a_pixel_size_query_of_a_wide_grid_answers(cx: &mut TestAppContext) {
|
||||
use gpui::AppContext as _;
|
||||
cx.update(Theme::init);
|
||||
for columns in [80, 8192] {
|
||||
let terminal = cx.new(|cx| Terminal::replay(b"\x1b[14t", columns, 1, cx));
|
||||
cx.run_until_parked();
|
||||
terminal.read_with(cx, |terminal, _| {
|
||||
assert_eq!(terminal.title().as_ref(), "Output")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn more_cells_than_a_windows_pty_holds_resize_it() {
|
||||
use alacritty_terminal::{event::OnResize, term::test::TermSize, tty};
|
||||
let options = tty::Options {
|
||||
shell: Some(tty::Shell::new(
|
||||
"cmd.exe".into(),
|
||||
vec!["/c".into(), "exit".into()],
|
||||
)),
|
||||
escape_args: true,
|
||||
..tty::Options::default()
|
||||
};
|
||||
let size = |columns| super::pty::window_size(&TermSize::new(columns, 24), (8, 16));
|
||||
let mut pty = tty::new(&options, size(80), 0).expect("a pty starts");
|
||||
pty.on_resize(size(80));
|
||||
pty.on_resize(size(70_000));
|
||||
}
|
||||
Reference in new issue
Block a user