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 tests for variable modi...



details:   https://anonhg.NetBSD.org/src/rev/b2ce5f3cc282
branches:  trunk
changeset: 958043:b2ce5f3cc282
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 20 22:57:40 2020 +0000

description:
make(1): add tests for variable modifiers on trailing slashes

diffstat:

 usr.bin/make/unit-tests/varmod-extension.exp |  1 +
 usr.bin/make/unit-tests/varmod-extension.mk  |  4 ++--
 usr.bin/make/unit-tests/varmod-head.exp      |  1 +
 usr.bin/make/unit-tests/varmod-head.mk       |  4 ++--
 usr.bin/make/unit-tests/varmod-root.exp      |  1 +
 usr.bin/make/unit-tests/varmod-root.mk       |  4 ++--
 usr.bin/make/unit-tests/varmod-tail.exp      |  1 +
 usr.bin/make/unit-tests/varmod-tail.mk       |  4 ++--
 8 files changed, 12 insertions(+), 8 deletions(-)

diffs (96 lines):

diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-extension.exp
--- a/usr.bin/make/unit-tests/varmod-extension.exp      Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-extension.exp      Sun Dec 20 22:57:40 2020 +0000
@@ -7,4 +7,5 @@
 extension of '.gitignore' is 'gitignore'
 extension of 'a' is ''
 extension of 'a.a' is 'a'
+extension of 'trailing/' is ''
 exit status 0
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-extension.mk
--- a/usr.bin/make/unit-tests/varmod-extension.mk       Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-extension.mk       Sun Dec 20 22:57:40 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: varmod-extension.mk,v 1.3 2020/08/23 15:09:15 rillig Exp $
+# $NetBSD: varmod-extension.mk,v 1.4 2020/12/20 22:57:40 rillig Exp $
 #
 # Tests for the :E variable modifier, which returns the filename extension
 # of each word in the variable.
 
 all:
-.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a
+.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
        @echo "extension of '"${path:Q}"' is '"${path:E:Q}"'"
 .endfor
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-head.exp
--- a/usr.bin/make/unit-tests/varmod-head.exp   Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-head.exp   Sun Dec 20 22:57:40 2020 +0000
@@ -7,4 +7,5 @@
 head (dirname) of '.gitignore' is '.'
 head (dirname) of 'a' is '.'
 head (dirname) of 'a.a' is '.'
+head (dirname) of 'trailing/' is 'trailing'
 exit status 0
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-head.mk
--- a/usr.bin/make/unit-tests/varmod-head.mk    Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-head.mk    Sun Dec 20 22:57:40 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: varmod-head.mk,v 1.3 2020/08/23 15:09:15 rillig Exp $
+# $NetBSD: varmod-head.mk,v 1.4 2020/12/20 22:57:40 rillig Exp $
 #
 # Tests for the :H variable modifier, which returns the dirname of
 # each of the words in the variable value.
 
 all:
-.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a
+.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
        @echo "head (dirname) of '"${path:Q}"' is '"${path:H:Q}"'"
 .endfor
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-root.exp
--- a/usr.bin/make/unit-tests/varmod-root.exp   Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-root.exp   Sun Dec 20 22:57:40 2020 +0000
@@ -7,4 +7,5 @@
 root of '.gitignore' is ''
 root of 'a' is 'a'
 root of 'a.a' is 'a'
+root of 'trailing/' is 'trailing/'
 exit status 0
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-root.mk
--- a/usr.bin/make/unit-tests/varmod-root.mk    Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-root.mk    Sun Dec 20 22:57:40 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: varmod-root.mk,v 1.3 2020/08/23 15:09:15 rillig Exp $
+# $NetBSD: varmod-root.mk,v 1.4 2020/12/20 22:57:40 rillig Exp $
 #
 # Tests for the :R variable modifier, which returns the filename root
 # without the extension.
 
 all:
-.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a
+.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
        @echo "root of '"${path:Q}"' is '"${path:R:Q}"'"
 .endfor
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-tail.exp
--- a/usr.bin/make/unit-tests/varmod-tail.exp   Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-tail.exp   Sun Dec 20 22:57:40 2020 +0000
@@ -7,4 +7,5 @@
 tail (basename) of '.gitignore' is '.gitignore'
 tail (basename) of 'a' is 'a'
 tail (basename) of 'a.a' is 'a.a'
+tail (basename) of 'trailing/' is ''
 exit status 0
diff -r 3aff4f624865 -r b2ce5f3cc282 usr.bin/make/unit-tests/varmod-tail.mk
--- a/usr.bin/make/unit-tests/varmod-tail.mk    Sun Dec 20 22:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-tail.mk    Sun Dec 20 22:57:40 2020 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: varmod-tail.mk,v 1.3 2020/08/23 15:09:15 rillig Exp $
+# $NetBSD: varmod-tail.mk,v 1.4 2020/12/20 22:57:40 rillig Exp $
 #
 # Tests for the :T variable modifier, which returns the basename of each of
 # the words in the variable value.
 
 all:
-.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a
+.for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
        @echo "tail (basename) of '"${path:Q}"' is '"${path:T:Q}"'"
 .endfor



Home | Main Index | Thread Index | Old Index