From 7ea029a07c02b9401cb3d88566eac41959b84c11 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 10 Sep 2002 07:27:28 +0000 Subject: Add support for broken SA_RESTART on PTX. Fix bug #103: allow ifdef, export, and unexport to expand their arguments. --- tests/scripts/features/conditionals | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/scripts/features/conditionals') diff --git a/tests/scripts/features/conditionals b/tests/scripts/features/conditionals index 3557fb5..ab3d9d5 100644 --- a/tests/scripts/features/conditionals +++ b/tests/scripts/features/conditionals @@ -63,5 +63,39 @@ arg4 is defined &compare_output($answer,&get_logfile(1)); + +# Test expansion of variables inside ifdef. + +$makefile2 = &get_tmpfile; + +open(MAKEFILE, "> $makefile2"); + +print MAKEFILE <<'EOF'; + +foo = 1 + +FOO = foo +F = f + +DEF = no +DEF2 = no + +ifdef $(FOO) +DEF = yes +endif + +ifdef $(F)oo +DEF2 = yes +endif + +all:; @echo DEF=$(DEF) DEF2=$(DEF2) + +EOF + +&run_make_with_options($makefile2,"",&get_logfile,0); +$answer = "DEF=yes DEF2=yes\n"; +&compare_output($answer,&get_logfile(1)); + + # This tells the test driver that the perl test script executed properly. 1; -- cgit v1.2.3