<head></head><body><pre></font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># TEST: startup</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># Copyright (C) 2000  EMOS Computer Consulting GmbH</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># This test is free software; you can redistribute it and/or</font></i><font color=black>
</font><font color="#ff0000"><i># modify it under the terms of the GNU Lesser General Public</font></i><font color=black>
</font><font color="#ff0000"><i># License as published by the Free Software Foundation; either</font></i><font color=black>
</font><font color="#ff0000"><i># version 2.1 of the License, or (at your option) any later version.</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># This test is distributed in the hope that it will be useful,</font></i><font color=black>
</font><font color="#ff0000"><i># but WITHOUT ANY WARRANTY; without even the implied warranty of</font></i><font color=black>
</font><font color="#ff0000"><i># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font></i><font color=black>
</font><font color="#ff0000"><i># Lesser General Public License for more details.</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># You should have received a copy of the GNU Lesser General Public</font></i><font color=black>
</font><font color="#ff0000"><i># License along with this test; if not, write to the Free Software</font></i><font color=black>
</font><font color="#ff0000"><i># Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i># For further information please contact:</font></i><font color=black>
</font><font color="#ff0000"><i>#</font></i><font color=black>
</font><font color="#ff0000"><i>#	Dean Rajovic</font></i><font color=black>
</font><font color="#ff0000"><i>#	EMOS Computer Consulting GmbH</font></i><font color=black>
</font><font color="#ff0000"><i>#	Oskar-Messter-Straße 25</font></i><font color=black>
</font><font color="#ff0000"><i>#	85737 Ismaning</font></i><font color=black>
</font><font color="#ff0000"><i>#	Germany</font></i><font color=black>
</font><font color="#ff0000"><i>#	tel.: +49 89 608 765-0</font></i><font color=black>
</font><font color="#ff0000"><i>#	mailto:drajovic@emos.de</font></i><font color=black>
</font><font color="#ff0000"><i>#	http://www.emos.de</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>
</font><font color="#ff0000"><i># $Revision: 1.2 $</font></i><font color=black>
</font><font color="#ff0000"><i># $Author: drajovic $</font></i><font color=black>
</font><font color="#ff0000"><i># $Date: 2003/01/29 14:11:44 $</font></i><font color=black>
</font><font color="#ff0000"><i># $Source: d:/Archive/CVS_QS/EMOS/EMOS_FRM/WR/FRM/TPL/Scripts/startup/script,v $</font></i><font color=black>
</font><font color="#ff0000"><i># $NoKeywords: $</font></i><font color=black>
</font><font color="#ff0000"><i>################################################################################</font></i><font color=black>

</font><font color="#ff0000"><i>#**#</font></i><font color=black>
</font><font color="#ff0000"><i>#*	Make this script your startup test and place here all you allways need.</font></i><font color=black>
</font><font color="#ff0000"><i>#*	If you place your complete test suite under this directory you probably</font></i><font color=black>
</font><font color="#ff0000"><i>#*	won't need much more than what is already defined here.</font></i><font color=black>
</font><font color="#ff0000"><i>#*/</font></i><font color=black>

</font><font color="#ff0000"><i>#**</font></i><font color=black>
</font><font color="#ff0000"><i>#*	Trims given characters from the end of the given &lt;code&gt;str&lt;/code&gt;ing.</font></i><font color=black>
</font><font color="#ff0000"><i>#*	Use this function to ensure that getvar("curr_dir") allways returns the</font></i><font color=black>
</font><font color="#ff0000"><i>#*	same value. Sometimes it returns the path ended with backslash. In other</font></i><font color=black>
</font><font color="#ff0000"><i>#*	occasions (e.g. re-run the same test) it returns the same path without the</font></i><font color=black>
</font><font color="#ff0000"><i>#*	backslash.</font></i><font color=black>
</font><font color="#ff0000"><i>#*	@param str (in)	string to be right-trimmed</font></i><font color=black>
</font><font color="#ff0000"><i>#*	@param zap (in)	(optional) string to be trimmed [default: \]</font></i><font color=black>
</font><font color="#ff0000"><i>#*	@return the trimmed string</font></i><font color=black>
</font><font color="#ff0000"><i>#*/</font></i><font color=black>

