aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/varmod-sun-shell.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/varmod-sun-shell.mk')
-rw-r--r--contrib/bmake/unit-tests/varmod-sun-shell.mk14
1 files changed, 8 insertions, 6 deletions
diff --git a/contrib/bmake/unit-tests/varmod-sun-shell.mk b/contrib/bmake/unit-tests/varmod-sun-shell.mk
index 97acc5bd8c0f..8f6a5bc4cc05 100644
--- a/contrib/bmake/unit-tests/varmod-sun-shell.mk
+++ b/contrib/bmake/unit-tests/varmod-sun-shell.mk
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-sun-shell.mk,v 1.2 2022/01/10 20:32:29 rillig Exp $
+# $NetBSD: varmod-sun-shell.mk,v 1.6 2024/08/29 20:20:37 rillig Exp $
#
# Tests for the :sh variable modifier, which runs the shell command
# given by the variable value and returns its output.
@@ -12,15 +12,17 @@
. error
.endif
-# If the command exits with non-zero, an error message is printed.
-# XXX: Processing continues as usual though.
-.if ${echo word; false:L:sh} != "word"
+# If the command exits with non-zero, a warning is printed.
+# expect+1: warning: Command "echo word; (exit 13)" exited with status 13
+.if ${echo word; (exit 13):L:sh} != "word"
. error
.endif
-.MAKEFLAGS: -dv # to see the actual command
-_:= ${echo word; ${:Ufalse}:L:sh}
+.MAKEFLAGS: -dv # to see the "Capturing" debug output
+# expect+1: warning: Command "echo word; (exit 13)" exited with status 13
+_:= ${echo word; ${:U(exit 13)}:L:sh}
.MAKEFLAGS: -d0
+
all: