1 # -*-perl-*- 2 $description = "Test the addsuffix function."; 3 4 $details = ""; 5 6 7 open(MAKEFILE,"> $makefile"); 8 9 # The Contents of the MAKEFILE ... 10 11 print MAKEFILE <<EOMAKE; 12 string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks) 13 one: ; \@echo \$(string) 14 15 two: ; \@echo \$(addsuffix foo,) 16 EOMAKE 17 18 close(MAKEFILE); 19 20 21 # TEST 0 22 23 &run_make_with_options($makefile, "", &get_logfile); 24 $answer = "src${pathsep}a.b.z.foo.c hacks.c\n"; 25 &compare_output($answer,&get_logfile(1)); 26 27 28 # TEST 1 29 30 &run_make_with_options($makefile, "two", &get_logfile); 31 $answer = "\n"; 32 &compare_output($answer,&get_logfile(1)); 33 34 35 # This tells the test driver that the perl test script executed properly. 36 1; 37