Files
yallie 9fa3874800 Added the contents of the archive.
Moved the original file to the archive subfolder.
2017-11-20 16:11:42 +03:00

893 lines
24 KiB
JavaScript

//# ==++==
//#
//#
//# Copyright (c) 2002 Microsoft Corporation. All rights reserved.
//#
//# The use and distribution terms for this software are contained in the file
//# named license.txt, which can be found in the root of this distribution.
//# By using this software in any fashion, you are agreeing to be bound by the
//# terms of this license.
//#
//# You must not remove this notice, or any other, from this software.
//#
//#
//# ==--==
//####################################################################################
@cc_on
import System;
var NULL_DISPATCH = null;
var apGlobalObj;
var apPlatform;
var lFailCount;
var iTestID = 53583;
var sCat = '';
var regPat = "";
var objExp = "";
var strTest = "";
var regExp = ""
var m_scen = '';
var strTemp = "";
function verify(sCat1, sExp, sAct)
{
//this function makes sure sAct and sExp are equal
if (sExp != sAct)
apLogFailInfo( m_scen+(sCat1.length?"--"+sCat1:"")+" failed", sExp,sAct, "");
}
function verifyStringObj(sCat1, sExp, sAct)
{
//this function simply calls verify with the values of the string
verify(sCat1, sExp.valueOf(), sAct.valueOf());
}
function ArrayEqual(sCat1, arrayExp, arrayAct)
{
//redirects function call to verify
verify(sCat1, arrayExp, arrayAct);
}
function regVerify(sCat1, arrayReg, arrayAct)
{
var i;
var expArray = new Array('','','','','','','','','');
for (i in arrayReg)
if (i < 10)
expArray[i] = arrayReg[i];
else
break;
for(i =0; i<9;i++)
verify(sCat1 + ' RegExp.$'+ (i+1) +' ', expArray[i], eval('RegExp.$'+(i+1)));
}
function src_016() {
apInitTest("src_016");
m_scen = ('Test 1 Lowercase /^abc/');
sCat = "Pattern: begin ";
apInitScenario(m_scen);
regPat = /^abc/;
objExp = new Array('abc');
regExp = new Array();
objExp = 0;
strTest = 'abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcd';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcd ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 2 Slightly more complex strings');
strTest = 'abc ab c abracadabra';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc ab c abracadabra ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcd ab c abracadabrab c ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 3 Lowercase tests w/ multiples');
strTest = 'abc abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc abc ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcd abce ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 4 Slightly more complex strings w/ multiple finds');
strTest = 'abc abc abracadabra';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc abc abracadabra ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcabo sienabcathedral abracadabrae ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcn dabc abracadabra ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc abc abcadabra ';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcd aababcab aaabcadabra';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 5 Lowercase /abc$/');
sCat = "Pattern: end ";
apInitScenario(m_scen);
regPat = /abc$/;
objExp = new Array('abc');
regExp = new Array();
objExp = 0;
strTest = 'abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 1;
strTest = 'dabc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 6;
strTest = ' abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 3;
strTest = 'ab abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 8;
strTest = 'ab abc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 6 Slightly more complex strings');
objExp = 19;
strTest = 'anc ab c abracadabrabc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 33;
strTest = ' anc ab c abracadabrabc';
ArrayEqual(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 7 Lowercase tests w/ multiples');
objExp = 0;
strTest = 'abc abc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 5;
strTest = ' abc abc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 25;
strTest = ' ab c abc abc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 8 Slightly more complex strings w/ multiple finds');
objExp = 3;
strTest = 'ab abc ad ase hh abracadabrabc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc ad ase hh abracadabrabc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 18;
strTest = ' oranabcabo sienabcathedral abracadabrabc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 15;
strTest = ' dabce fabcg eabracadabrabc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
objExp = 1;
strTest = 'aabcd aababcab aaabcadabraaaaaaaaaaaaaaaaabc';
ArrayEqual(sCat+strTest, strTest.length - 3, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 9 Failure - Lowercase /^abc /');
sCat = "Pattern dows not exist: ";
apInitScenario(m_scen);
regPat = /^abc/;
objExp = -1;
strTest = ' abcmnz';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcmnz';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcemnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcemnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ababc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abce mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abe dabce mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 10 Failure - Slightly more complex strings');
strTest = ' abcmnzd ab c abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab c dabcvmnzd abracadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabcmnzd ab c abracadabrab';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcmnzd ab c abracadabrab c ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' eabc ab c abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'nabc mnzd ab c abracadabrab d ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 11 Failure - Lowercase tests w/ multiples');
strTest = ' abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcd emnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 12 Failure - Slightly more complex strings w/ multiple finds');
strTest = ' abc mnzd abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' oranabcabo sienmnzdthedral abracadabrae';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'oranabcabo sienmnzdthedral abracadabrae ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabce fmnzd eabracadabras';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'tabcn dmnzd abracadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabcn smnzd abracadabrad ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'sabc bmnzd rabcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' sabc bmnzd rabracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' sabcr bmnzda abcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'rabc vmnzd abcadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' aabcd aabmnzdab aaabcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'fgabcdg mamnzds rzabcxaadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' mtabcdg dfmnzd mknoabcadabrablol ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 13 Failure - Lowercase /abc$/');
sCat = " Patterns do not exist ";
apInitScenario(m_scen);
regPat = /abc$/;
objExp = -1;
strTest = 'abcmnz';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcmnz';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcemnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abcemnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abcmnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ababc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abce mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab abc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abe dabce mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 14 Failure - Slightly more complex strings');
strTest = 'abcmnzd ab c abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcmnzd ab c abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'ab c dabcvmnzd abracadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabcmnzd ab c abracadabrab';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabcmnzd ab c abracadabrab c ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' eabc ab c abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'nabc mnzd ab c abracadabrab d ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 15 Failure - Lowercase tests w/ multiples');
strTest = 'abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'dabc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abcd emnzd ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
m_scen = ('Test 16 Failure - Slightly more complex strings w/ multiple finds');
strTest = 'abc mnzd abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' abc mnzd abracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc mnzd abracadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' oranabcabo sienmnzdthedral abracadabrae';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'oranabcabo sienmnzdthedral abracadabrae ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabce fmnzd eabracadabras';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'tabcn dmnzd abracadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' dabcn smnzd abracadabrad ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'sabc bmnzd rabcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' sabc bmnzd rabracadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'abc mnzd abcadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' sabcr bmnzda abcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'rabc vmnzd abcadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' aabcd aabmnzdab aaabcadabra';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = 'fgabcdg mamnzds rzabcxaadabra ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
strTest = ' mtabcdg dfmnzd mknoabcadabrablol ';
verify(sCat+strTest, objExp, strTest.search(regPat));
@if (!@_fast)
regVerify(sCat+strTest, regExp, strTest.search(regPat));
@end
/*****************************************************************************/
apEndTest();
}
src_016();
if(lFailCount >= 0) System.Environment.ExitCode = lFailCount;
else System.Environment.ExitCode = 1;
function apInitTest(stTestName) {
lFailCount = 0;
apGlobalObj = new Object();
apGlobalObj.apGetPlatform = function Funca() { return "Rotor" }
apGlobalObj.LangHost = function Funcb() { return 1033;}
apGlobalObj.apGetLangExt = function Funcc(num) { return "EN"; }
apPlatform = apGlobalObj.apGetPlatform();
var sVer = "1.0"; //navigator.appVersion.toUpperCase().charAt(navigator.appVersion.toUpperCase().indexOf("MSIE")+5);
apGlobalObj.apGetHost = function Funcp() { return "Rotor " + sVer; }
print ("apInitTest: " + stTestName);
}
function apInitScenario(stScenarioName) {print( "\tapInitScenario: " + stScenarioName);}
function apLogFailInfo(stMessage, stExpected, stActual, stBugNum) {
lFailCount = lFailCount + 1;
print ("***** FAILED:");
print ("\t\t" + stMessage);
print ("\t\tExpected: " + stExpected);
print ("\t\tActual: " + stActual);
}
function apGetLocale(){ return 1033; }
function apWriteDebug(s) { print("dbg ---> " + s) }
function apEndTest() {}