Module Name:    othersrc
Committed By:   dholland
Date:           Sat Mar 23 23:59:18 UTC 2013

Modified Files:
        othersrc/usr.bin/dholland-make2/unit-tests: Makefile test.exp
Added Files:
        othersrc/usr.bin/dholland-make2/unit-tests: export-env

Log Message:
Merge -r1.36 of unit-tests/Makefile, -r1.1 of unit-tests/export-env, and
-r1.42 of unit-tests/test.exp from HEAD (committed by sjg):

Add unit-test for export-env and gmake export


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    othersrc/usr.bin/dholland-make2/unit-tests/Makefile \
    othersrc/usr.bin/dholland-make2/unit-tests/test.exp
cvs rdiff -u -r0 -r1.1 othersrc/usr.bin/dholland-make2/unit-tests/export-env

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/usr.bin/dholland-make2/unit-tests/Makefile
diff -u othersrc/usr.bin/dholland-make2/unit-tests/Makefile:1.1.1.1 othersrc/usr.bin/dholland-make2/unit-tests/Makefile:1.2
--- othersrc/usr.bin/dholland-make2/unit-tests/Makefile:1.1.1.1	Mon Feb 25 01:33:22 2013
+++ othersrc/usr.bin/dholland-make2/unit-tests/Makefile	Sat Mar 23 23:59:17 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2013/02/25 01:33:22 dholland Exp $
+# $NetBSD: Makefile,v 1.2 2013/03/23 23:59:17 dholland Exp $
 #
 # Unit tests for make(1)
 # The main targets are:
@@ -24,6 +24,7 @@ SUBFILES= \
 	error \
 	export \
 	export-all \
+	export-env \
 	doterror \
 	dotwait \
 	forloop \
Index: othersrc/usr.bin/dholland-make2/unit-tests/test.exp
diff -u othersrc/usr.bin/dholland-make2/unit-tests/test.exp:1.1.1.1 othersrc/usr.bin/dholland-make2/unit-tests/test.exp:1.2
--- othersrc/usr.bin/dholland-make2/unit-tests/test.exp:1.1.1.1	Mon Feb 25 01:33:23 2013
+++ othersrc/usr.bin/dholland-make2/unit-tests/test.exp	Sat Mar 23 23:59:17 2013
@@ -43,6 +43,14 @@ UT_OK=good
 UT_OKDIR=unit-tests
 UT_TEST=export-all
 UT_ZOO=hoopie
+make:
+UT_TEST=export-env
+UT_ENV=not-exported
+UT_EXP=not-exported
+env:
+UT_TEST=export-env
+UT_ENV=exported
+UT_EXP=exported
 At first, I am
 happy
 and now: sad

Added files:

Index: othersrc/usr.bin/dholland-make2/unit-tests/export-env
diff -u /dev/null othersrc/usr.bin/dholland-make2/unit-tests/export-env:1.1
--- /dev/null	Sat Mar 23 23:59:18 2013
+++ othersrc/usr.bin/dholland-make2/unit-tests/export-env	Sat Mar 23 23:59:17 2013
@@ -0,0 +1,24 @@
+# $Id: export-env,v 1.1 2013/03/23 23:59:17 dholland Exp $
+
+# our normal .export, subsequent changes affect the environment
+UT_TEST=this
+.export UT_TEST
+UT_TEST:= ${.PARSEFILE}
+
+# not so with .export-env
+UT_ENV=exported
+.export-env UT_ENV
+UT_ENV=not-exported
+
+# gmake style export goes further; affects nothing but the environment
+UT_EXP=before-export
+export UT_EXP=exported
+UT_EXP=not-exported
+
+all:
+	@echo make:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=${$v};@}
+	@echo env:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=$${$v};@}
+
+
+
+

Reply via email to