3
$description = "The following test creates a makefile to test wildcard\n"
4
."expansions and the ability to put a command on the same\n"
5
."line as the target name separated by a semi-colon.";
7
$details = "This test creates 4 files by the names of 1.example, \n"
8
."two.example and 3.example. We execute three tests. The first\n"
9
."executes the print1 target which tests the '*' wildcard by \n"
10
."echoing all filenames by the name of '*.example'. The second\n"
11
."test echo's all files which match '?.example' and \n"
12
."[a-z0-9].example. Lastly we clean up all of the files using\n"
13
."the '*' wildcard as in the first test";
17
$delete_command = "delete_file -no_ask";
21
$delete_command = "rm";
25
open(MAKEFILE,"> $makefile");
27
# The Contents of the MAKEFILE ...
30
print1: ;\@echo \$(wildcard example.*)
32
\t\@echo \$(wildcard example.?)
33
\t\@echo \$(wildcard example.[a-z0-9])
34
\t\@echo \$(wildcard example.[!A-Za-z_\\!])
36
\t$delete_command \$(wildcard example.*)
39
# END of Contents of MAKEFILE
44
&touch("example.two");
46
&touch("example.for");
52
$answer = "example.1 example.3 example._ example.for example.two\n";
54
&run_make_with_options($makefile,"print1",&get_logfile);
56
&compare_output($answer,&get_logfile(1));
62
$answer = "example.1 example.3 example._\n"
63
."example.1 example.3\n"
64
."example.1 example.3\n";
66
&run_make_with_options($makefile,"print2",&get_logfile);
68
&compare_output($answer,&get_logfile(1));
74
$answer = "$delete_command example.1 example.3 example._ example.for example.two";
84
&run_make_with_options($makefile,"clean",&get_logfile);
86
&compare_output($answer,&get_logfile(1));
88
if ((-f "example.1")||(-f "example.two")||(-f "example.3")||(-f "example.for"))