xref: /freebsd/contrib/bmake/unit-tests/directive-for-null.mk (revision a90b9d0159070121c221b966469c3e36d912bf82)
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