From 81f3e4babd128f6740d05b371122762924522fb6 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Thu, 4 Jun 2009 06:30:27 +0000 Subject: - Modify access of config and gnulib Savannah modules to use GIT - Fix Savannah bug #24655. - Fix Savannah bug #24588. - Fix Savannah bug #24277. - Fix Savannah bug #25697. - Fix Savannah bug #25694. - Fix Savannah bug #25460. - Fix Savannah bug #26207. - Fix Savannah bug #25712. - Fix Savannah bug #26593. - Fix various doc issues. --- tests/scripts/features/override | 55 ++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'tests/scripts/features/override') diff --git a/tests/scripts/features/override b/tests/scripts/features/override index 23e4f2b..fff6c4e 100644 --- a/tests/scripts/features/override +++ b/tests/scripts/features/override @@ -1,34 +1,45 @@ -$description = "The following test creates a makefile to ..."; +# -*-perl-*- -$details = ""; - -open(MAKEFILE,"> $makefile"); - -# The Contents of the MAKEFILE ... - -print MAKEFILE "override define foo\n" - ."\@echo First comes the definition.\n" - ."\@echo Then comes the override.\n" - ."endef\n" - ."all: \n" - ."\t\$(foo)\n"; +$description = "Test the override directive on variable assignments."; -# END of Contents of MAKEFILE - -close(MAKEFILE); +$details = ""; -&run_make_with_options($makefile,"foo=Hello",&get_logfile); +# TEST 0: Basic override -# Create the answer to what should be produced by this Makefile -$answer = "First comes the definition.\n" - ."Then comes the override.\n"; +run_make_test(' +X = start +override recur = $(X) +override simple := $(X) +X = end +all: ; @echo "$(recur) $(simple)" +', + 'recur=I simple=J', "end start\n"); -&compare_output($answer,&get_logfile(1)); +# TEST 1: Override with append -1; +run_make_test(' +X += X1 +override X += X2 +override Y += Y1 +Y += Y2 +all: ; @echo "$(X) $(Y)" +', + '', "X1 X2 Y1\n"); +# TEST 2: Override with append to the command line +run_make_test(undef, 'X=C Y=C', "C X2 C Y1\n"); +# Test override of define/endef +run_make_test(' +override define foo +@echo First comes the definition. +@echo Then comes the override. +endef +all: ; $(foo) +', + 'foo=Hello', "First comes the definition.\nThen comes the override.\n"); +1; -- cgit v1.2.3