diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-04-06 13:06:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 13:06:39 +0300 |
commit | 673710487afac8596a9f18fea9e04aeada32c2be (patch) | |
tree | 1305e00422c01e35d91c533b12004c0082528eb4 /alacritty_terminal/tests/ref.rs | |
parent | 851dbc328efd9b212bb2c7b9caaf5763eb4e524b (diff) | |
download | alacritty-673710487afac8596a9f18fea9e04aeada32c2be.tar.gz alacritty-673710487afac8596a9f18fea9e04aeada32c2be.zip |
Extract `SizeInfo` from alacritty_terminal
The `SizeInfo` is a SizeInfo used for rendering, which contains
information about padding, and such, however all the terminal need is
number of visible lines and columns.
Diffstat (limited to 'alacritty_terminal/tests/ref.rs')
-rw-r--r-- | alacritty_terminal/tests/ref.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alacritty_terminal/tests/ref.rs b/alacritty_terminal/tests/ref.rs index 87f5a811..6f9d39d0 100644 --- a/alacritty_terminal/tests/ref.rs +++ b/alacritty_terminal/tests/ref.rs @@ -11,7 +11,8 @@ use alacritty_terminal::event::{Event, EventListener}; use alacritty_terminal::grid::{Dimensions, Grid}; use alacritty_terminal::index::{Column, Line}; use alacritty_terminal::term::cell::Cell; -use alacritty_terminal::term::{SizeInfo, Term}; +use alacritty_terminal::term::test::TermSize; +use alacritty_terminal::term::Term; macro_rules! ref_tests { ($($name:ident)*) => { @@ -98,14 +99,14 @@ fn ref_test(dir: &Path) { let serialized_grid = fs::read_to_string(dir.join("grid.json")).unwrap(); let serialized_cfg = fs::read_to_string(dir.join("config.json")).unwrap(); - let size: SizeInfo = json::from_str(&serialized_size).unwrap(); + let size: TermSize = json::from_str(&serialized_size).unwrap(); let grid: Grid<Cell> = json::from_str(&serialized_grid).unwrap(); let ref_config: RefConfig = json::from_str(&serialized_cfg).unwrap(); let mut config = Config::default(); config.scrolling.set_history(ref_config.history_size); - let mut terminal = Term::new(&config, size, Mock); + let mut terminal = Term::new(&config, &size, Mock); let mut parser = ansi::Processor::new(); for byte in recording { |