xref: /freebsd/contrib/bmake/unit-tests/unexport.mk (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
1# $NetBSD: unexport.mk,v 1.5 2020/10/24 08:50:17 rillig 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