~ubuntu-branches/debian/sid/make-doc-non-dfsg/sid

« back to all changes in this revision

Viewing changes to tests/scripts/targets/clean

  • Committer: Package Import Robot
  • Author(s): Manoj Srivastava
  • Date: 2014-05-04 18:48:47 UTC
  • mfrom: (4.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20140504184847-50zxi1b08m22ehle
Tags: 4.0-2
Move to usntable, since the make binary package has been uploaded
there. No changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                                                    -*-perl-*-
 
2
 
 
3
$description = "The following test creates a makefile to delete a \n"
 
4
              ."file in the directory.  It tests to see if make will \n"
 
5
              ."NOT execute the command unless the rule is given in \n"
 
6
              ."the make command line.";
 
7
 
 
8
$example = "EXAMPLE_FILE";
 
9
 
 
10
open(MAKEFILE,"> $makefile");
 
11
 
 
12
# The Contents of the MAKEFILE ...
 
13
 
 
14
print MAKEFILE "all: \n";
 
15
print MAKEFILE "\t\@echo This makefile did not clean the dir... good\n";
 
16
print MAKEFILE "clean: \n";
 
17
print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
 
18
 
 
19
# END of Contents of MAKEFILE
 
20
 
 
21
close(MAKEFILE);
 
22
 
 
23
&touch($example);
 
24
 
 
25
 
 
26
&run_make_with_options($makefile,"",&get_logfile,0);
 
27
 
 
28
# Create the answer to what should be produced by this Makefile
 
29
$answer = "This makefile did not clean the dir... good\n";
 
30
 
 
31
&compare_output($answer,&get_logfile(1)) || &error ("abort");
 
32
 
 
33
 
 
34
$answer = "$delete_command $example\n";
 
35
&run_make_with_options($makefile,"clean",&get_logfile,0);
 
36
if (-f $example) {
 
37
  $test_passed = 0;
 
38
}
 
39
&compare_output($answer,&get_logfile(1)) || &error ("abort");
 
40
 
 
41
1;
 
42
 
 
43
 
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
 
 
50