<b>static</b> <b>function</b> strip_trail ( <b>in</b> str, <b>in</b> zap )
{
	<b>static</b> <b>const</b> DEFZAP = </font><font color="#00bb00">"&#92;&#92;"</font><font color=black>;
	<b>auto</b> slen, zlen;
	<b>if</b> ( zap == </font><font color="#00bb00">""</font><font color=black> ) 
		zap = DEFZAP;
	slen = <b>length</b>( str );
	zlen = <b>length</b>( zap );
	<b>if</b> ( slen &amp;&amp; substr( str, (slen-zlen+1) ) == zap )
		str = strip_trail( substr( str, 1, slen-zlen ) );
	<b>return</b> str;
}

</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># public constants</font></i><font color=black>
</font><font color="#ff0000"><i>#------------------</font></i><font color=black>

<b>public</b> <b>const</b> MROOT = getenv (</font><font color="#00bb00">"M_ROOT"</font><font color=black>);
<b>public</b> <b>const</b> TEST_HOME = strip_trail( getvar( </font><font color="#00bb00">"curr_dir"</font><font color=black> ), </font><font color="#00bb00">"&#92;&#92;"</font><font color=black> );
<b>public</b> <b>const</b> DATA_HOME = TEST_HOME &amp; </font><font color="#00bb00">"&#92;&#92;..&#92;&#92;Data"</font><font color=black>;
<b>public</b> <b>const</b> GUI_HOME = TEST_HOME &amp; </font><font color="#00bb00">"&#92;&#92;GUI"</font><font color=black>;

</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># search path</font></i><font color=black>
</font><font color="#ff0000"><i>#------------------</font></i><font color=black>

setvar(</font><font color="#00bb00">"searchpath"</font><font color=black>, sprintf( </font><font color="#00bb00">". .. &lt;%s&gt; &lt;%s&gt;"</font><font color=black> 
      , TEST_HOME
      , MROOT &amp; </font><font color="#00bb00">"&#92;&#92;lib"</font><font color=black> ) );

</font><font color="#ff0000"><i># Make sure yout timeout is fine (WR sometimes confuses msec with secs)</font></i><font color=black>
setvar(</font><font color="#00bb00">"timeout"</font><font color=black>, 10 );

</font><font color="#ff0000"><i># initialise Misha's re_func library (see STD/misha_std_re_func_lib)</font></i><font color=black>
</font><font color="#ff0000"><i>#re_func_init();</font></i><font color=black>

</font><font color="#ff0000"><i>#make sure WebTest AddIn is loaded</font></i><font color=black>

<b>if</b> ( !index( getenv(</font><font color="#00bb00">"ADDONS"</font><font color=black>), </font><font color="#00bb00">"WebTest"</font><font color=black> ) )
	<b>call</b> webinit();
web_set_timeout( 10 );

</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># load project libs</font></i><font color=black>
</font><font color="#ff0000"><i>#------------------</font></i><font color=black>

reload (</font><font color="#00bb00">"LIB&#92;&#92;AUT_lib"</font><font color=black>, 0, 1 );
reload (</font><font color="#00bb00">"LIB&#92;&#92;FRM_lib"</font><font color=black>, 0, 1 );
reload (</font><font color="#00bb00">"LIB&#92;&#92;FRM_TBL_lib"</font><font color=black>, 0, 1 );

</font><font color="#ff0000"><i># set debug mode</font></i><font color=black>
set_debug( TRUE );

</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># load global GUI-Map(s)</font></i><font color=black>
</font><font color="#ff0000"><i>#------------------</font></i><font color=black>

GUI_close_all();
load_GUI( GUI_HOME &amp; </font><font color="#00bb00">"&#92;&#92;"</font><font color=black> &amp; </font><font color="#00bb00">"Browser.gui"</font><font color=black> );
load_GUI( GUI_HOME &amp; </font><font color="#00bb00">"&#92;&#92;"</font><font color=black> &amp; </font><font color="#00bb00">"MercuryTours.gui"</font><font color=black> );

</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># Exceptions</font></i><font color=black>
</font><font color="#ff0000"><i>#------------------</font></i><font color=black>
</font><font color="#ff0000"><i># if you have any, define them here</font></i><font color=black>
</pre></body>