update dev300-m58
[ooovba.git] / cppu / test / EnvStack / EnvStack.test.pl
blob01c31d5bddde9ebf192796f06a1e9d3ec182482d
2 eval 'exec perl -wS $0 ${1+"$@"}'
3 if 0;
5 #*************************************************************************
7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 #
9 # Copyright 2008 by Sun Microsystems, Inc.
11 # OpenOffice.org - a multi-platform office productivity suite
13 # $RCSfile: EnvStack.test.pl,v $
15 # $Revision: 1.3 $
17 # This file is part of OpenOffice.org.
19 # OpenOffice.org is free software: you can redistribute it and/or modify
20 # it under the terms of the GNU Lesser General Public License version 3
21 # only, as published by the Free Software Foundation.
23 # OpenOffice.org is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU Lesser General Public License version 3 for more details
27 # (a copy is included in the LICENSE file that accompanied this code).
29 # You should have received a copy of the GNU Lesser General Public License
30 # version 3 along with OpenOffice.org. If not, see
31 # <http://www.openoffice.org/license.html>
32 # for a copy of the LGPLv3 License.
34 #*************************************************************************
36 my $rc = 0;
37 my $comment = "";
40 @tests = (
41 "EnvStack.tester \"\" \"\" \"\"",
42 "EnvStack.tester \":A:a\" \":A:b\" \"-enter:A-enter:A:a-out:A:a-into:A:b-leave:A:a-leave:A\"",
43 "EnvStack.tester \":A:B:a\" \":A:B:b\" \"-enter:A-enter:A:B-enter:A:B:a-out:A:B:a-into:A:B:b-leave:A:B:a-leave:A:B-leave:A\"",
44 "EnvStack.tester \":A:B:C:a\" \":A:B:C:b\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:a-out:A:B:C:a-into:A:B:C:b-leave:A:B:C:a-leave:A:B:C-leave:A:B-leave:A\"",
45 "EnvStack.tester \":A:B:C:D:a\" \":A:B:C:D:b\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-enter:A:B:C:D:a-out:A:B:C:D:a-into:A:B:C:D:b-leave:A:B:C:D:a-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
46 "EnvStack.tester \":A:a:b\" \":A:c:d\" \"-enter:A-enter:A:a-enter:A:a:b-out:A:a:b-out:A:a-into:A:c-into:A:c:d-leave:A:a:b-leave:A:a-leave:A\"",
47 "EnvStack.tester \":A:B:a:b\" \":A:B:c:d\" \"-enter:A-enter:A:B-enter:A:B:a-enter:A:B:a:b-out:A:B:a:b-out:A:B:a-into:A:B:c-into:A:B:c:d-leave:A:B:a:b-leave:A:B:a-leave:A:B-leave:A\"",
48 "EnvStack.tester \":A\" \"\" \"-enter:A-out:A-leave:A\"",
49 "EnvStack.tester \":A:B\" \"\" \"-enter:A-enter:A:B-out:A:B-out:A-leave:A:B-leave:A\"",
50 "EnvStack.tester \":A:B:C\" \"\" \"-enter:A-enter:A:B-enter:A:B:C-out:A:B:C-out:A:B-out:A-leave:A:B:C-leave:A:B-leave:A\"",
51 "EnvStack.tester \":A:B:C:D\" \"\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-out:A:B:C:D-out:A:B:C-out:A:B-out:A-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
52 "EnvStack.tester \"\" \":a\" \"-into:a\"",
53 "EnvStack.tester \"\" \":a:b\" \"-into:a-into:a:b\"",
54 "EnvStack.tester \"\" \":a:b:c\" \"-into:a-into:a:b-into:a:b:c\"",
55 "EnvStack.tester \"\" \":a:b:c:d\" \"-into:a-into:a:b-into:a:b:c-into:a:b:c:d\"",
56 "EnvStack.tester \":A\" \":a\" \"-enter:A-out:A-into:a-leave:A\"",
57 "EnvStack.tester \":A:B\" \":a:b\" \"-enter:A-enter:A:B-out:A:B-out:A-into:a-into:a:b-leave:A:B-leave:A\"",
58 "EnvStack.tester \":A:B:C\" \":a:b:c\" \"-enter:A-enter:A:B-enter:A:B:C-out:A:B:C-out:A:B-out:A-into:a-into:a:b-into:a:b:c-leave:A:B:C-leave:A:B-leave:A\"",
59 "EnvStack.tester \":A:B:C:D\" \":a:b:c:d\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-out:A:B:C:D-out:A:B:C-out:A:B-out:A-into:a-into:a:b-into:a:b:c-into:a:b:c:d-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
60 "EnvStack.tester \":A\" \":A\" \"-enter:A-leave:A\"",
61 "EnvStack.tester \":A:B\" \":A:B\" \"-enter:A-enter:A:B-leave:A:B-leave:A\"",
62 "EnvStack.tester \":A:B:C\" \":A:B:C\" \"-enter:A-enter:A:B-enter:A:B:C-leave:A:B:C-leave:A:B-leave:A\"",
63 "EnvStack.tester \":A:B:C:D\" \":A:B:C:D\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\""
66 foreach $test (@tests) {
67 $output = "";
69 $cmd = $test;
70 open TESTER, $cmd . "|";
71 while (<TESTER>) {
72 chomp;
74 $output = $output . "\t" . $_ . "\n";
76 close TESTER ;
78 if ($? != 0) {
79 $comment = $comment . "TEST FAILED: " . $cmd . "\n";
80 $comment = $comment . $output;
82 $rc = $rc + $?;
86 print $comment;
88 if ($rc == 0) {
89 print "*********** SUCCESS\n";
91 else {
92 print "*********** FAILURE\n";