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 82641b16e2292636d89d783bfeb6f07c5fe7c261
Author: Boris Faure <[email protected]>
AuthorDate: Sat Oct 31 11:30:25 2026 +0000

    tytest: checksum and dump the notifications sent
    
    The termio_notification_send() stub records each notification. The
    record is hashed only when non-empty, so no existing checksum moves,
    and printed by --dump.
    
    tests/xterm-osc-777.sh pins the OSC 777 behaviour before the OSC 99
    work touches that path.
---
 src/bin/tytest.c        |  9 +++++++++
 src/bin/tytest_common.c | 40 ++++++++++++++++++++++++++++++++++++----
 src/bin/tytest_common.h |  2 ++
 tests/tests.results     |  1 +
 tests/xterm-osc-777.sh  | 15 +++++++++++++++
 5 files changed, 63 insertions(+), 4 deletions(-)

diff --git a/src/bin/tytest.c b/src/bin/tytest.c
index 65ff6487..8358cb45 100644
--- a/src/bin/tytest.c
+++ b/src/bin/tytest.c
@@ -659,6 +659,13 @@ _tytest_checksum(Termpty *ty)
                   (unsigned char const*)ty->prop.cwd,
                   strlen(ty->prop.cwd));
      }
+   /* Hashed only when there are some, so tests that send none are unchanged. */
+   const char *notifications = tytest_notifications_get();
+   if (notifications)
+     {
+        MD5Update(&ctx, (unsigned char const*)notifications,
+                  strlen(notifications));
+     }
    /* Cursor shape */
    const char *cursor_shape = tytest_cursor_shape_get();
    MD5Update(&ctx, (unsigned char const*)cursor_shape,
@@ -806,6 +813,8 @@ _tytest_dump(Termpty *ty)
    printf("title=%s\n", ty->prop.title ? ty->prop.title : "(NULL)");
    printf("icon=%s\n", ty->prop.icon ? ty->prop.icon : "(NULL)");
    printf("cwd=%s\n", ty->prop.cwd ? ty->prop.cwd : "(NULL)");
+   printf("notifications=%s\n",
+          tytest_notifications_get() ? tytest_notifications_get() : "(none)");
 
    backlog_len = termpty_backlog_length(ty);
    printf("backlog rows=%d\n", (int)backlog_len);
diff --git a/src/bin/tytest_common.c b/src/bin/tytest_common.c
index 6c4fc5bd..bcb50420 100644
--- a/src/bin/tytest_common.c
+++ b/src/bin/tytest_common.c
@@ -670,15 +670,42 @@ termio_is_focused(const Evas_Object *obj EINA_UNUSED)
    return EINA_FALSE;
 }
 
+#if defined(BINARY_TYTEST)
+static Eina_Strbuf *_notifications = NULL;
+#endif
+
 void
 termio_notification_send(Evas_Object *obj EINA_UNUSED,
-                         const char *title EINA_UNUSED,
-                         const char *body EINA_UNUSED,
-                         Elm_Sys_Notify_Urgency urgency EINA_UNUSED,
-                         int timeout_ms EINA_UNUSED)
+                         const char *title, const char *body,
+                         Elm_Sys_Notify_Urgency urgency, int timeout_ms)
 {
+#if defined(BINARY_TYTEST)
+   if (!_notifications)
+     _notifications = eina_strbuf_new();
+   eina_strbuf_append_printf(_notifications,
+                             "notify urgency=%d timeout=%d title=%s body=%s\n",
+                             (int)urgency, timeout_ms,
+                             title ? title : "", body ? body : "");
+#else
+   (void)title; (void)body; (void)urgency; (void)timeout_ms;
+#endif
 }
 
+#if defined(BINARY_TYTEST)
+const char *
+tytest_notifications_get(void)
+{
+   return _notifications ? eina_strbuf_string_get(_notifications) : NULL;
+}
+
+void
+tytest_notifications_clear(void)
+{
+   if (_notifications)
+     eina_strbuf_reset(_notifications);
+}
+#endif
+
 static void
 _termpty_init(Termpty *ty, Config *config)
 {
@@ -834,6 +861,11 @@ tytest_common_shutdown(void)
    config_del(_config);
 #if defined(BINARY_TYTEST)
    free(_cells);
+   if (_notifications)
+     {
+        eina_strbuf_free(_notifications);
+        _notifications = NULL;
+     }
 #endif
 }
 
diff --git a/src/bin/tytest_common.h b/src/bin/tytest_common.h
index da74ed85..bcc92107 100644
--- a/src/bin/tytest_common.h
+++ b/src/bin/tytest_common.h
@@ -17,6 +17,8 @@ void tytest_common_shutdown(void);
 void tytest_common_set_fd(int fd);
 #if defined(BINARY_TYTEST)
 const char *tytest_cursor_shape_get(void);
+void tytest_notifications_clear(void);
+const char *tytest_notifications_get(void);
 Termpty *tytest_termpty_get(void);
 #endif
 
diff --git a/tests/tests.results b/tests/tests.results
index 6d5aaa19..b37b32c9 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -143,6 +143,7 @@ osc-4-set.sh fc0c231e5ae1fda14d355e22f56099c4
 osc-104.sh 773d4be48c4ef99cb5a34c59fe771e25
 osc-4-reset.sh 76f6b1317c3ced32c16da58c2967efb5
 osc-no-payload.sh 8aa7b12e298dfbeb5a48dcc48ea2f9a8
+xterm-osc-777.sh 5fa189116a5358ed87aec7460f3785ad
 osc-colors-ris.sh ae9b8008e2cb1fa2bae13a471c90733f
 osc-110-112.sh 318a0f4da4b07567353e057bb2de5b2b
 osc-colors-st.sh 84636d0d4589573e1e9b3c0fcceb2091
diff --git a/tests/xterm-osc-777.sh b/tests/xterm-osc-777.sh
new file mode 100755
index 00000000..05cbf792
--- /dev/null
+++ b/tests/xterm-osc-777.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# fill space with E
+printf '\033#8'
+
+# title and body
+printf '\033]777;notify;Build;finished\033\\'
+# the body keeps its semicolons
+printf '\033]777;notify;Build;a;b;c\007'
+# no body: dropped, as it always was
+printf '\033]777;notify;lonely\007'
+# not a notify command
+printf '\033]777;preexec;ls\007'
+# markup is the backend's business: recorded verbatim
+printf '\033]777;notify;<b>t</b>;x & y\033\\'

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

Reply via email to