diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-01 13:20:38 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-01 13:53:32 -0400 |
commit | 96f9c0e249d6434606fa1613619b89dba03979ba (patch) | |
tree | d18a206ab63523d189db66f30fc0c0777f6fd3f9 /tests/control.rs | |
parent | 91726d4e0695ac4914885aada3304992e51bfb7f (diff) | |
download | vt100-rust-96f9c0e249d6434606fa1613619b89dba03979ba.tar.gz vt100-rust-96f9c0e249d6434606fa1613619b89dba03979ba.zip |
implement vt and ff
Diffstat (limited to 'tests/control.rs')
-rw-r--r-- | tests/control.rs | 22 |
1 files changed, 19 insertions, 3 deletions
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"); @@ -83,6 +84,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); |