update dev300-m58
[ooovba.git] / cppu / test / AffineBridge / AffineBridge.test.pl
blobdfac7cea314729ec1a697fe4bb25803375cf4fce
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: AffineBridge.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 :A:affine :A:affine \"-enter:A[0,not entered]-leave:A[0,not entered]\" :A:affine", # initially not entered&leave
42 "EnvStack.tester :affine:A :affine:A \"-enter:affine:A[1,OK]-leave:affine:A[1,OK]\" :affine", # enter
43 "EnvStack.tester \"\" :affine:A \"-into:affine:A[1,OK]\" :affine", # call into
44 "EnvStack.tester :affine :A \"-into:A[0,wrong thread]\" :affine", # call out
45 "EnvStack.tester \"\" :affine:affine:A \"-into:affine:affine:A[0,wrong thread]\" :affine", # wrong thread
46 "env.tester.bin CPP:affine"
49 foreach $test (@tests) {
50 $output = "";
52 $cmd = $test;
53 open TESTER, $cmd . "|";
54 while (<TESTER>) {
55 chomp;
57 $output = $output . "\t" . $_ . "\n";
59 close TESTER ;
61 if ($? != 0) {
62 $comment = $comment . "TEST FAILED: " . $cmd . "\n";
63 $comment = $comment . $output;
65 $rc = $rc + $?;
69 print $comment;
71 if ($rc == 0) {
72 print "*********** SUCCESS\n";
74 else {
75 print "*********** FAILURE\n";