Module Name: src
Committed By: rillig
Date: Fri Jul 3 15:22:35 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk
Log Message:
make(1): add test for :H and :T modifiers with several words
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/modmisc.exp \
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.exp
diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.2 src/usr.bin/make/unit-tests/modmisc.exp:1.3
--- src/usr.bin/make/unit-tests/modmisc.exp:1.2 Fri Jul 3 14:59:17 2020
+++ src/usr.bin/make/unit-tests/modmisc.exp Fri Jul 3 15:22:35 2020
@@ -7,8 +7,6 @@ path_/usr/xbin=/opt/xbin/
paths=/bin /tmp / /no/such/dir /opt/xbin
PATHS=/BIN /TMP / /NO/SUCH/DIR /OPT/XBIN
The answer is 42
-head of a/b/c is a/b
-tail of a/b/c is c
-head of abc is .
-tail of abc is abc
+head of 'a/b/c def' is 'a/b .'
+tail of 'a/b/c def' is 'c def'
exit status 0
Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.2 src/usr.bin/make/unit-tests/modmisc.mk:1.3
--- src/usr.bin/make/unit-tests/modmisc.mk:1.2 Fri Jul 3 14:59:17 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk Fri Jul 3 15:22:35 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.2 2020/07/03 14:59:17 rillig Exp $
+# $Id: modmisc.mk,v 1.3 2020/07/03 15:22:35 rillig Exp $
#
# miscellaneous modifier tests
@@ -38,7 +38,5 @@ modvarloop:
@echo "PATHS=${paths:tu}"
modhead:
- @echo "head of a/b/c is ${a/b/c:L:H}"
- @echo "tail of a/b/c is ${a/b/c:L:T}"
- @echo "head of abc is ${abc:L:H}"
- @echo "tail of abc is ${abc:L:T}"
+ @echo "head of 'a/b/c def' is '${a/b/c def:L:H}'"
+ @echo "tail of 'a/b/c def' is '${a/b/c def:L:T}'"