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
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user