Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for null byte in t...
details: https://anonhg.NetBSD.org/src/rev/a00753540171
branches: trunk
changeset: 937120:a00753540171
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 09 09:17:19 2020 +0000
description:
make(1): add test for null byte in the output of a command
diffstat:
usr.bin/make/unit-tests/modmisc.mk | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r cbf6f72e32c7 -r a00753540171 usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk Sun Aug 09 09:11:41 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk Sun Aug 09 09:17:19 2020 +0000
@@ -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 @@
.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
Home |
Main Index |
Thread Index |
Old Index