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
CI / platforms (windows-latest) (push) Successful in 1m27s
CI / platforms (ubuntu-24.04) (push) Successful in 3m3s
CI / macos (push) Successful in 19m49s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-17 01:42:06 -04:00
1 parent ef33a0d34e
commit 628ed6b8c5
7 files changed
+164 -27

No files matched your search

+14
View File
@@ -147,6 +147,20 @@ fn notifications_and_progress_reach_the_session_in_order() {
assert_eq!(ran.text, "x");
}
#[test]
fn osc_99_gathers_a_full_encoded_chunk_and_the_lines_base64_carries() {
let ran = run(
"printf '\\033]99;i=m:d=0:e=1;'; yes YWFh | head -n 1024 | tr -d '\\n'; printf '\\033\\\\\\033]99;i=m:d=0:e=1;RU5E\\033\\\\\\033]99;i=m:p=body:e=1;TGluZSAxCkxpbmUgMg==\\007x'",
(40, 4),
);
let [Ask::Show(notice)] = ran.asks.as_slice() else {
panic!("one notification: {:?}", ran.asks);
};
assert_eq!(notice.title, format!("{}END", "a".repeat(3072)));
assert_eq!(notice.body, "Line 1\nLine 2");
assert_eq!(ran.text, "x");
}
#[test]
fn a_long_escape_of_controls_keeps_the_pty_reading() {
let ran = run(