aboutsummaryrefslogtreecommitdiffstats
path: root/tests/control.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/control.rs')
-rw-r--r--tests/control.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/control.rs b/tests/control.rs
index 9392b5e..aba6915 100644
--- a/tests/control.rs
+++ b/tests/control.rs
@@ -3,12 +3,17 @@
#[test]
fn bel() {
let mut parser = vt100::Parser::default();
+ assert_eq!(parser.screen().audible_bell_count(), 0);
- assert!(!parser.screen_mut().check_audible_bell());
+ parser.process(b"\x07");
+ assert_eq!(parser.screen().audible_bell_count(), 1);
+ assert_eq!(parser.screen().audible_bell_count(), 1);
parser.process(b"\x07");
- assert!(parser.screen_mut().check_audible_bell());
- assert!(!parser.screen_mut().check_audible_bell());
+ assert_eq!(parser.screen().audible_bell_count(), 2);
+
+ parser.process(b"\x07\x07\x07");
+ assert_eq!(parser.screen().audible_bell_count(), 5);
}
#[test]