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 Fix directive-unexport to focus only...



details:   https://anonhg.NetBSD.org/src/rev/b460335fbc6c
branches:  trunk
changeset: 945467:b460335fbc6c
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri Oct 30 23:54:42 2020 +0000

description:
Fix directive-unexport to focus only on the variables we care about

diffstat:

 usr.bin/make/unit-tests/directive-unexport.exp |   6 +++---
 usr.bin/make/unit-tests/directive-unexport.mk  |  14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r eabcb79d14b6 -r b460335fbc6c usr.bin/make/unit-tests/directive-unexport.exp
--- a/usr.bin/make/unit-tests/directive-unexport.exp    Fri Oct 30 22:55:34 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-unexport.exp    Fri Oct 30 23:54:42 2020 +0000
@@ -1,5 +1,5 @@
-make: "directive-unexport.mk" line 14: A=a B=b C=c
-make: "directive-unexport.mk" line 15: A B C
-make: "directive-unexport.mk" line 23: A=a B=b C=c
+make: "directive-unexport.mk" line 14: UT_A=a UT_B=b UT_C=c
+make: "directive-unexport.mk" line 15: UT_A UT_B UT_C
+make: "directive-unexport.mk" line 23: UT_A=a UT_B=b UT_C=c
 make: "directive-unexport.mk" line 24: 
 exit status 0
diff -r eabcb79d14b6 -r b460335fbc6c usr.bin/make/unit-tests/directive-unexport.mk
--- a/usr.bin/make/unit-tests/directive-unexport.mk     Fri Oct 30 22:55:34 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-unexport.mk     Fri Oct 30 23:54:42 2020 +0000
@@ -1,17 +1,17 @@
-# $NetBSD: directive-unexport.mk,v 1.3 2020/10/30 17:55:10 rillig Exp $
+# $NetBSD: directive-unexport.mk,v 1.4 2020/10/30 23:54:42 sjg Exp $
 #
 # Tests for the .unexport directive.
 
 # TODO: Implementation
 
 # First, export 3 variables.
-A=     a
-B=     b
-C=     c
-.export A B C
+UT_A=  a
+UT_B=  b
+UT_C=  c
+.export UT_A UT_B UT_C
 
 # Show the exported variables and their values.
-.info ${:!env|sort|grep -v -E '^(MAKELEVEL|MALLOC_OPTIONS|PATH|PWD)'!}
+.info ${:!env|sort|grep '^UT_'!}
 .info ${.MAKE.EXPORTED}
 
 # XXX: Now try to unexport all of them.  The variables are still exported
@@ -20,7 +20,7 @@
 *=     asterisk
 .unexport *
 
-.info ${:!env|sort|grep -v -E '^(MAKELEVEL|MALLOC_OPTIONS|PATH|PWD)'!}
+.info ${:!env|sort|grep '^UT_'!}
 .info ${.MAKE.EXPORTED}
 
 all:



Home | Main Index | Thread Index | Old Index