]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
nlcanon tests: Fix test failure on Solaris.
authorBruno Haible <bruno@clisp.org>
Mon, 11 Aug 2025 10:04:17 +0000 (12:04 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 11 Aug 2025 10:04:17 +0000 (12:04 +0200)
* tests/test-nlcanon.sh: Handle the --no-reexec option (from init.sh).

ChangeLog
tests/test-nlcanon.sh

index 7a62d7129b60edec7ec059fd68c3e0b47e3f2f49..0a44bca695656586fb9c92df7cf1b898ac36b29f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-08-11  Bruno Haible  <bruno@clisp.org>
+
+       nlcanon tests: Fix test failure on Solaris.
+       * tests/test-nlcanon.sh: Handle the --no-reexec option (from init.sh).
+
 2025-08-11  Bruno Haible  <bruno@clisp.org>
 
        nlcanon: Make it work on OpenBSD.
index ddcfc1cd9fca346c405067151051d7e581a01350..9ef2c49c8ea19f9a0a9831057b2de9920167b4ea 100755 (executable)
@@ -1,11 +1,6 @@
 #!/bin/sh
 
-if test $# != 0; then
-  # Callee.
-  printf 'stdout-contents\r\n'
-  printf 'stderr-contents\r\n' 1>&2
-  exit $1
-else
+if test $# = 0 || { test $# = 1 && test "x$1" = "x--no-reexec"; }; then
   # Unit test.
   . "${srcdir=.}/init.sh"; path_prepend_ .
 
@@ -64,4 +59,9 @@ else
   test $? != 0 || Exit 37
 
   Exit 0
+else
+  # Callee.
+  printf 'stdout-contents\r\n'
+  printf 'stderr-contents\r\n' 1>&2
+  exit $1
 fi