xref: /freebsd/contrib/bmake/unit-tests/directive-for-lines.mk (revision a8c56be47166295d37600ff81fc1857db87b3a9b)
1*a8c56be4SSimon J. Gerraty# $NetBSD: directive-for-lines.mk,v 1.6 2025/06/30 21:44:39 rillig Exp $
206b9b3e0SSimon J. Gerraty#
306b9b3e0SSimon J. Gerraty# Tests for the line numbers that are reported in .for loops.
406b9b3e0SSimon J. Gerraty#
5954401e6SSimon J. Gerraty# Since parse.c 1.127 from 2007-01-01 and before parse.c 1.494 from
6954401e6SSimon J. Gerraty# 2020-12-19, the line numbers for the .info directives and error
706b9b3e0SSimon J. Gerraty# messages inside .for loops had been wrong since ParseGetLine skipped empty
806b9b3e0SSimon J. Gerraty# lines, even when collecting the lines for the .for loop body.
906b9b3e0SSimon J. Gerraty
10*a8c56be4SSimon J. Gerraty# expect+21: This is line 31.
11*a8c56be4SSimon J. Gerraty# expect+20: This is line 31.
12*a8c56be4SSimon J. Gerraty# expect+26: This is line 38.
13*a8c56be4SSimon J. Gerraty
14*a8c56be4SSimon J. Gerraty# expect+17: This is line 31.
15*a8c56be4SSimon J. Gerraty# expect+16: This is line 31.
16*a8c56be4SSimon J. Gerraty# expect+22: This is line 38.
17*a8c56be4SSimon J. Gerraty
1806b9b3e0SSimon J. Gerraty.for outer in a b
1906b9b3e0SSimon J. Gerraty
2006b9b3e0SSimon J. Gerraty# comment \
2106b9b3e0SSimon J. Gerraty# continued comment
2206b9b3e0SSimon J. Gerraty
2306b9b3e0SSimon J. Gerraty.for inner in 1 2
2406b9b3e0SSimon J. Gerraty
2506b9b3e0SSimon J. Gerraty# comment \
2606b9b3e0SSimon J. Gerraty# continued comment
2706b9b3e0SSimon J. Gerraty
2806b9b3e0SSimon J. GerratyVAR= \
2906b9b3e0SSimon J. Gerraty	multi-line
3006b9b3e0SSimon J. Gerraty
31*a8c56be4SSimon J. Gerraty.info This is line 31.
3206b9b3e0SSimon J. Gerraty
3306b9b3e0SSimon J. Gerraty.endfor
3406b9b3e0SSimon J. Gerraty
3506b9b3e0SSimon J. Gerraty# comment \
3606b9b3e0SSimon J. Gerraty# continued comment
3706b9b3e0SSimon J. Gerraty
38*a8c56be4SSimon J. Gerraty.info This is line 38.
3906b9b3e0SSimon J. Gerraty
4006b9b3e0SSimon J. Gerraty.endfor
41