mirror of
https://github.com/SSCLI/sscli_20021101
synced 2026-06-08 12:28:57 +00:00
9fa3874800
Moved the original file to the archive subfolder.
2355 lines
57 KiB
JavaScript
2355 lines
57 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 = 53247;
|
|
|
|
var sCat = '';
|
|
var regPat = "";
|
|
var objExp = "";
|
|
var m_scen = '';
|
|
var strTest = "";
|
|
var strTemp = "";
|
|
var result = "";
|
|
|
|
|
|
|
|
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)
|
|
{ var i;
|
|
//Makes Sure that Arrays are equal
|
|
if (arrayAct == null)
|
|
verify(sCat1 + ' NULL Err', arrayExp, arrayAct);
|
|
else if (arrayExp.length != arrayAct.length)
|
|
verify(sCat1 + ' Array length', arrayExp.length, arrayAct.length);
|
|
else
|
|
{
|
|
for (i in arrayExp)
|
|
verify(sCat1 + ' index '+i, arrayExp[i], arrayAct[i]);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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 exec035() {
|
|
|
|
|
|
apInitTest("exec035");
|
|
|
|
|
|
|
|
m_scen = ('Test 1 MiXed Case /aBc|aSAdiaSkdlAakJsd/');
|
|
|
|
sCat = "Pattern: exist | non-exist ";
|
|
apInitScenario(m_scen);
|
|
regPat = /aBc|aSAdiaSkdlAakJsd/;
|
|
objExp = new Array('aBc');
|
|
var regExp = new Array();
|
|
|
|
var strTest = 'aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcE';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcE';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 2 Slightly more complex strings');
|
|
|
|
strTest = 'aBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc Ab c aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc Ab c aBRacaDabRaB';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc Ab c aBRacaDabrAb c ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc Ab c aBRacaDabrAb d ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 3 MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc aBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD EaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 4 Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc aBc aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo siEnaBcatheDral abRacaDabRae';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo siEnaBcatheDral abRacaDabRae ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE faBcg eabRacaDabRas';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn DaBc aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn saBc aBRacaDabRad ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc baBc raBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc baBc rabRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr baBca aBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vaBc aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AaBaBcAb AaaBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg mAaBcDs rzaBcxAaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfaBcwo mknoaBcaDabRaBlol ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 5 MiXed Case /aSAdiaSkdlAakJsd|aBc/');
|
|
|
|
sCat = "Pattern: non-exist | exist ";
|
|
apInitScenario(m_scen);
|
|
regPat = /aSAdiaSkdlAakJsd|aBc/;
|
|
objExp = new Array('aBc');
|
|
regExp = new Array();
|
|
|
|
strTest = 'aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcE';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcE';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 6 Slightly more complex strings');
|
|
|
|
strTest = 'aBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc Ab c aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc Ab c aBRacaDabRaB';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc Ab c aBRacaDabrAb c ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc Ab c aBRacaDabrAb d ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 7 MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc aBcE ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD EaBc ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 8 Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc aBc aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc aBc aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo siEnaBcatheDral abRacaDabRae';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo siEnaBcatheDral abRacaDabRae ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE faBcg eabRacaDabRas';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn DaBc aBRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn saBc aBRacaDabRad ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc baBc raBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc baBc rabRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc aBc aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr baBca aBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vaBc aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AaBaBcAb AaaBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg mAaBcDs rzaBcxAaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfaBcwo mknoaBcaDabRaBlol ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 9 MiXed Case /aBc|MnZ/');
|
|
|
|
sCat = "Pattern: exist found | exist ";
|
|
apInitScenario(m_scen);
|
|
regPat = /aBc|MnZ/;
|
|
objExp = new Array('aBc');
|
|
regExp = new Array();
|
|
|
|
strTest = 'aBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 10 Slightly more complex strings');
|
|
|
|
strTest = 'aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab c DaBcvMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcMnZd Ab c aBRacaDabRaB';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBcMnZd Ab c aBRacaDabrAb c ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc MnZd Ab c aBRacaDabrAb d ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 11 MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD eMnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 12 Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo sienMnZdthedral abRacaDabRae';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo sienMnZdthedral abRacaDabRae ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE fMnZd eabRacaDabRas';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn dMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn sMnZd abRacaDabRad ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc bMnZd raBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc bMnZd rabRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr bMnZDa aBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vMnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AabMnZDAb AaaBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg maMnZds rzaBcxAaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfMnZd mknoaBcaDabRaBlol ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 13 MiXed Case /MnZ|aBc/');
|
|
|
|
sCat = "Pattern: exist | exist found ";
|
|
apInitScenario(m_scen);
|
|
regPat = /MnZ|aBc/;
|
|
objExp = new Array('aBc');
|
|
regExp = new Array();
|
|
|
|
strTest = 'aBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 14 Slightly more complex strings');
|
|
|
|
strTest = 'aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab c DaBcvMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcMnZd Ab c aBRacaDabRaB';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBcMnZd Ab c aBRacaDabrAb c ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc MnZd Ab c aBRacaDabrAb d ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 15 MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD eMnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 16 Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo sienMnZdthedral abRacaDabRae';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo sienMnZdthedral abRacaDabRae ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE fMnZd eabRacaDabRas';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn dMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn sMnZd abRacaDabRad ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc bMnZd raBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc bMnZd rabRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr bMnZDa aBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vMnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AabMnZDAb AaaBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg maMnZds rzaBcxAaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfMnZd mknoaBcaDabRaBlol ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 17 MiXed Case /aBc|aBc/');
|
|
|
|
sCat = "Both Patterns same ";
|
|
apInitScenario(m_scen);
|
|
regPat = /aBc|aBc/;
|
|
objExp = new Array('aBc');
|
|
regExp = new Array();
|
|
|
|
strTest = 'aBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcMnZ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcEMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 18 Slightly more complex strings');
|
|
|
|
strTest = 'aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab c DaBcvMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcMnZd Ab c aBRacaDabRaB';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBcMnZd Ab c aBRacaDabrAb c ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc MnZd Ab c aBRacaDabrAb d ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 19 MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD eMnZd ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 20 Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd abRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo sienMnZdthedral abRacaDabRae';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo sienMnZdthedral abRacaDabRae ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE fMnZd eabRacaDabRas';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn dMnZd abRacaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn sMnZd abRacaDabRad ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc bMnZd raBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc bMnZd rabRacaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr bMnZDa aBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vMnZd aBcaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AabMnZDAb AaaBcaDabRa';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg maMnZds rzaBcxAaDabRa ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfMnZd mknoaBcaDabRaBlol ';
|
|
ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 21 Failure - MiXed Case /aBc|aBc/');
|
|
|
|
sCat = "Both Patterns do not exist ";
|
|
apInitScenario(m_scen);
|
|
regPat = /aBcg|MnZod/;
|
|
objExp = null;
|
|
regExp = new Array();
|
|
|
|
strTest = 'aBcMnZ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcMnZ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
strTest = 'DaBcEMnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBcEMnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBcMnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBaBc MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'ab aBcE MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab aBc MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'abE DaBcE MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 22 Failure - Slightly more complex strings');
|
|
|
|
strTest = 'aBcMnZd Ab c aBRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcMnZd Ab c aBRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'Ab c DaBcvMnZd abRacaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcMnZd Ab c aBRacaDabRaB';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBcMnZd Ab c aBRacaDabrAb c ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' EaBc Ab c aBRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'naBc MnZd Ab c aBRacaDabrAb d ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 23 Failure - MiXed Case tests w/ multiples');
|
|
|
|
strTest = 'aBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'DaBc MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBcD eMnZd ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
m_scen = ('Test 24 Failure - Slightly more complex strings w/ multiple finds');
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' aBc MnZd abRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd abRacaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' oRAnaBcabo sienMnZdthedral abRacaDabRae';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'oRAnaBcabo sienMnZdthedral abRacaDabRae ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcE fMnZd eabRacaDabRas';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'taBcn dMnZd abRacaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' DaBcn sMnZd abRacaDabRad ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'saBc bMnZd raBcaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBc bMnZd rabRacaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'aBc MnZd aBcaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' saBcr bMnZDa aBcaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'raBc vMnZd aBcaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' AaBcD AabMnZDAb AaaBcaDabRa';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = 'fgaBcDg maMnZds rzaBcxAaDabRa ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
|
|
strTest = ' mTaBcDg dfMnZd mknoaBcaDabRaBlol ';
|
|
verify(sCat+strTest, objExp, regPat.exec(strTest));
|
|
@if (!@_fast)
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, regPat.exec(strTest));
|
|
@end
|
|
@end
|
|
/*****************************************************************************/
|
|
apEndTest();
|
|
}
|
|
|
|
|
|
exec035();
|
|
|
|
|
|
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() {}
|