1# $NetBSD: varmod-sun-shell.mk,v 1.5 2024/07/04 17:47:54 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, a warning is printed. 16# expect+1: warning: while evaluating variable "echo word; (exit 13)" with value "echo word; (exit 13)": Command "echo word; (exit 13)" exited with status 13 17.if ${echo word; (exit 13):L:sh} != "word" 18. error 19.endif 20 21 22.MAKEFLAGS: -dv # to see the "Capturing" debug output 23# expect+1: warning: while evaluating variable "echo word; (exit 13)" with value "echo word; (exit 13)": Command "echo word; (exit 13)" exited with status 13 24_:= ${echo word; ${:U(exit 13)}:L:sh} 25.MAKEFLAGS: -d0 26 27 28all: 29