directive-for-lines.mk revision 1.6 1 # $NetBSD: directive-for-lines.mk,v 1.6 2025/06/30 21:44:39 rillig Exp $
2 #
3 # Tests for the line numbers that are reported in .for loops.
4 #
5 # Since parse.c 1.127 from 2007-01-01 and before parse.c 1.494 from
6 # 2020-12-19, the line numbers for the .info directives and error
7 # messages inside .for loops had been wrong since ParseGetLine skipped empty
8 # lines, even when collecting the lines for the .for loop body.
9
10 # expect+21: This is line 31.
11 # expect+20: This is line 31.
12 # expect+26: This is line 38.
13
14 # expect+17: This is line 31.
15 # expect+16: This is line 31.
16 # expect+22: This is line 38.
17
18 .for outer in a b
19
20 # comment \
21 # continued comment
22
23 .for inner in 1 2
24
25 # comment \
26 # continued comment
27
28 VAR= \
29 multi-line
30
31 .info This is line 31.
32
33 .endfor
34
35 # comment \
36 # continued comment
37
38 .info This is line 38.
39
40 .endfor
41