From 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:21:29 +0200 Subject: Adding upstream version 1:0.1.9998svn3589+dfsg. Signed-off-by: Daniel Baumann --- src/kmk/tests/scripts/features/varnesting | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/kmk/tests/scripts/features/varnesting (limited to 'src/kmk/tests/scripts/features/varnesting') diff --git a/src/kmk/tests/scripts/features/varnesting b/src/kmk/tests/scripts/features/varnesting new file mode 100644 index 0000000..d8f3ffb --- /dev/null +++ b/src/kmk/tests/scripts/features/varnesting @@ -0,0 +1,35 @@ +# -*-perl-*- +$description = "Test recursive variables"; + +$details = ""; + +run_make_test(' +x = variable1 +variable2 := Hello +y = $(subst 1,2,$(x)) +z = y +a := $($($(z))) +all: + @echo $(a) +', + '', "Hello\n"); + +# This tests resetting the value of a variable while expanding it. +# You may only see problems with this if you're using valgrind or +# some other memory checker that poisons freed memory. +# See Savannah patch #7534 + +run_make_test(' +VARIABLE = $(eval VARIABLE := echo hi)$(VARIABLE) +wololo: + @$(VARIABLE) +', + '', "hi\n"); + +1; + + + + + + -- cgit v1.2.3