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 tCompareHelpTopics()
36 if ( gIsoLang <> "en-US" ) then
37 printlog( "No testing for languages other than en_US" )
43 ' NOTE: As some of the entries might exists twice or multiple times it is quite
44 ' possible that the results are inaccurate. The new implementation of
45 ' gCompare2Lists() (hListCompare() as used here) should be able to
46 ' handle this. If problems occur, this shuld be the first place to
49 const MAX_ENTRIES = 25000
51 ' variables related to filenames
52 dim sFileOut as string
54 dim sfileName as string
56 ' The list that will hold all the entries
57 dim aTopicsFromUI( MAX_ENTRIES ) as string
59 ' some increment operators and temporary variables
60 dim iCurrentItem as integer
61 dim sCurrentItem as string
62 dim sProductName as string
63 dim iCurrentApp as integer
64 dim iAboutItems as integer
65 dim cAboutItem as string
67 dim bNextItem as boolean
69 ' define input and output paths, presetting variables
70 sProductName = hStringReplaceChar( gProductName, " ", "_" )
71 sFileName = sProductName & "_help_topics_" & gIsoLang & ".txt"
72 sFileOut = hGetWorkFile( sFilename )
73 sFileIn = gTesttoolPath & "framework\optional\input\help_browser\"
74 sFileIn = convertpath( sFileIn & sFileName )
76 aTopicsFromUI( 0 ) = "0"
78 if ( not hOpenHelp() ) then
79 warnlog( "Help not open, aborting test" )
83 hSelectHelpTab( "index" )
85 ' NOTE: This testcase will not warn about missing About-Items, this is done
86 ' by the update-test. But you will get an enormous list of missing
88 iAboutItems = HelpAbout.getItemCount()
90 for iCurrentApp = 1 to iAboutItems
92 HelpAbout.select( icurrentApp )
94 cAboutItem = HelpAbout.getSeltext()
102 SearchIndex.select( iCurrentItem )
103 sCurrentItem = cAboutItem & " : " & SearchIndex.getSelText()
104 hListAppend( sCurrentItem, aTopicsFromUI() )
105 iCurrentItem = iCurrentItem + 1
107 printlog( cAboutItem & ": Read " & iCurrentItem & " items" )
117 ' hManageComparisionList takes care of a lot of things like checking
118 ' for reference file and comparing or creating a new ref-file
120 printlog( "Beginning comparision. This will take a while ..." )
122 irc = hManageComparisionList( sFileIn, sFileOut, aTopicsFromUI() )
123 hListResultEvaluation( irc , 0 )