aboutsummaryrefslogtreecommitdiffstats
path: root/tests/osc.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-29 14:24:28 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-29 14:24:28 -0400
commit267f7452949617375c8570caf4b03b434e3350e8 (patch)
tree517ba3be3617c8ca60e804b1e033388e069c37b0 /tests/osc.rs
parentf84638fd816d2295c5d9f60c0ac8eb6df50d1aba (diff)
downloadvt100-rust-267f7452949617375c8570caf4b03b434e3350e8.tar.gz
vt100-rust-267f7452949617375c8570caf4b03b434e3350e8.zip
basic structure of vte parser
Diffstat (limited to 'tests/osc.rs')
-rw-r--r--tests/osc.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/osc.rs b/tests/osc.rs
index be3c476..001ad53 100644
--- a/tests/osc.rs
+++ b/tests/osc.rs
@@ -1,15 +1,12 @@
-mod support;
-use support::TestHelpers;
-
#[test]
fn title() {
let mut screen = vt100::Screen::new(24, 80);
assert!(screen.title().is_none());
assert!(screen.icon_name().is_none());
- screen.assert_process(b"\x1b]2;it's a title\x07");
+ screen.process(b"\x1b]2;it's a title\x07");
assert_eq!(screen.title().unwrap(), "it's a title");
assert!(screen.icon_name().is_none());
- screen.assert_process(b"\x1b]2;\x07");
+ screen.process(b"\x1b]2;\x07");
assert_eq!(screen.title().unwrap(), "");
assert!(screen.icon_name().is_none());
}
@@ -19,10 +16,10 @@ fn icon_name() {
let mut screen = vt100::Screen::new(24, 80);
assert!(screen.title().is_none());
assert!(screen.icon_name().is_none());
- screen.assert_process(b"\x1b]1;it's an icon name\x07");
+ screen.process(b"\x1b]1;it's an icon name\x07");
assert!(screen.title().is_none());
assert_eq!(screen.icon_name().unwrap(), "it's an icon name");
- screen.assert_process(b"\x1b]1;\x07");
+ screen.process(b"\x1b]1;\x07");
assert!(screen.title().is_none());
assert_eq!(screen.icon_name().unwrap(), "");
}
@@ -32,10 +29,10 @@ fn title_icon_name() {
let mut screen = vt100::Screen::new(24, 80);
assert!(screen.title().is_none());
assert!(screen.icon_name().is_none());
- screen.assert_process(b"\x1b]0;it's both\x07");
+ screen.process(b"\x1b]0;it's both\x07");
assert_eq!(screen.title().unwrap(), "it's both");
assert_eq!(screen.icon_name().unwrap(), "it's both");
- screen.assert_process(b"\x1b]0;\x07");
+ screen.process(b"\x1b]0;\x07");
assert_eq!(screen.title().unwrap(), "");
assert_eq!(screen.icon_name().unwrap(), "");
}
@@ -44,6 +41,6 @@ fn title_icon_name() {
fn unknown_sequence() {
let mut screen = vt100::Screen::new(24, 80);
assert_eq!(screen.cell(0, 0).unwrap().contents(), "");
- screen.assert_process(b"\x1b]499;some long, long string?\x07");
+ screen.process(b"\x1b]499;some long, long string?\x07");
assert_eq!(screen.cell(0, 0).unwrap().contents(), "");
}