summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/directive-for-lines.mk
blob: cae4e0a388972ded2665a3b1ca991ea06f03169d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $NetBSD: directive-for-lines.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $
#
# Tests for the line numbers that are reported in .for loops.
#
# Since parse.c 1.127 from 2007-01-01 and before parse.c 1.494 from
# 2020-12-19, the line numbers for the .info directives and error
# messages inside .for loops had been wrong since ParseGetLine skipped empty
# lines, even when collecting the lines for the .for loop body.

.for outer in a b

# comment \
# continued comment

.for inner in 1 2

# comment \
# continued comment

VAR= \
	multi-line

# expect+4: expect 23
# expect+3: expect 23
# expect+2: expect 23
# expect+1: expect 23
.info expect 23

.endfor

# comment \
# continued comment

# expect+2: expect 30
# expect+1: expect 30
.info expect 30

.endfor