]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0943: test: test_hardcopy fails on GTK4 UI v9.2.0943
authorFoxe Chen <chen.foxe@gmail.com>
Tue, 11 Aug 2026 19:42:18 +0000 (19:42 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 11 Aug 2026 19:42:18 +0000 (19:42 +0000)
Problem:  test: test_hardcopy fails on GTK4 UI, because it opens a
          dialog
Solution: Use :hardcopy! to skip the dialog, set GDK_DEBUG=no-portals
          environment variable (Foxe Chen)

closes: #21009

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
.github/workflows/ci-linux.yml
.github/workflows/ci-linux_asan.yml
src/testdir/test_hardcopy.vim
src/version.c

index e91a267ac5c31332d080b01b7ce5ef3886b86cd0..57e197a61bbeba210a3b35618996f53a45e340d8 100644 (file)
@@ -29,6 +29,7 @@ jobs:
       DISPLAY: ":99"
       WAYLAND_DISPLAY: "/tmp/weston_sock"
       GTK_A11Y: "none"
+      GDK_DEBUG: "no-portals"
       DEBIAN_FRONTEND: noninteractive
 
     strategy:
index cbba1c05a789454bea1470d639ac4cb41694eced..2b92ba1b21477a370ccbb529fcc79c44552b79a3 100644 (file)
@@ -27,6 +27,7 @@ jobs:
       DISPLAY: ":99"
       WAYLAND_DISPLAY: "/tmp/weston_sock"
       GTK_A11Y: "none"
+      GDK_DEBUG: "no-portals"
       DEBIAN_FRONTEND: noninteractive
 
     strategy:
index 62065139c7ced19cca27fc6e76365c7fb57f8468..94a252637292c8c69a0d58005076959ebbdf8634 100644 (file)
@@ -118,7 +118,7 @@ func Test_printexpr()
   set printexpr=PrintFile(v:fname_in)
 
   help help
-  hardcopy dummy args
+  hardcopy! dummy args
   call assert_equal(['Test printexpr: dummy args'],
   \                 readfile('Xhardcopy_printexpr'))
   call delete('Xhardcopy_printexpr')
@@ -129,7 +129,7 @@ func Test_printexpr()
     return 1
   endfunc
   set printexpr=PrintFails(v:fname_in)
-  call assert_fails('hardcopy', 'E365:')
+  call assert_fails('hardcopy!', 'E365:')
 
   " Using a script-local function
   func s:NewPrintExpr()
@@ -175,7 +175,7 @@ func Test_empty_buffer()
   HasPostscript
 
   new
-  call assert_equal("\nNo text to be printed", execute('hardcopy'))
+  call assert_equal("\nNo text to be printed", execute('hardcopy!'))
   bwipe
 endfunc
 
index ee33eafee2c9ce91213742ada0a82ec5fdced173..320a46c3ff54004d43754d1e03eac3662aff6dfa 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    943,
 /**/
     942,
 /**/