This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch tymux-10-quiet-head
in repository terminology.

View the commit online.

commit 542e396d17442427f0d7fe54ea0addb36241d523
Author: Boris Faure <[email protected]>
AuthorDate: Thu Nov 5 16:35:39 2026 +0000

    tests: add osc-8.sh to check hyperlinks
    
    Covers OSC 8 with and without an id parameter, the empty close, closes
    without a pending link, a missing ';' and empty URLs. The terminal
    state is unchanged by the leak fix that precedes it, so the regression
    is caught by the LeakSanitizer runs of the escape-codes suite.
---
 tests/osc-8.sh      | 33 +++++++++++++++++++++++++++++++++
 tests/tests.results |  1 +
 2 files changed, 34 insertions(+)

diff --git a/tests/osc-8.sh b/tests/osc-8.sh
new file mode 100755
index 00000000..b78b6d89
--- /dev/null
+++ b/tests/osc-8.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# OSC 8 hyperlinks: open, dereference-free close, and the malformed shapes
+# that must all land in a deterministic state, leaks included.
+
+# opening with a URI, closed by an empty one
+printf '\033]8;id=home;http://terminology.example/\033\\'
+printf 'home page\033]8;;\033\\'
+
+# same, but opened and closed with BEL
+printf '\033]8;id=character;http://terminology.example/#main\-char\007'
+printf 'characters\033]8;;\007'
+
+# no id parameter
+printf '\033]8;;http://terminology.example/plain\033\\'
+printf 'plain link\033]8;;\033\\'
+
+# several parameters, one with a colon, as some apps emit
+printf '\033]8;id=x:y;foo=bar;http://terminology.example/params\033\\'
+printf 'parameters\033]8;\033\\'
+
+# a close without an open logs an error and changes nothing
+printf '\033]8;;\033\\'
+
+# a second close while none is pending logs an error too
+printf '\033]8;id=one;http://a.example/1\033\\\033]8;;\033\\\033]8;;\033\\'
+
+# a missing ';' separator is an error; empty parameter parts are not
+printf '\033]8;nosemi http://terminology.example/nosemi\033\\\033]8;;\033\\'
+
+# an empty URL and a payload with nothing after it
+printf '\033]8;id=empty;\033\\\033]8;;\033\\'
+printf '\033]8;\033\\'
diff --git a/tests/tests.results b/tests/tests.results
index 837c9dcb..e1d0fdea 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -212,4 +212,5 @@ csi-c0.sh eae470a815753e4af0a094089ca16fc9
 dcs-full-buffer.sh f4cb1513ca59539f373e8d389e6ac01d
 csi-abort.sh 9dcaf308eaedd756a5f451ada391ba3e
 csi-shift.sh 1514d14cac76eb4d43f2a99a0c06179d
+osc-8.sh d8810df219faf4a8fe84fd08ed922695
 osc-long.sh a94cb70dd58d07f52bbdf0cc5e7b95e1

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to