Module Name: src Committed By: rillig Date: Sun Dec 6 16:06:11 UTC 2020
Modified Files: src/usr.bin/make/unit-tests: directive-unexport-env.exp directive-unexport-env.mk Log Message: make(1): add test for directive unexport-env To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/usr.bin/make/unit-tests/directive-unexport-env.exp cvs rdiff -u -r1.3 -r1.4 \ src/usr.bin/make/unit-tests/directive-unexport-env.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/directive-unexport-env.exp diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.1 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.2 --- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.1 Sun Aug 16 12:07:51 2020 +++ src/usr.bin/make/unit-tests/directive-unexport-env.exp Sun Dec 6 16:06:11 2020 @@ -1 +1,13 @@ +Global:UT_EXPORTED = value +Global:UT_UNEXPORTED = value +Global:.MAKE.EXPORTED = UT_EXPORTED +Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES +Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (VARE_WANTRES, none, none) +Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (VARE_WANTRES, none, none) +Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (VARE_WANTRES, none, none) +Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (VARE_WANTRES, none, none) +Unexporting "UT_EXPORTED" +Global:delete .MAKE.EXPORTED +Global:.MAKEFLAGS = -r -k -d v -d +Global:.MAKEFLAGS = -r -k -d v -d 0 exit status 0 Index: src/usr.bin/make/unit-tests/directive-unexport-env.mk diff -u src/usr.bin/make/unit-tests/directive-unexport-env.mk:1.3 src/usr.bin/make/unit-tests/directive-unexport-env.mk:1.4 --- src/usr.bin/make/unit-tests/directive-unexport-env.mk:1.3 Tue Nov 3 17:17:31 2020 +++ src/usr.bin/make/unit-tests/directive-unexport-env.mk Sun Dec 6 16:06:11 2020 @@ -1,4 +1,4 @@ -# $NetBSD: directive-unexport-env.mk,v 1.3 2020/11/03 17:17:31 rillig Exp $ +# $NetBSD: directive-unexport-env.mk,v 1.4 2020/12/06 16:06:11 rillig Exp $ # # Tests for the .unexport-env directive. @@ -8,5 +8,17 @@ .unexport-env # ok .unexport-environment # oops: misspelled +# Before 2020-12-06, the directive unexport-env was implemented strangely. +# According to its documentation, it does not take any arguments, but the +# Implementation accepted variable names as arguments and produced wrong debug +# logging for them, saying "Unexporting" for variables that at this point were +# not exported anymore. +.MAKEFLAGS: -dv +UT_EXPORTED= value +UT_UNEXPORTED= value +.export UT_EXPORTED +.unexport-env UT_EXPORTED UT_UNEXPORTED +.MAKEFLAGS: -d0 + all: @:;