1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : gregor.hartmann@oracle.com
30 '* short description :
32 '\******************************************************************************
34 testcase tCompareHelpApps()
36 if ( gIsoLang <> "en-US" ) then
37 printlog( "No testing for languages other than en_US" )
42 ' file related variables
43 dim sFileOut as string
45 dim sFileName as string
46 dim sProductName as string : sProductName = hStringReplaceChar( gProductName, " ", "_" )
48 ' the array that holds the names of the applications
49 dim aTopicsFromUI( 10 ) as string ' max index = 7 expected
51 ' some incremant variables and temporary stuff
52 dim iTopicsFromUI as integer
53 dim iCurrentItem as integer
54 dim sCurrentItem as string
58 ' define input and output paths, presetting variables
60 sFileName = sProductName & "_help_applications_" & gIsoLang & ".txt"
61 sFileOut = hGetWorkFile( sFilename )
62 sFileIn = gTesttoolPath & "framework\optional\input\help_browser\"
63 sFileIn = sFileIn & sFileName
64 sFileIn = convertpath( sFileIn )
66 aTopicsFromUI( 0 ) = "0"
70 warnlog( "Help not open, aborting test" )
75 hSelectHelpTab( "index" )
77 iTopicsFromUI = HelpAbout.getItemCount()
79 for iCurrentItem = 1 to iTopicsFromUI
81 HelpAbout.select( iCurrentItem )
82 sCurrentItem = HelpAbout.getSelText()
83 hListAppend( sCurrentItem, aTopicsFromUI() )
89 ' Compare the list against a reference or create a new list, if the
90 ' reference does not exist
92 printlog( "Beginning comparision" )
94 irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
95 hListResultEvaluation( irc , 0 )