aboutsummaryrefslogtreecommitdiffstats
path: root/tests/weird.rs
blob: 2a27583f0a9537730b983badb10f41974c77f3a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![allow(clippy::cognitive_complexity)]

#[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));
}