1 # $NetBSD: directives.mk,v 1.6 2020/10/24 08:46:08 rillig Exp $
3 # Tests for parsing directives, in the same order as in the manual page.
5 # Each test group has 10 lines, to keep the line numbers in directives.exp
8 # no tests for .error since it exits immediately, see ParseMessage.
10 .info begin .export tests
12 .export # oops: missing argument
14 .exporting works # oops: misspelled
20 .info begin .export-env tests
21 .export-en # oops: misspelled
23 .export-environment # oops: misspelled
30 .info begin .export-literal tests
31 .export-litera # oops: misspelled
32 .export-literal # oops: missing argument
33 .export-literal VARNAME
34 .export-literally # oops: misspelled
40 .info begin .info tests
42 .info # oops: message should be "missing parameter"
44 .info indented message
46 .information message # oops: misspelled
47 .info.man: # not a message, but a suffix rule
50 .info begin .undef tests
52 .undef # oops: missing argument
53 .undefined # oops: misspelled
60 .info begin .unexport tests
62 .unexport # oops: missing argument
63 .unexport VARNAME # ok
64 .unexporting works # oops: misspelled
70 .info begin .unexport-env tests
71 .unexport-en # misspelled
73 .unexport-environment # oops: misspelled
80 .info begin .warning tests
83 .warning # oops: should be "missing argument"
85 .warnings # misspelled
86 .warnings messages # oops
90 .info begin .elif misspellings tests, part 1
93 .elsif 1 # oops: misspelled
94 .elseif 1 # oops: misspelled
100 .info begin .elif misspellings tests, part 2
103 .elsif 0 # oops: misspelled
104 .elseif 0 # oops: misspelled
110 .info begin .elif misspellings tests, part 3
112 .elsif 0 # oops: misspelled
115 .elseif 0 # oops: misspelled
120 .info which branch is taken on misspelling after false?
130 .info which branch is taken on misspelling after true?
143 .${:Uinfo} directives cannot be indirect
150 .include "nonexistent.mk"
151 .include "/dev/null" # size 0
152 # including a directory technically succeeds, but shouldn't.
153 #.include "." # directory
160 .info end of the tests