* Various fixes for problems in the 3.79.0.1 pretest.
[make/kirr.git] / tests / scripts / functions / addsuffix
blobda4fbb71f5a497be89d809b262e28b7c23fe303f
1 #                                                                    -*-perl-*-
2 $description = "Test the addsuffix function.";
4 $details = "";
7 open(MAKEFILE,"> $makefile");
9 # The Contents of the MAKEFILE ...
11 print MAKEFILE <<EOMAKE;
12 string := \$(addsuffix .c,src${pathsep}a.b.z.foo hacks)
13 one: ; \@echo \$(string)
15 two: ; \@echo \$(addsuffix foo,)
16 EOMAKE
18 close(MAKEFILE);
21 # TEST 0
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));
28 # TEST 1
30 &run_make_with_options($makefile, "two", &get_logfile);
31 $answer = "\n";
32 &compare_output($answer,&get_logfile(1));
35 # This tells the test driver that the perl test script executed properly.