aboutsummaryrefslogtreecommitdiffstats
path: root/tests/escape.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-05 10:26:19 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-05 10:26:19 -0500
commit665238f5318bee40f254fe43aa158e61bdd25392 (patch)
tree19d2c6828a6263ec3b2b9ee44363774ecdaaca5c /tests/escape.rs
parentb24d69d51b3567f75630bb1b3a6875dac6e1c647 (diff)
downloadvt100-rust-665238f5318bee40f254fe43aa158e61bdd25392.tar.gz
vt100-rust-665238f5318bee40f254fe43aa158e61bdd25392.zip
contents_formatted should return a Vec<u8>
the overall terminal escape sequence byte stream is not necessarily utf8-safe, even if individual cell contents are
Diffstat (limited to 'tests/escape.rs')
-rw-r--r--tests/escape.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/escape.rs b/tests/escape.rs
index d2dd5b1..2c7d745 100644
--- a/tests/escape.rs
+++ b/tests/escape.rs
@@ -26,7 +26,7 @@ fn ris() {
assert_eq!(cell.contents(), "");
assert_eq!(parser.screen().contents(0, 0, 23, 79), "");
- assert_eq!(parser.screen().contents_formatted(0, 0, 23, 79), "");
+ assert_eq!(parser.screen().contents_formatted(0, 0, 23, 79), b"");
assert_eq!(parser.screen().title(), "");
assert_eq!(parser.screen().icon_name(), "");
@@ -64,7 +64,7 @@ fn ris() {
assert_eq!(parser.screen().contents(0, 0, 23, 79), "foo");
assert_eq!(
parser.screen().contents_formatted(0, 0, 23, 79),
- "f\x1b[31;47;1;3;4moo"
+ b"f\x1b[31;47;1;3;4moo"
);
assert_eq!(parser.screen().title(), "window title");
@@ -100,7 +100,7 @@ fn ris() {
assert_eq!(cell.contents(), "");
assert_eq!(parser.screen().contents(0, 0, 23, 79), "");
- assert_eq!(parser.screen().contents_formatted(0, 0, 23, 79), "");
+ assert_eq!(parser.screen().contents_formatted(0, 0, 23, 79), b"");
// title and icon name don't change with reset
assert_eq!(parser.screen().title(), "window title");
@@ -168,20 +168,20 @@ fn decsc() {
assert_eq!(parser.screen().cursor_position(), (4, 3));
assert_eq!(
parser.screen().contents_formatted(0, 0, 23, 79),
- "\r\n\r\n\r\n\r\n\x1b[31mfoo"
+ b"\r\n\r\n\r\n\r\n\x1b[31mfoo"
);
parser.process(b"\x1b[32m\x1b[?6lbar");
assert_eq!(parser.screen().cursor_position(), (0, 3));
assert_eq!(
parser.screen().contents_formatted(0, 0, 23, 79),
- "\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mfoo"
+ b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mfoo"
);
parser.process(b"\x1b8\x1b[Hz");
assert_eq!(parser.screen().cursor_position(), (4, 1));
assert_eq!(
parser.screen().contents_formatted(0, 0, 23, 79),
- "\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mzoo"
+ b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mzoo"
);
}