Home | History | Annotate | Line # | Download | only in unit-tests
directive-info.mk revision 1.9
      1  1.9  rillig # $NetBSD: directive-info.mk,v 1.9 2022/01/08 20:21:34 rillig Exp $
      2  1.1  rillig #
      3  1.2  rillig # Tests for the .info directive.
      4  1.8  rillig #
      5  1.8  rillig # Until parse.c 1.502 from 2020-12-19, a missing argument to the directive
      6  1.8  rillig # produced the wrong error message "Unknown directive".  Since parse.c 1.503
      7  1.8  rillig # from 2020-12-19, the correct "Missing argument" is produced.
      8  1.1  rillig 
      9  1.1  rillig # TODO: Implementation
     10  1.1  rillig 
     11  1.3  rillig .info begin .info tests
     12  1.3  rillig .inf				# misspelled
     13  1.8  rillig .info				# "Missing argument"
     14  1.3  rillig .info message
     15  1.3  rillig .info		indented message
     16  1.3  rillig .information
     17  1.6  rillig .information message		# Accepted before 2020-12-13 01:07:54.
     18  1.3  rillig .info.man:			# not a message, but possibly a suffix rule
     19  1.3  rillig 
     20  1.4  rillig # Even if lines would have trailing whitespace, this would be trimmed by
     21  1.4  rillig # ParseGetLine.
     22  1.4  rillig .info
     23  1.4  rillig .info				# comment
     24  1.4  rillig 
     25  1.4  rillig .info: message			# This is a dependency declaration.
     26  1.4  rillig .info-message			# This is an unknown directive.
     27  1.4  rillig .info no-target: no-source	# This is a .info directive, not a dependency.
     28  1.4  rillig # See directive.mk for more tests of this kind.
     29  1.4  rillig 
     30  1.9  rillig # Since at least 2002-01-01 and before parse.c 1.639 from 2022-01-08, the line
     31  1.9  rillig # number that is used in error messages and the .info directives was the
     32  1.9  rillig # number of completely read lines.  For the following multi-line directive,
     33  1.9  rillig # this meant that the reported line number was the one of the last line, not
     34  1.9  rillig # of the first line.
     35  1.9  rillig .info expect line 35 for\
     36  1.7  rillig 	multi$\
     37  1.7  rillig 	-line message
     38  1.7  rillig 
     39  1.1  rillig all:
     40  1.1  rillig 	@:;
     41