xref: /freebsd/contrib/bmake/unit-tests/varmod-sun-shell.mk (revision 02e9120893770924227138ba49df1edb3896112a)
1# $NetBSD: varmod-sun-shell.mk,v 1.2 2022/01/10 20:32:29 rillig Exp $
2#
3# Tests for the :sh variable modifier, which runs the shell command
4# given by the variable value and returns its output.
5#
6# This modifier has been added on 1996-05-29.
7#
8# See also:
9#	ApplyModifier_SunShell
10
11.if ${echo word:L:sh} != "word"
12.  error
13.endif
14
15# If the command exits with non-zero, an error message is printed.
16# XXX: Processing continues as usual though.
17.if ${echo word; false:L:sh} != "word"
18.  error
19.endif
20
21
22.MAKEFLAGS: -dv			# to see the actual command
23_:=	${echo word; ${:Ufalse}:L:sh}
24.MAKEFLAGS: -d0
25
26all:
27