Home | History | Annotate | Line # | Download | only in unit-tests
      1  1.11  rillig # $NetBSD: directive-info.mk,v 1.11 2023/06/01 20:56:35 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.11  rillig # expect+1: begin .info tests
     12   1.3  rillig .info begin .info tests
     13  1.11  rillig # expect+1: Unknown directive "inf"
     14   1.3  rillig .inf				# misspelled
     15  1.11  rillig # expect+1: Missing argument for ".info"
     16  1.11  rillig .info
     17  1.11  rillig # expect+1: message
     18   1.3  rillig .info message
     19  1.11  rillig # expect+1: indented message
     20   1.3  rillig .info		indented message
     21  1.11  rillig # expect+1: Unknown directive "information"
     22   1.3  rillig .information
     23  1.11  rillig # expect+1: Unknown directive "information"
     24   1.6  rillig .information message		# Accepted before 2020-12-13 01:07:54.
     25   1.3  rillig .info.man:			# not a message, but possibly a suffix rule
     26   1.3  rillig 
     27   1.4  rillig # Even if lines would have trailing whitespace, this would be trimmed by
     28  1.10  rillig # ParseRawLine.
     29  1.11  rillig # expect+1: Missing argument for ".info"
     30   1.4  rillig .info
     31  1.11  rillig # expect+1: Missing argument for ".info"
     32   1.4  rillig .info				# comment
     33   1.4  rillig 
     34   1.4  rillig .info: message			# This is a dependency declaration.
     35  1.11  rillig # expect+1: Unknown directive "info-message"
     36   1.4  rillig .info-message			# This is an unknown directive.
     37  1.11  rillig # expect+1: no-target: no-source
     38   1.4  rillig .info no-target: no-source	# This is a .info directive, not a dependency.
     39   1.4  rillig # See directive.mk for more tests of this kind.
     40   1.4  rillig 
     41   1.9  rillig # Since at least 2002-01-01 and before parse.c 1.639 from 2022-01-08, the line
     42   1.9  rillig # number that is used in error messages and the .info directives was the
     43   1.9  rillig # number of completely read lines.  For the following multi-line directive,
     44   1.9  rillig # this meant that the reported line number was the one of the last line, not
     45   1.9  rillig # of the first line.
     46  1.11  rillig # expect+1: expect line 35 for multi-line message
     47   1.9  rillig .info expect line 35 for\
     48   1.7  rillig 	multi$\
     49   1.7  rillig 	-line message
     50