aboutsummaryrefslogtreecommitdiffstats
path: root/tests/escape.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-03 13:54:34 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-03 13:54:34 -0500
commit3fb01c1d74debdb4c8fd7395f7a2e0671dfac46b (patch)
treedacde910750bdbf072eecb9c4a6de1322f123235 /tests/escape.rs
parent7a915a84819ef52561306c74ec813f57974265d2 (diff)
downloadvt100-rust-3fb01c1d74debdb4c8fd7395f7a2e0671dfac46b.tar.gz
vt100-rust-3fb01c1d74debdb4c8fd7395f7a2e0671dfac46b.zip
clean up public api a bit
Diffstat (limited to 'tests/escape.rs')
-rw-r--r--tests/escape.rs52
1 files changed, 27 insertions, 25 deletions
diff --git a/tests/escape.rs b/tests/escape.rs
index cf46241..999074c 100644
--- a/tests/escape.rs
+++ b/tests/escape.rs
@@ -48,16 +48,17 @@ fn ris() {
assert!(!screen.underline());
assert!(!screen.inverse());
- assert!(!screen.hide_cursor());
+ assert!(!screen.check_visual_bell());
+ assert!(!screen.check_audible_bell());
assert!(!screen.application_keypad());
assert!(!screen.application_cursor());
- assert!(!screen.mouse_reporting_press());
- assert!(!screen.mouse_reporting_press_release());
- assert!(!screen.mouse_reporting_button_motion());
- assert!(!screen.mouse_reporting_sgr_mode());
+ assert!(!screen.hide_cursor());
assert!(!screen.bracketed_paste());
- assert!(!screen.check_visual_bell());
- assert!(!screen.check_audible_bell());
+ assert_eq!(screen.mouse_protocol_mode(), vt100::MouseProtocolMode::None);
+ assert_eq!(
+ screen.mouse_protocol_encoding(),
+ vt100::MouseProtocolEncoding::Default
+ );
screen.process(b"f\x1b[31m\x1b[47;1;3;4moo\x1b[7m\x1b[21;21H\x1b]2;window title\x07\x1b]1;window icon name\x07\x1b[?25l\x1b[?1h\x1b=\x1b[?9h\x1b[?1000h\x1b[?1006h\x1b[?2004h\x07\x1bg");
@@ -83,18 +84,20 @@ fn ris() {
assert!(screen.underline());
assert!(screen.inverse());
- assert!(screen.hide_cursor());
+ assert!(screen.check_visual_bell());
+ assert!(screen.check_audible_bell());
assert!(screen.application_keypad());
assert!(screen.application_cursor());
- assert!(!screen.mouse_reporting_press());
- assert!(screen.mouse_reporting_press_release());
- assert!(!screen.mouse_reporting_button_motion());
- assert!(!screen.mouse_reporting_any_motion());
- assert!(screen.mouse_reporting_sgr_mode());
- assert!(!screen.mouse_reporting_utf8_mode());
+ assert!(screen.hide_cursor());
assert!(screen.bracketed_paste());
- assert!(screen.check_visual_bell());
- assert!(screen.check_audible_bell());
+ assert_eq!(
+ screen.mouse_protocol_mode(),
+ vt100::MouseProtocolMode::PressRelease
+ );
+ assert_eq!(
+ screen.mouse_protocol_encoding(),
+ vt100::MouseProtocolEncoding::Sgr
+ );
screen.process(b"\x1bc");
assert_eq!(screen.cursor_position(), (0, 0));
@@ -123,18 +126,17 @@ fn ris() {
assert!(!screen.underline());
assert!(!screen.inverse());
- assert!(!screen.hide_cursor());
+ assert!(!screen.check_visual_bell());
+ assert!(!screen.check_audible_bell());
assert!(!screen.application_keypad());
assert!(!screen.application_cursor());
- assert!(!screen.mouse_reporting_press());
- assert!(!screen.mouse_reporting_press_release());
- assert!(!screen.mouse_reporting_button_motion());
- assert!(!screen.mouse_reporting_any_motion());
- assert!(!screen.mouse_reporting_utf8_mode());
- assert!(!screen.mouse_reporting_sgr_mode());
+ assert!(!screen.hide_cursor());
assert!(!screen.bracketed_paste());
- assert!(!screen.check_visual_bell());
- assert!(!screen.check_audible_bell());
+ assert_eq!(screen.mouse_protocol_mode(), vt100::MouseProtocolMode::None);
+ assert_eq!(
+ screen.mouse_protocol_encoding(),
+ vt100::MouseProtocolEncoding::Default
+ );
}
#[test]