* tests/init.sh (returns_): Restore tracing if it was enabled before.
+2024-06-11 Bruno Haible <bruno@clisp.org>
+
+ test-framework-sh: Fix 'returns_' to not turn off tracing permanently.
+ * tests/init.sh (returns_): Restore tracing if it was enabled before.
+
2024-06-09 Bruno Haible <bruno@clisp.org>
c32width tests: Avoid a test failure on Solaris 11 OpenIndiana, OmniOS.
# returns_ 1 command ... || fail
returns_ () {
# Disable tracing so it doesn't interfere with stderr of the wrapped command
+ local is_tracing=`{ :; } 2>&1`
{ set +x; } 2>/dev/null
local exp_exit="$1"
"$@"
test $? -eq $exp_exit && ret_=0 || ret_=1
- if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+ # Restore tracing if it was enabled.
+ if test -n "$is_tracing"; then
set -x
fi
{ return $ret_; } 2>/dev/null