diff options
Diffstat (limited to 'tests/weird.rs')
-rw-r--r-- | tests/weird.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/weird.rs b/tests/weird.rs index 20cc571..6719644 100644 --- a/tests/weird.rs +++ b/tests/weird.rs @@ -1,17 +1,17 @@ #[test] fn intermediate_control() { - let mut screen = vt100::Screen::new(24, 80); - assert_eq!(screen.cursor_position(), (0, 0)); + let mut parser = vt100::Parser::new(24, 80); + assert_eq!(parser.screen().cursor_position(), (0, 0)); - screen.process(b"\x1b"); - assert_eq!(screen.cursor_position(), (0, 0)); + parser.process(b"\x1b"); + assert_eq!(parser.screen().cursor_position(), (0, 0)); - screen.process(b"["); - assert_eq!(screen.cursor_position(), (0, 0)); + parser.process(b"["); + assert_eq!(parser.screen().cursor_position(), (0, 0)); - screen.process(b"\n"); - assert_eq!(screen.cursor_position(), (1, 0)); + parser.process(b"\n"); + assert_eq!(parser.screen().cursor_position(), (1, 0)); - screen.process(b"C"); - assert_eq!(screen.cursor_position(), (1, 1)); + parser.process(b"C"); + assert_eq!(parser.screen().cursor_position(), (1, 1)); } |