xref: /freebsd/contrib/bmake/unit-tests/directive-unexport-env.mk (revision 148ee84570001f46b7b667c86573d378101c3801)
1# $NetBSD: directive-unexport-env.mk,v 1.9 2023/06/01 20:56:35 rillig Exp $
2#
3# Tests for the .unexport-env directive.
4#
5# Before 2020-12-13, the directive unexport-env wrongly accepted arguments
6# and ignored them.
7#
8# Before 2020-12-13, misspelled directive names like "unexport-environment"
9# were not properly detected.
10
11# TODO: Implementation
12
13# expect+1: Unknown directive "unexport-en"
14.unexport-en			# misspelled
15.unexport-env			# ok
16# expect+1: Unknown directive "unexport-environment"
17.unexport-environment		# misspelled
18
19.MAKEFLAGS: -dv
20UT_EXPORTED=	value
21UT_UNEXPORTED=	value
22.export UT_EXPORTED
23# expect+1: The directive .unexport-env does not take arguments
24.unexport-env UT_EXPORTED UT_UNEXPORTED
25.MAKEFLAGS: -d0
26
27all: .PHONY
28