sync master with lastest vba changes
[ooovba.git] / cppu / test / UnsafeBridge / UnsafeBridge.test.pl
blobf634406392ed1f33df7f098f913ca4b33798dd1d
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: UnsafeBridge.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:unsafe :A:unsafe \"-enter:A[0,not entered]-leave:A[0,not entered]\" :A:unsafe", # initially not entered&leave
42 "EnvStack.tester :unsafe:A :unsafe:A \"-enter:unsafe:A[1,OK]-leave:unsafe:A[1,OK]\" :unsafe", # enter
43 "EnvStack.tester \"\" :unsafe:A \"-into:unsafe:A[1,OK]\" :unsafe", # call into
44 "EnvStack.tester :unsafe :A \"-into:A[0,not entered]\" :unsafe", # call out
45 "EnvStack.tester \"\" :unsafe:affine:A \"-into:unsafe:affine:A[0,wrong thread]\" :unsafe", # wrong thread
46 "env.tester.bin CPP:unsafe"
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";