freebsd-nq/contrib/bmake/unit-tests/directive-info.mk
Simon J. Gerraty 06b9b3e0ad Merge 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

Merge commit '8e11a9b4250be3c3379c45fa820bff78d99d5946' into main

Change-Id: I464fd4c013067f0915671c1ccc96d2d8090b2b9c
2021-01-13 22:21:37 -08:00

40 lines
1.2 KiB
Makefile

# $NetBSD: directive-info.mk,v 1.8 2020/12/19 22:33:11 rillig Exp $
#
# Tests for the .info directive.
#
# Until parse.c 1.502 from 2020-12-19, a missing argument to the directive
# produced the wrong error message "Unknown directive". Since parse.c 1.503
# from 2020-12-19, the correct "Missing argument" is produced.
# TODO: Implementation
.info begin .info tests
.inf # misspelled
.info # "Missing argument"
.info message
.info indented message
.information
.information message # Accepted before 2020-12-13 01:07:54.
.info.man: # not a message, but possibly a suffix rule
# Even if lines would have trailing whitespace, this would be trimmed by
# ParseGetLine.
.info
.info # comment
.info: message # This is a dependency declaration.
.info-message # This is an unknown directive.
.info no-target: no-source # This is a .info directive, not a dependency.
# See directive.mk for more tests of this kind.
# Since at least 2002-01-01, the line number that is used in error messages
# and the .info directives is the number of completely read lines. For the
# following multi-line directive, this means that the reported line number is
# the one of the last line, not the first line.
.info expect line 30 for\
multi$\
-line message
all:
@:;