~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qmake/tests/scripts/variables/MAKECMDGOALS

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                                                    -*-perl-*-
 
2
 
 
3
$description = "Test the MAKECMDGOALS variable.";
 
4
 
 
5
$details = "\
 
6
We construct a makefile with various targets, all of which print out
 
7
\$(MAKECMDGOALS), then call it different ways.";
 
8
 
 
9
open(MAKEFILE,"> $makefile");
 
10
print MAKEFILE "\
 
11
.DEFAULT all:
 
12
        \@echo \$(MAKECMDGOALS)
 
13
";
 
14
close(MAKEFILE);
 
15
 
 
16
# TEST #1
 
17
 
 
18
&run_make_with_options($makefile,
 
19
                       "",
 
20
                       &get_logfile,
 
21
                       0);
 
22
$answer = "\n";
 
23
&compare_output($answer,&get_logfile(1));
 
24
 
 
25
# TEST #2
 
26
 
 
27
&run_make_with_options($makefile,
 
28
                       "all",
 
29
                       &get_logfile,
 
30
                       0);
 
31
$answer = "all\n";
 
32
&compare_output($answer,&get_logfile(1));
 
33
 
 
34
 
 
35
# TEST #3
 
36
 
 
37
&run_make_with_options($makefile,
 
38
                       "foo bar baz yaz",
 
39
                       &get_logfile,
 
40
                       0);
 
41
$answer = "foo bar baz yaz\nfoo bar baz yaz\nfoo bar baz yaz\nfoo bar baz yaz\n";
 
42
&compare_output($answer,&get_logfile(1));
 
43
 
 
44
 
 
45
# This tells the test driver that the perl test script executed properly.
 
46
1;
 
47
 
 
48
 
 
49
 
 
50
 
 
51
 
 
52