Home | History | Annotate | Line # | Download | only in unit-tests
varmod-ifelse.mk revision 1.4
      1 # $NetBSD: varmod-ifelse.mk,v 1.4 2020/10/09 07:03:20 rillig Exp $
      2 #
      3 # Tests for the ${cond:?then:else} variable modifier, which evaluates either
      4 # the then-expression or the else-expression, depending on the condition.
      5 
      6 # TODO: Implementation
      7 
      8 # When the :? is parsed, it is greedy.  The else branch spans all the
      9 # text, up until the closing character '}', even if the text looks like
     10 # another modifier.
     11 .if ${1:?then:else:Q} != "then"
     12 .  error
     13 .endif
     14 .if ${0:?then:else:Q} != "else:Q"
     15 .  error
     16 .endif
     17 
     18 all:
     19 	@:;
     20