Fri Oct 30 23:54:42 2020 UTC ()
Fix directive-unexport to focus only on the variables we care about


(sjg)
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-unexport.exp
diff -r1.3 -r1.4 src/usr.bin/make/unit-tests/directive-unexport.mk

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-unexport.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/directive-unexport.exp 2020/10/30 17:55:10 1.2
+++ src/usr.bin/make/unit-tests/directive-unexport.exp 2020/10/30 23:54:42 1.3
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
1make: "directive-unexport.mk" line 14: A=a B=b C=c 1make: "directive-unexport.mk" line 14: UT_A=a UT_B=b UT_C=c
2make: "directive-unexport.mk" line 15: A B C 2make: "directive-unexport.mk" line 15: UT_A UT_B UT_C
3make: "directive-unexport.mk" line 23: A=a B=b C=c 3make: "directive-unexport.mk" line 23: UT_A=a UT_B=b UT_C=c
4make: "directive-unexport.mk" line 24:  4make: "directive-unexport.mk" line 24:
5exit status 0 5exit status 0

cvs diff -r1.3 -r1.4 src/usr.bin/make/unit-tests/directive-unexport.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/directive-unexport.mk 2020/10/30 17:55:10 1.3
+++ src/usr.bin/make/unit-tests/directive-unexport.mk 2020/10/30 23:54:42 1.4
@@ -1,27 +1,27 @@ @@ -1,27 +1,27 @@
1# $NetBSD: directive-unexport.mk,v 1.3 2020/10/30 17:55:10 rillig Exp $ 1# $NetBSD: directive-unexport.mk,v 1.4 2020/10/30 23:54:42 sjg Exp $
2# 2#
3# Tests for the .unexport directive. 3# Tests for the .unexport directive.
4 4
5# TODO: Implementation 5# TODO: Implementation
6 6
7# First, export 3 variables. 7# First, export 3 variables.
8A= a 8UT_A= a
9B= b 9UT_B= b
10C= c 10UT_C= c
11.export A B C 11.export UT_A UT_B UT_C
12 12
13# Show the exported variables and their values. 13# Show the exported variables and their values.
14.info ${:!env|sort|grep -v -E '^(MAKELEVEL|MALLOC_OPTIONS|PATH|PWD)'!} 14.info ${:!env|sort|grep '^UT_'!}
15.info ${.MAKE.EXPORTED} 15.info ${.MAKE.EXPORTED}
16 16
17# XXX: Now try to unexport all of them. The variables are still exported 17# XXX: Now try to unexport all of them. The variables are still exported
18# but not mentioned in .MAKE.EXPORTED anymore. 18# but not mentioned in .MAKE.EXPORTED anymore.
19# See the ":N" in Var_UnExport for the implementation. 19# See the ":N" in Var_UnExport for the implementation.
20*= asterisk 20*= asterisk
21.unexport * 21.unexport *
22 22
23.info ${:!env|sort|grep -v -E '^(MAKELEVEL|MALLOC_OPTIONS|PATH|PWD)'!} 23.info ${:!env|sort|grep '^UT_'!}
24.info ${.MAKE.EXPORTED} 24.info ${.MAKE.EXPORTED}
25 25
26all: 26all:
27 @:; 27 @:;