xref: /freebsd/contrib/bmake/unit-tests/opt-warnings-as-errors.mk (revision 148ee84570001f46b7b667c86573d378101c3801)
1# $NetBSD: opt-warnings-as-errors.mk,v 1.6 2023/06/01 20:56:35 rillig Exp $
2#
3# Tests for the -W command line option, which turns warnings into errors.
4#
5# Even in -W mode, a .warning is not completely equivalent to an .error.
6# First, the word "warning" is still printed, and second, parsing continues
7# after a failed warning, whereas it would stop immediately at the first
8# .error.
9
10.MAKEFLAGS: -W
11
12# expect+1: warning: message 1
13.warning message 1
14# expect+1: warning: message 2
15.warning message 2
16
17_!=	echo 'parsing continues' 1>&2
18
19all:
20	@:;
21