diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-29 05:21:54 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-05 12:54:34 -0500 |
commit | a0cbd79c92f9a4703f254291d7fbffaa2c84ffb0 (patch) | |
tree | f135beab16e7abcd85a9cc04d23bf33ae564aab5 /tests | |
parent | 3fbc74f513a5a691dd99705598c3023f3b8bc173 (diff) | |
download | vt100-rust-a0cbd79c92f9a4703f254291d7fbffaa2c84ffb0.tar.gz vt100-rust-a0cbd79c92f9a4703f254291d7fbffaa2c84ffb0.zip |
ensure cells with contents always have width
it gets ambiguous where the zero-width characters should go otherwise
Diffstat (limited to 'tests')
-rw-r--r-- | tests/text.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs index d153f11..74001d1 100644 --- a/tests/text.rs +++ b/tests/text.rs @@ -167,6 +167,12 @@ fn combining() { parser.process("\x1b[H\x1b[Ja\u{0301}".as_bytes()); assert_eq!(parser.screen().cell(0, 0).unwrap().contents(), "a\u{0301}"); assert_eq!(parser.screen().cell(0, 1).unwrap().contents(), ""); + + parser.process("\x1b[H\x1b[J\x1b[2C\u{0301}".as_bytes()); + assert_eq!(parser.screen().cell(0, 0).unwrap().contents(), ""); + assert_eq!(parser.screen().cell(0, 1).unwrap().contents(), " \u{0301}"); + assert_eq!(parser.screen().cell(0, 2).unwrap().contents(), ""); + assert_eq!(parser.screen().cell(0, 3).unwrap().contents(), ""); } #[test] |