T10: focus in and out reach a program under mode 1004; the window wears the program's title; a bell is logged and silent; the scrollback setting caps history and trims it live; Cmd-F finds in the scrollback with Ely's FindWidget, matches washed, Enter older, Shift-Enter newer, new output searched again
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 8m24s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 16:26:20 -04:00
1 parent a39be06cdc
commit 4d8788ff22
11 files changed
+486 -35

No files matched your search

+25
View File
@@ -377,3 +377,28 @@ mod tests {
assert_eq!((size.num_cols, size.num_lines), (2, 1));
}
}
#[cfg(test)]
mod scrollback {
use alacritty_terminal::{event::VoidListener, grid::Dimensions, vte::ansi::Processor};
use super::*;
#[test]
fn the_setting_caps_history_and_a_change_trims_it() {
let settings = Settings {
scrollback: 5,
..Settings::default()
};
let mut term = Term::new(config(&settings), &TermSize::new(10, 3), VoidListener);
let mut parser: Processor = Processor::new();
let lines: String = (1..=20).map(|line| format!("{line}\r\n")).collect();
parser.advance(&mut term, lines.as_bytes());
assert_eq!(term.grid().history_size(), 5);
term.set_options(config(&Settings {
scrollback: 2,
..settings
}));
assert_eq!(term.grid().history_size(), 2);
}
}