blob: 739b75c43bd74fcd19efc7f2250c9a7ac9f0c949 (
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");
}
}
|