blob: 9178ded715afa0ae79178e9e63014bc3ccc0391a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
extern crate vt100;
#[cfg(test)]
mod tests {
use vt100;
#[test]
fn object_creation() {
let mut screen = vt100::Screen::new(24, 80);
assert_eq!(screen.rows, 24);
assert_eq!(screen.cols, 80);
let input = "foo\x1b[31m\x1b[32mb\x1b[3;7;42ma\x1b[23mr";
screen.process(input);
assert_eq!(screen.window_contents(0, 0, 0, 50), "foobar\n");
}
}
|