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 :H and :T modi...



details:   https://anonhg.NetBSD.org/src/rev/3fe3d8af4d9d
branches:  trunk
changeset: 973524:3fe3d8af4d9d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 03 15:22:35 2020 +0000

description:
make(1): add test for :H and :T modifiers with several words

diffstat:

 usr.bin/make/unit-tests/modmisc.exp |  6 ++----
 usr.bin/make/unit-tests/modmisc.mk  |  8 +++-----
 2 files changed, 5 insertions(+), 9 deletions(-)

diffs (33 lines):

diff -r 46efc994a907 -r 3fe3d8af4d9d usr.bin/make/unit-tests/modmisc.exp
--- a/usr.bin/make/unit-tests/modmisc.exp       Fri Jul 03 14:59:17 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.exp       Fri Jul 03 15:22:35 2020 +0000
@@ -7,8 +7,6 @@
 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
diff -r 46efc994a907 -r 3fe3d8af4d9d usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk        Fri Jul 03 14:59:17 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk        Fri Jul 03 15:22:35 2020 +0000
@@ -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 @@
        @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}'"



Home | Main Index | Thread Index | Old Index