Home | History | Annotate | Line # | Download | only in unit-tests
directive-endif.mk revision 1.4
      1  1.4  rillig # $NetBSD: directive-endif.mk,v 1.4 2020/12/14 20:57:31 rillig Exp $
      2  1.1  rillig #
      3  1.2  rillig # Tests for the .endif directive.
      4  1.3  rillig #
      5  1.3  rillig # See also:
      6  1.3  rillig #	Cond_EvalLine
      7  1.1  rillig 
      8  1.1  rillig # TODO: Implementation
      9  1.1  rillig 
     10  1.3  rillig .MAKEFLAGS: -dL
     11  1.3  rillig 
     12  1.3  rillig # Error: .endif does not take arguments
     13  1.3  rillig # XXX: Missing error message
     14  1.3  rillig .if 0
     15  1.3  rillig .endif 0
     16  1.3  rillig 
     17  1.3  rillig # Error: .endif does not take arguments
     18  1.3  rillig # XXX: Missing error message
     19  1.3  rillig .if 1
     20  1.3  rillig .endif 1
     21  1.3  rillig 
     22  1.3  rillig # Comments are allowed after an '.endif'.
     23  1.3  rillig .if 2
     24  1.3  rillig .endif # comment
     25  1.3  rillig 
     26  1.4  rillig # Only whitespace and comments are allowed after an '.endif', but nothing
     27  1.4  rillig # else.
     28  1.4  rillig # XXX: Missing error message
     29  1.4  rillig .if 1
     30  1.4  rillig .endif0
     31  1.4  rillig 
     32  1.4  rillig # Only whitespace and comments are allowed after an '.endif', but nothing
     33  1.4  rillig # else.
     34  1.4  rillig # XXX: Missing error message
     35  1.4  rillig .if 1
     36  1.4  rillig .endif/
     37  1.4  rillig 
     38  1.4  rillig # After an '.endif', no other letter must occur.  This 'endifx' is not
     39  1.4  rillig # parsed as an 'endif', therefore another '.endif' must follow to balance
     40  1.4  rillig # the directives.
     41  1.4  rillig .if 1
     42  1.4  rillig .endifx
     43  1.4  rillig .endif # to close the preceding '.if'
     44  1.4  rillig 
     45  1.1  rillig all:
     46  1.1  rillig 	@:;
     47