T37: review round 1: OSC 99 reads base64 group by group, so chunks split before encoding or after join, and the text, any UTF-8, is checked once whole; plain text alone refuses controls; a chunk that breaks a rule drops what its notification gathered; the tap keeps an OSC 99 body to its metadata and a full payload
This commit is contained in:
7 files changed
+164
-27
No files matched your search
@@ -74,6 +74,13 @@ fn an_overlong_body_is_dropped() {
|
||||
assert_eq!(scan(&[&long, b"\x1b]7;b\x07"]), ["7;b"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_osc_99_body_holds_its_metadata_and_a_full_payload() {
|
||||
let osc = |length: usize| [&b"\x1b]99;"[..], &vec![b'a'; length - 3], b"\x07"].concat();
|
||||
assert_eq!(scan(&[&osc(notify::BODY)]).concat().len(), notify::BODY);
|
||||
assert!(scan(&[&osc(notify::BODY + 1)]).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mouse_modes_follow_private_modes_in_order_across_reads() {
|
||||
use crate::term::mouse::{Format, Tracking};
|
||||
|
||||
Reference in new issue
Block a user