From 96f9c0e249d6434606fa1613619b89dba03979ba Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 1 Nov 2019 13:20:38 -0400 Subject: implement vt and ff --- tests/control.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'tests/control.rs') diff --git a/tests/control.rs b/tests/control.rs index b9ae147..accc17e 100644 --- a/tests/control.rs +++ b/tests/control.rs @@ -60,11 +60,12 @@ fn tab() { ); } -#[test] -fn lf() { +fn lf_with(b: u8) { let mut screen = vt100::Screen::new(24, 80); - screen.process(b"foo\nbar"); + screen.process(b"foo"); + screen.process(&[b]); + screen.process(b"bar"); assert_eq!(screen.cell(0, 0).unwrap().contents(), "f"); assert_eq!(screen.cell(0, 1).unwrap().contents(), "o"); assert_eq!(screen.cell(0, 2).unwrap().contents(), "o"); @@ -82,6 +83,21 @@ fn lf() { ); } +#[test] +fn lf() { + lf_with(b'\x0a'); +} + +#[test] +fn vt() { + lf_with(b'\x0b'); +} + +#[test] +fn ff() { + lf_with(b'\x0c'); +} + #[test] fn cr() { let mut screen = vt100::Screen::new(24, 80); -- cgit v1.2.3-54-g00ecf