freebsd-src/unit-tests/directive-for-lines.mk
Simon J. Gerraty 8e11a9b425 Import bmake-20210110
Quite a lot of churn on style, but lots of
good work refactoring complicated functions
and lots more unit-tests.
Thanks mostly to rillig at NetBSD

Some interesting entries from ChangeLog

o .MAKE.{UID,GID} represent uid and gid running make.

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o add more unit tests for META MODE

Change-Id: I4d3bcf08b4c864d98b343f602efe5a75dbfa7a94
2021-01-13 17:24:34 -08:00

33 lines
634 B
Makefile

# $NetBSD: directive-for-lines.mk,v 1.3 2020/12/19 12:40:00 rillig Exp $
#
# Tests for the line numbers that are reported in .for loops.
#
# Between 2007-01-01 (git 4d3c468f96e1080e, parse.c 1.127) and 2020-12-19
# (parse.c 1.494), 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
.info expect 23
.endfor
# comment \
# continued comment
.info expect 30
.endfor