Home | History | Annotate | Line # | Download | only in unit-tests
directive-info.mk revision 1.8
      1  1.8  rillig # $NetBSD: directive-info.mk,v 1.8 2020/12/19 22:33:11 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.7  rillig # Since at least 2002-01-01, the line number that is used in error messages
     31  1.7  rillig # and the .info directives is the number of completely read lines.  For the
     32  1.7  rillig # following multi-line directive, this means that the reported line number is
     33  1.7  rillig # the one of the last line, not the first line.
     34  1.7  rillig .info expect line 30 for\
     35  1.7  rillig 	multi$\
     36  1.7  rillig 	-line message
     37  1.7  rillig 
     38  1.1  rillig all:
     39  1.1  rillig 	@:;
     40