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 : Search for a string, apply restrictions, verify
32 '\******************************************************************************
36 if ( gIsoLang <> "en-US" ) then
37 printlog( "No testing for languages other than en_US" )
41 const RC_LISTS_IDENTICAL = 0
47 dim sFileOut as string
48 dim aUIList( 100 ) as string
50 dim cBasePath as string
51 cBasePath = gTesttoolPath & "framework\optional\input\help_browser\"
52 dim cDataFile as string
53 dim sProductName as string : sProductName = hStringReplaceChar( gProductName, " ", "_" )
55 printlog( "Open Help Browser" )
56 if ( not hOpenHelp() ) then
57 warnlog( "Help not open, aborting test" )
61 printlog( "Go to the Find-Tabpage" )
62 if ( not hSelectHelpTab( "find" ) ) then
63 warnlog( "Could not access requested TabPage, aborting test" )
68 '----------- Search without filter -----------------------------------------
70 printlog( "Search for <java> without any filter" )
72 SearchFind.setText( "java" )
73 FindFullWords.unCheck()
74 FindInHeadingsOnly.unCheck()
78 ListAllDelete( aUIList() )
79 hGetListItems( Result, aUIList() )
82 cDataFile = sProductName & "_search_without_filter_" & gIsoLang & ".txt"
83 sFileOut = hGetWorkFile( cDataFile )
84 sFileIn = convertpath( cBasePath & cDataFile )
86 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
87 hListResultEvaluation( irc , RC_LISTS_IDENTICAL )
89 ' ------------ Search whole words only -------------------------------------
91 printlog( "Search for <java>, whole words only" )
93 SearchFind.setText( "java" )
95 FindInHeadingsOnly.unCheck()
99 ListAllDelete( aUIList() )
100 hGetListItems( Result, aUIList() )
102 cDataFile = sProductName & "_search_whole_words_only_" & gIsoLang & ".txt"
103 sFileOut = hGetWorkFile( cDataFile )
104 sFileIn = convertpath( cBasePath & cDataFile )
106 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
107 hListResultEvaluation( irc , RC_LISTS_IDENTICAL )
109 ' ------------ Search headings only ----------------------------------------
111 printlog( "Search for <java>, headings only" )
113 SearchFind.setText( "java" )
114 FindFullWords.unCheck()
115 FindInHeadingsOnly.Check()
119 ListAllDelete( aUIList() )
120 hGetListItems( Result, aUIList() )
122 cDataFile = sProductName & "_search_headings_only_" & gIsoLang & ".txt"
123 sFileOut = hGetWorkFile( cDataFile )
124 sFileIn = convertpath( cBasePath & cDataFile )
126 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
127 hListResultEvaluation( irc , RC_LISTS_IDENTICAL )
129 ' ------------ Search headings and whole words -----------------------------
131 printlog( "Search for <java>, limit results to whole words and headings" )
133 SearchFind.setText( "java" )
134 FindFullWords.Check()
135 FindInHeadingsOnly.Check()
139 ListAllDelete( aUIList() )
140 hGetListItems( Result, aUIList() )
142 cDataFile = sProductName & "_search_headings_and_whole_words_" & gIsoLang & ".txt"
143 sFileOut = hGetWorkFile( cDataFile )
144 sFileIn = convertpath( cBasePath & cDataFile )
146 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
147 hListResultEvaluation( irc , RC_LISTS_IDENTICAL )