xref: /freebsd/contrib/bmake/unit-tests/directive-for-null.mk (revision 548bfc56eb0b2cefa0fb8dc2478240bfef610309)
1# $NetBSD: directive-for-null.mk,v 1.4 2024/04/01 12:26:02 rillig Exp $
2#
3# Test for parsing a .for loop that accidentally contains a null byte.
4#
5# expect: make: "(stdin)" line 2: Zero byte read from file
6
7all: .PHONY
8	@printf '%s\n' \
9	    '.for i in 1 2 3' \
10	    'VAR=value' \
11	    '.endfor' \
12	| tr 'l' '\0' \
13	| ${MAKE} -f -
14