Home | History | Annotate | Line # | Download | only in unit-tests
varname-dot-curdir.mk revision 1.6
      1  1.6  rillig # $NetBSD: varname-dot-curdir.mk,v 1.6 2020/10/05 19:27:48 rillig Exp $
      2  1.1  rillig #
      3  1.2  rillig # Tests for the special .CURDIR variable.
      4  1.1  rillig 
      5  1.1  rillig # TODO: Implementation
      6  1.1  rillig 
      7  1.6  rillig # Until 2020-10-04, assigning the result of a shell assignment to .CURDIR
      8  1.6  rillig # tried to add the shell command ("echo /") to the .PATH instead of the
      9  1.6  rillig # output of the shell command ("/").  Since "echo /" does not exist, the
     10  1.6  rillig # .PATH was left unmodified.  See VarAssign_Eval.
     11  1.6  rillig #
     12  1.6  rillig # Since 2020-10-04, the output of the shell command is added to .PATH.
     13  1.6  rillig .CURDIR!=	echo /
     14  1.6  rillig .if ${.PATH:M/} != "/"
     15  1.6  rillig .  error
     16  1.6  rillig .endif
     17  1.6  rillig 
     18  1.6  rillig # A normal assignment works fine, as does a substitution assignment.
     19  1.6  rillig # Appending to .CURDIR does not make sense, therefore it doesn't matter that
     20  1.6  rillig # this code path is buggy as well.
     21  1.6  rillig .CURDIR=	/
     22  1.6  rillig .if ${.PATH:M/} != "/"
     23  1.6  rillig .  error
     24  1.6  rillig .endif
     25  1.6  rillig 
     26  1.1  rillig all:
     27  1.1  rillig 	@:;
     28