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 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: help_compare_applications.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : joerg.skottke@sun.com
36 '* short description :
38 '\******************************************************************************
40 testcase tCompareHelpApps()
42 if ( gIsoLang <> "en-US" ) then
43 printlog( "No testing for languages other than en_US" )
47 '///<h1>Compare the About-Items in the Help-Viewer against a reference</h1>
50 ' file related variables
51 dim sFileOut as string
53 dim sFileName as string
55 ' the array that holds the names of the applications
56 dim aTopicsFromUI( 10 ) as string ' max index = 7 expected
58 ' some incremant variables and temporary stuff
59 dim iTopicsFromUI as integer
60 dim iCurrentItem as integer
61 dim sCurrentItem as string
65 ' define input and output paths, presetting variables
66 sFileName = gProductName & "_help_applications_" & gIsoLang & ".txt"
67 sFileOut = hGetWorkFile( sFilename )
68 sFileIn = gTesttoolPath & "framework\optional\input\help_browser\"
69 sFileIn = sFileIn & sFileName
70 sFileIn = convertpath( sFileIn )
72 aTopicsFromUI( 0 ) = "0"
74 '///+<li>Open the Help</li>
77 warnlog( "Help not open, aborting test" )
82 '///+<li>Switch to the Index-Tab</li>
83 hSelectHelpTab( "index" )
85 '///+<li>Retrieve the number of About-Items (Listbox, to the upper left)</li>
86 iTopicsFromUI = HelpAbout.getItemCount()
88 '///+<li>copy the strings from the ListBox into an array</li>
89 for iCurrentItem = 1 to iTopicsFromUI
91 HelpAbout.select( iCurrentItem )
92 sCurrentItem = HelpAbout.getSelText()
93 hListAppend( sCurrentItem, aTopicsFromUI() )
99 ' Compare the list against a reference or create a new list, if the
100 ' reference does not exist
102 printlog( "Beginning comparision" )
104 '///+<li>Compare the array to the reference file</li>
105 irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
107 warnlog( "Something went wrong, please review the log" )