3 $description = "The following test creates a makefile to test wildcard
4 expansions and the ability to put a command on the same
5 line as the target name separated by a semi-colon.";
8 This test creates 4 files by the names of 1.example,
9 two.example and 3.example. We execute three tests. The first
10 executes the print1 target which tests the '*' wildcard by
11 echoing all filenames by the name of '*.example'. The second
12 test echo's all files which match '?.example' and
13 [a-z0-9].example. Lastly we clean up all of the files using
14 the '*' wildcard as in the first test";
18 $delete_command = "delete_file -no_ask";
22 $delete_command = "rm";
26 open(MAKEFILE,"> $makefile");
28 # The Contents of the MAKEFILE ...
31 .PHONY: print1 print2 clean
32 print1: ;\@echo \$(wildcard example.*)
34 \t\@echo \$(wildcard example.?)
35 \t\@echo \$(wildcard example.[a-z0-9])
36 \t\@echo \$(wildcard example.[!A-Za-z_\\!])
38 \t$delete_command \$(wildcard example.*)
41 # END of Contents of MAKEFILE
46 &touch("example.two");
48 &touch("example.for");
54 $answer = "example.1 example.3 example._ example.for example.two\n";
56 &run_make_with_options($makefile,"print1",&get_logfile);
58 &compare_output($answer,&get_logfile(1));
64 $answer = "example.1 example.3 example._\n"
65 ."example.1 example.3\n"
66 ."example.1 example.3\n";
68 &run_make_with_options($makefile,"print2",&get_logfile);
70 &compare_output($answer,&get_logfile(1));
76 $answer = "$delete_command example.1 example.3 example._ example.for example.two";
86 &run_make_with_options($makefile,"clean",&get_logfile);
88 &compare_output($answer,&get_logfile(1));
90 if ((-f "example.1")||(-f "example.two")||(-f "example.3")||(-f "example.for"))