1 # $NetBSD: varmod-exclam-shell.mk,v 1.2 2020/08/16 12:48:55 rillig Exp $
3 # Tests for the :!cmd! variable modifier.
5 .if ${:!echo hello | tr 'l' 'l'!} != "hello"
9 # The output is truncated at the first null byte.
10 # Cmd_Exec returns only a string pointer without length information.
11 .if ${:!echo hello | tr 'l' '\0'!} != "he"
16 .warning A newline at the end of the output must be stripped.
19 .if ${:!echo;echo!} != " "
20 .warning Only a single newline at the end of the output is stripped.
23 .if ${:!echo;echo;echo;echo!} != " "
24 .warning Other newlines in the output are converted to spaces.