1*7a4715d3SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*7a4715d3SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*7a4715d3SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*7a4715d3SAndrew Rist * distributed with this work for additional information
6*7a4715d3SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*7a4715d3SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*7a4715d3SAndrew Rist * "License"); you may not use this file except in compliance
9*7a4715d3SAndrew Rist * with the License. You may obtain a copy of the License at
10*7a4715d3SAndrew Rist *
11*7a4715d3SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*7a4715d3SAndrew Rist *
13*7a4715d3SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*7a4715d3SAndrew Rist * software distributed under the License is distributed on an
15*7a4715d3SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7a4715d3SAndrew Rist * KIND, either express or implied. See the License for the
17*7a4715d3SAndrew Rist * specific language governing permissions and limitations
18*7a4715d3SAndrew Rist * under the License.
19*7a4715d3SAndrew Rist *
20*7a4715d3SAndrew Rist *************************************************************/
21*7a4715d3SAndrew Rist
22*7a4715d3SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_soltools.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include <stdio.h>
28cdf0e10cSrcweir
29cdf0e10cSrcweir #ifndef _SOLTOOLS_TESTSHL_TLOG_HXX_
30cdf0e10cSrcweir #include "inc/tlog.hxx"
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir
33cdf0e10cSrcweir #ifndef _SOLTOOLS_TESTSHL_TSTMGR_HXX_
34cdf0e10cSrcweir #include "inc/tstMgr.hxx"
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir
37cdf0e10cSrcweir using namespace tstutl;
38cdf0e10cSrcweir
39cdf0e10cSrcweir void usage();
40cdf0e10cSrcweir void test_shl( vector< sal_Char* > cmdln, sal_Bool boom );
41cdf0e10cSrcweir
42cdf0e10cSrcweir #if (defined UNX) || (defined OS2)
main(int argc,char * argv[])43cdf0e10cSrcweir int main( int argc, char* argv[] )
44cdf0e10cSrcweir #else
45cdf0e10cSrcweir int _cdecl main( int argc, char* argv[] )
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir {
48cdf0e10cSrcweir if ( argc < 3 ) {
49cdf0e10cSrcweir usage();
50cdf0e10cSrcweir }
51cdf0e10cSrcweir sal_Bool boom = sal_False;
52cdf0e10cSrcweir vector< sal_Char* > cmdln;
53cdf0e10cSrcweir
54cdf0e10cSrcweir sal_Int32 i;
55cdf0e10cSrcweir for ( i = 1; i < argc; i++ ) {
56cdf0e10cSrcweir sal_Char* ptr = argv[i];
57cdf0e10cSrcweir if ( ptr[0] == '-' ) {
58cdf0e10cSrcweir boom = sal_True;
59cdf0e10cSrcweir }
60cdf0e10cSrcweir else {
61cdf0e10cSrcweir cmdln.push_back( ptr );
62cdf0e10cSrcweir }
63cdf0e10cSrcweir }
64cdf0e10cSrcweir if ( cmdln.size() < 3 ) {
65cdf0e10cSrcweir cmdln.push_back( 0 );
66cdf0e10cSrcweir }
67cdf0e10cSrcweir if ( ! cmdln[0] || ! cmdln[1] ) {
68cdf0e10cSrcweir usage();
69cdf0e10cSrcweir }
70cdf0e10cSrcweir
71cdf0e10cSrcweir test_shl( cmdln, boom );
72cdf0e10cSrcweir
73cdf0e10cSrcweir return(0);
74cdf0e10cSrcweir }
75cdf0e10cSrcweir
test_shl(vector<sal_Char * > cmdln,sal_Bool boom)76cdf0e10cSrcweir void test_shl( vector< sal_Char*> cmdln, sal_Bool boom ) {
77cdf0e10cSrcweir
78cdf0e10cSrcweir tstMgr tst;
79cdf0e10cSrcweir
80cdf0e10cSrcweir if ( tst.initialize( cmdln[0], boom )) {
81cdf0e10cSrcweir tst.test_EntriesFromFile( cmdln[1], cmdln[2] );
82cdf0e10cSrcweir }
83cdf0e10cSrcweir else {
84cdf0e10cSrcweir sal_Char* msg = "could not find module\n";
85cdf0e10cSrcweir fprintf( stdout, "%s\n", msg );
86cdf0e10cSrcweir }
87cdf0e10cSrcweir }
88cdf0e10cSrcweir
usage()89cdf0e10cSrcweir void usage(){
90cdf0e10cSrcweir fprintf( stdout,
91cdf0e10cSrcweir "USAGE: testSHL shlname scename [logname] [-boom]\n" );
92cdf0e10cSrcweir exit(0);
93cdf0e10cSrcweir }
94cdf0e10cSrcweir
95