diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-04-26 03:37:41 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-04-26 03:37:41 -0400 |
commit | fdf0992b76aa267df76246bdc95eb5650a757d74 (patch) | |
tree | 45369fb67395a5cb0837fde719ceef07377b6626 /tests/basic.rs | |
parent | 2a05dd6e062b68f0940992903b4874c3d68a4f50 (diff) | |
download | vt100-rust-fdf0992b76aa267df76246bdc95eb5650a757d74.tar.gz vt100-rust-fdf0992b76aa267df76246bdc95eb5650a757d74.zip |
implement process_string and get_string_plaintext
Diffstat (limited to 'tests/basic.rs')
-rw-r--r-- | tests/basic.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/basic.rs b/tests/basic.rs index 68f718a..9178ded 100644 --- a/tests/basic.rs +++ b/tests/basic.rs @@ -6,8 +6,12 @@ mod tests { #[test] fn object_creation() { - let screen = vt100::Screen::new(24, 80); + let mut screen = vt100::Screen::new(24, 80); assert_eq!(screen.rows, 24); assert_eq!(screen.cols, 80); + + let input = "foo\x1b[31m\x1b[32mb\x1b[3;7;42ma\x1b[23mr"; + screen.process(input); + assert_eq!(screen.window_contents(0, 0, 0, 50), "foobar\n"); } } |