xref: /freebsd/contrib/bmake/unit-tests/opt-warnings-as-errors.mk (revision 148ee84570001f46b7b667c86573d378101c3801)
1*148ee845SSimon J. Gerraty# $NetBSD: opt-warnings-as-errors.mk,v 1.6 2023/06/01 20:56:35 rillig Exp $
22c3632d1SSimon J. Gerraty#
32c3632d1SSimon J. Gerraty# Tests for the -W command line option, which turns warnings into errors.
4dba7b0efSSimon J. Gerraty#
5dba7b0efSSimon J. Gerraty# Even in -W mode, a .warning is not completely equivalent to an .error.
6dba7b0efSSimon J. Gerraty# First, the word "warning" is still printed, and second, parsing continues
7dba7b0efSSimon J. Gerraty# after a failed warning, whereas it would stop immediately at the first
8dba7b0efSSimon J. Gerraty# .error.
92c3632d1SSimon J. Gerraty
10e2eeea75SSimon J. Gerraty.MAKEFLAGS: -W
11e2eeea75SSimon J. Gerraty
12*148ee845SSimon J. Gerraty# expect+1: warning: message 1
132c3632d1SSimon J. Gerraty.warning message 1
14*148ee845SSimon J. Gerraty# expect+1: warning: message 2
152c3632d1SSimon J. Gerraty.warning message 2
162c3632d1SSimon J. Gerraty
172c3632d1SSimon J. Gerraty_!=	echo 'parsing continues' 1>&2
182c3632d1SSimon J. Gerraty
192c3632d1SSimon J. Gerratyall:
202c3632d1SSimon J. Gerraty	@:;
21