Module Name:    src
Committed By:   rillig
Date:           Sun Aug  9 09:17:19 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: modmisc.mk

Log Message:
make(1): add test for null byte in the output of a command


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/unit-tests/modmisc.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.39 src/usr.bin/make/unit-tests/modmisc.mk:1.40
--- src/usr.bin/make/unit-tests/modmisc.mk:1.39	Sun Aug  9 08:03:31 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk	Sun Aug  9 09:17:19 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.39 2020/08/09 08:03:31 rillig Exp $
+# $Id: modmisc.mk,v 1.40 2020/08/09 09:17:19 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -401,3 +401,17 @@ mod-range:
 .if ${value:L:${:Dempty}S,a,A,} != "vAlue"
 .warning unexpected
 .endif
+
+# begin mod-shell
+
+.if ${:!echo hello | tr 'l' 'l'!} != "hello"
+.warning unexpected
+.endif
+
+# The output is truncated at the first null byte.
+# Cmd_Exec returns only a string pointer without length information.
+.if ${:!echo hello | tr 'l' '\0'!} != "he"
+.warning unexpected
+.endif
+
+# end mod-shell

Reply via email to