1 # $NetBSD: varmod-exclam-shell.mk,v 1.3 2020/10/24 08:46:08 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.