xref: /freebsd/contrib/bmake/unit-tests/directive-misspellings.mk (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1# $NetBSD: directive-misspellings.mk,v 1.4 2023/06/01 20:56:35 rillig Exp $
2#
3# Tests for misspelled directives.
4#
5# Before 2020-12-12, make didn't catch most of these misspellings.  For
6# example, the directive ".exporting" was interpreted as if it were spelled
7# ".export ing", which would export the variable named "ing" if that existed.
8# Another misspelling, as improbable as the others, was that both ".infos" and
9# ".information" were aliases to ".info" since the code for these diagnostic
10# directives just skipped any letters following the "error", "warn" or "info".
11
12# expect+1: Unknown directive "dinclud"
13.dinclud "file"
14.dinclude "file"
15# expect+1: Unknown directive "dincludx"
16.dincludx "file"
17# expect+1: .include filename must be delimited by '"' or '<'
18.dincludes "file"		# XXX: the 's' is not meant to be a filename
19
20# expect+1: Unknown directive "erro"
21.erro msg
22# expect+1: Unknown directive "errox"
23.errox msg
24# no .error since that would exit immediately
25# no .errors since that would exit immediately, even with the typo
26
27# expect+1: Unknown directive "expor"
28.expor varname
29.export varname
30# expect+1: Unknown directive "exporx"
31.exporx varname
32# expect+1: Unknown directive "exports"
33.exports varname		# Accepted before 2020-12-13 01:07:54.
34
35# expect+1: Unknown directive "export-en"
36.export-en			# Accepted before 2020-12-13 01:07:54.
37.export-env
38.export-env extra argument	# XXX: undetected extra argument
39# expect+1: Unknown directive "export-environment"
40.export-environment		# Accepted before 2020-12-13 01:07:54.
41
42# expect+1: Unknown directive "export-litera"
43.export-litera varname		# Accepted before 2020-12-13 01:07:54.
44.export-literal varname
45# expect+1: Unknown directive "export-literax"
46.export-literax varname		# Accepted before 2020-12-13 01:07:54.
47# expect+1: Unknown directive "export-literally"
48.export-literally varname	# Accepted before 2020-12-13 01:07:54.
49
50# expect+1: Unknown directive "-includ"
51.-includ "file"
52.-include "file"
53# expect+1: Unknown directive "-includx"
54.-includx "file"
55# expect+1: .include filename must be delimited by '"' or '<'
56.-includes "file"		# XXX: the 's' is not meant to be a filename
57
58# expect+1: Unknown directive "includ"
59.includ "file"
60# expect+1: Could not find file
61.include "file"
62# expect+1: Unknown directive "includx"
63.includx "file"
64# expect+1: .include filename must be delimited by '"' or '<'
65.includex "file"		# XXX: the 's' is not meant to be a filename
66
67# expect+1: Unknown directive "inf"
68.inf msg
69# expect+1: msg
70.info msg
71# expect+1: Unknown directive "infx"
72.infx msg
73# expect+1: Unknown directive "infos"
74.infos msg			# Accepted before 2020-12-13 01:07:54.
75
76# expect+1: Unknown directive "sinclud"
77.sinclud "file"
78.sinclude "file"
79# expect+1: Unknown directive "sincludx"
80.sincludx "file"
81# expect+1: .include filename must be delimited by '"' or '<'
82.sincludes "file"		# XXX: the 's' is not meant to be a filename
83
84# expect+1: Unknown directive "unde"
85.unde varname
86.undef varname
87# expect+1: Unknown directive "undex"
88.undex varname
89# expect+1: Unknown directive "undefs"
90.undefs varname			# Accepted before 2020-12-13 01:07:54.
91
92# expect+1: Unknown directive "unexpor"
93.unexpor varname
94.unexport varname
95# expect+1: Unknown directive "unexporx"
96.unexporx varname
97# expect+1: Unknown directive "unexports"
98.unexports varname		# Accepted before 2020-12-12 18:00:18.
99
100# expect+1: Unknown directive "unexport-en"
101.unexport-en			# Accepted before 2020-12-12 18:11:42.
102.unexport-env
103# expect+1: The directive .unexport-env does not take arguments
104.unexport-env extra argument	# Accepted before 2020-12-12 18:00:18.
105# expect+1: Unknown directive "unexport-enx"
106.unexport-enx			# Accepted before 2020-12-12 18:00:18.
107# expect+1: Unknown directive "unexport-envs"
108.unexport-envs			# Accepted before 2020-12-12 18:00:18.
109
110# expect+1: Unknown directive "warn"
111.warn msg
112# expect+1: Unknown directive "warnin"
113.warnin msg
114# expect+1: warning: msg
115.warning msg
116# expect+1: Unknown directive "warninx"
117.warninx msg
118# expect+1: Unknown directive "warnings"
119.warnings msg			# Accepted before 2020-12-13 01:07:54.
120