aboutsummaryrefslogtreecommitdiffstats
path: root/tests/weird.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-12-05 03:13:37 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-06 21:26:07 -0500
commit3d8e234c1bcdae6e83465d08158188e76aa1aae9 (patch)
tree61aaa65ce08b0b917b8b6deb96b1a72d632b3616 /tests/weird.rs
parent820acef50154e1fbfd1559d4113c0a83505a9612 (diff)
downloadvt100-rust-3d8e234c1bcdae6e83465d08158188e76aa1aae9.tar.gz
vt100-rust-3d8e234c1bcdae6e83465d08158188e76aa1aae9.zip
convert tests to fixtures
Diffstat (limited to 'tests/weird.rs')
-rw-r--r--tests/weird.rs17
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/weird.rs b/tests/weird.rs
index 2a27583..bae2aeb 100644
--- a/tests/weird.rs
+++ b/tests/weird.rs
@@ -1,19 +1,6 @@
-#![allow(clippy::cognitive_complexity)]
+mod helpers;
#[test]
fn intermediate_control() {
- let mut parser = vt100::Parser::default();
- assert_eq!(parser.screen().cursor_position(), (0, 0));
-
- parser.process(b"\x1b");
- assert_eq!(parser.screen().cursor_position(), (0, 0));
-
- parser.process(b"[");
- assert_eq!(parser.screen().cursor_position(), (0, 0));
-
- parser.process(b"\n");
- assert_eq!(parser.screen().cursor_position(), (1, 0));
-
- parser.process(b"C");
- assert_eq!(parser.screen().cursor_position(), (1, 1));
+ helpers::fixture("intermediate_control");
}