xref: /freebsd/contrib/bmake/unit-tests/directive-warning.mk (revision ae07a5805b1906f29e786f415d67bef334557bd3)
1# $NetBSD: directive-warning.mk,v 1.10 2025/07/01 04:24:20 rillig Exp $
2#
3# Tests for the .warning directive.
4#
5# Until parse.c 1.502 from 2020-12-19, a missing argument to the directive
6# produced the wrong error message "Unknown directive".  Since parse.c 1.503
7# from 2020-12-19, the correct "Missing argument" is produced.
8
9# expect+1: Unknown directive "warn"
10.warn				# misspelled
11# expect+1: Unknown directive "warn"
12.warn message			# misspelled
13# expect+1: Unknown directive "warnin"
14.warnin				# misspelled
15# expect+1: Unknown directive "warnin"
16.warnin	message			# misspelled
17# expect+1: Missing argument for ".warning"
18.warning			# "Missing argument"
19# expect+1: warning: message
20.warning message
21# expect+1: Unknown directive "warnings"
22.warnings			# misspelled
23# expect+1: Unknown directive "warnings"
24.warnings messages		# Accepted before 2020-12-13 01:07:54.
25
26all: .PHONY
27