xref: /freebsd/contrib/bmake/unit-tests/unexport.mk (revision 2ccf8a827cce7e34e2063a3d33e5cce4b79799cc)
1# $Id: unexport.mk,v 1.1.1.3 2020/08/08 22:34:25 sjg Exp $
2
3# pick up a bunch of exported vars
4FILTER_CMD=	grep ^UT_
5.include "export.mk"
6
7.unexport UT_ZOO UT_FOO
8
9UT_TEST = unexport
10
11# Until 2020-08-08, Var_UnExport had special handling for '\n', that code
12# was not reachable though.  At that point, backslash-newline has already
13# been replaced with a simple space, and variables are not yet expanded.
14UT_BEFORE_NL=	before
15UT_AFTER_NL=	after
16.export UT_BEFORE_NL UT_AFTER_NL
17.unexport \
18  UT_BEFORE_NL
19.unexport ${.newline} UT_AFTER_NL
20