make(1): add tests for parsing .if conditions

This commit is contained in:
rillig 2020-12-14 21:02:25 +00:00
parent 1eeb87db64
commit 2f1b70eeeb
2 changed files with 11 additions and 1 deletions

View File

@ -10,6 +10,8 @@ make: "directive-if.mk" line 57: Quotes in plain words are probably a mistake.
make: "directive-if.mk" line 66: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 70: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 76: Don't do this, always put a space around comparison operators.
make: "directive-if.mk" line 82: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 86: Don't do this, always put a space after a directive.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1

View File

@ -1,4 +1,4 @@
# $NetBSD: directive-if.mk,v 1.7 2020/11/15 20:20:58 rillig Exp $
# $NetBSD: directive-if.mk,v 1.8 2020/12/14 21:02:25 rillig Exp $
#
# Tests for the .if directive.
#
@ -78,4 +78,12 @@
. error
.endif
.if(1)
. info Don't do this, always put a space after a directive.
.endif
.if!0
. info Don't do this, always put a space after a directive.
.endif
all: