Home | History | Annotate | Line # | Download | only in unit-tests
directive-for-lines.mk revision 1.3
      1 # $NetBSD: directive-for-lines.mk,v 1.3 2020/12/19 12:40:00 rillig Exp $
      2 #
      3 # Tests for the line numbers that are reported in .for loops.
      4 #
      5 # Between 2007-01-01 (git 4d3c468f96e1080e, parse.c 1.127) and 2020-12-19
      6 # (parse.c 1.494), 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 .for outer in a b
     11 
     12 # comment \
     13 # continued comment
     14 
     15 .for inner in 1 2
     16 
     17 # comment \
     18 # continued comment
     19 
     20 VAR= \
     21 	multi-line
     22 
     23 .info expect 23
     24 
     25 .endfor
     26 
     27 # comment \
     28 # continued comment
     29 
     30 .info expect 30
     31 
     32 .endfor
     33