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.
1076 lines
34 KiB
JavaScript
1076 lines
34 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 = 53357;
|
|
|
|
var sCat = '';
|
|
var regPat = "";
|
|
var objExp = "";
|
|
var regExp = "";
|
|
var strTest = "";
|
|
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)
|
|
{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 rep_128() {
|
|
|
|
@if(@_fast)
|
|
var i, strTest, regExp;
|
|
@end
|
|
|
|
apInitTest("rep_128");
|
|
|
|
|
|
m_scen = ('Test 1 numbers /\d\d\d|\D\D\D\D\D\D\D\d\D\D\D\D\D/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\d\d\d|\D\D\D\D\D\D\D\d\D\D\D\D\D/;
|
|
regExp = new Array();
|
|
|
|
objExp = 'a';
|
|
strTest = '234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
objExp = 'a 706';
|
|
strTest = '234 706';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a';
|
|
strTest = ' 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a ';
|
|
strTest = '234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = ' a ';
|
|
strTest = ' 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a';
|
|
strTest = '23 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a';
|
|
strTest = '23 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a ';
|
|
strTest = '23 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 706 ';
|
|
strTest = '23 234 706 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a ';
|
|
strTest = '23 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 2 Slightly more complex strings');
|
|
|
|
objExp = 'a 23 4 23924272392';
|
|
strTest = '234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 23 4 23924272392';
|
|
strTest = ' 234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 23 4 23924272392 ';
|
|
strTest = '234 23 4 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 2 3 4 a 4 239242723923';
|
|
strTest = ' 2 3 4 234 4 239242723923';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 2 3 4 a 4 239242723923 4 ';
|
|
strTest = ' 2 3 4 234 4 239242723923 4 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 23 4 23924272392';
|
|
strTest = ' 234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 23 4 239242723923 7 ';
|
|
strTest = '234 23 4 239242723923 7 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 3 numbers tests w/ multiples');
|
|
|
|
objExp = 'a 234';
|
|
strTest = '234 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234';
|
|
strTest = ' 234 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 ';
|
|
strTest = '234 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 234 706 ';
|
|
strTest = '7 234 234 706 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234 ';
|
|
strTest = ' 234 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 706 6 234 ';
|
|
strTest = ' 234 706 6 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 4 Slightly more complex strings w/ multiple finds');
|
|
|
|
objExp = 'a 234 23924272392';
|
|
strTest = '234 234 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234 23924272392';
|
|
strTest = ' 234 234 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 23924272392 ';
|
|
strTest = '234 234 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 706355927 8856 234 7061957920 239242723925';
|
|
strTest = ' 234 706355927 8856 234 7061957920 239242723925';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 70635 8856 234 7061957920 239242723925 ';
|
|
strTest = '234 70635 8856 234 7061957920 239242723925 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 706 6 234 706 5239242723928';
|
|
strTest = ' 7 234 706 6 234 706 5239242723928';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 706 6 234 23924272392 ';
|
|
strTest = '234 706 6 234 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 706 6 234 239242723927 ';
|
|
strTest = ' 234 706 6 234 239242723927 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 6 234 6 234 70672392';
|
|
strTest = '234 6 234 6 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 6 234 923924272392';
|
|
strTest = ' 234 6 234 923924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 234 70672392 ';
|
|
strTest = '234 234 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 8 a 706 6 234 706 234 70672392';
|
|
strTest = ' 8 234 706 6 234 706 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 2 3 4 0 a 234 70672392 ';
|
|
strTest = ' 2 3 4 0 234 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 2 a 706 226 234 7063 26 234 70672392';
|
|
strTest = ' 2 234 706 226 234 7063 26 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '60 a 7060 16 234 7068 96 234 7062272392 ';
|
|
strTest = '60 234 7060 16 234 7068 96 234 7062272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 11 a 7060 76 234 7065 1576 234 706723923050 ';
|
|
strTest = ' 11 234 7060 76 234 7065 1576 234 706723923050 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 5 numbers /\D\D\D\D\D\D\D\d\D\D\D\D\D|\d\d\d/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\D\D\D\D\D\D\D\d\D\D\D\D\D|\d\d\d/;
|
|
regExp = new Array();
|
|
|
|
objExp = 'a';
|
|
strTest = '234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '7 a';
|
|
strTest = '7 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '7 a 706';
|
|
strTest = '7 234 706';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 706';
|
|
strTest = '234 706';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a';
|
|
strTest = ' 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a ';
|
|
strTest = '234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a ';
|
|
strTest = '7 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a ';
|
|
strTest = ' 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a ';
|
|
strTest = ' 7 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a';
|
|
strTest = '23 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a';
|
|
strTest = '23 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a ';
|
|
strTest = '23 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 706 ';
|
|
strTest = '23 234 706 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a ';
|
|
strTest = '23 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 5 6 a 706 ';
|
|
strTest = '23 5 6 234 706 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 6 Slightly more complex strings');
|
|
|
|
objExp = 'a 23 4 23924272392';
|
|
strTest = '234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 23 4 23924272392';
|
|
strTest = ' 234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 23 4 23924272392 ';
|
|
strTest = '234 23 4 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 23 4 239242723923';
|
|
strTest = ' 7 234 23 4 239242723923';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 23 4 239242723923 4 ';
|
|
strTest = '7 234 23 4 239242723923 4 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 5 a 23 4 23924272392';
|
|
strTest = ' 5 234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 23 4 239242723923 7 ';
|
|
strTest = '7 234 23 4 239242723923 7 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 7 numbers tests w/ multiples');
|
|
|
|
objExp = 'a 234';
|
|
strTest = '234 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234';
|
|
strTest = ' 234 234';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 ';
|
|
strTest = '234 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 234 706 ';
|
|
strTest = '7 234 234 706 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234 ';
|
|
strTest = ' 234 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 706 6 234 ';
|
|
strTest = ' 234 706 6 234 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 8 Slightly more complex strings w/ multiple finds');
|
|
|
|
objExp = 'a 234 23924272392';
|
|
strTest = '234 234 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 234 23924272392';
|
|
strTest = ' 234 234 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 23924272392 ';
|
|
strTest = '234 234 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 59 2 7 a 70635 8856 234 7061957920 239242723925';
|
|
strTest = ' 59 2 7 234 70635 8856 234 7061957920 239242723925';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '59 27 a 70635 8856 234 7061957920 239242723925 ';
|
|
strTest = '59 27 234 70635 8856 234 7061957920 239242723925 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 706 6 234 706 5239242723928';
|
|
strTest = ' 7 234 706 6 234 706 5239242723928';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '1 a 706 6 234 23924272392 ';
|
|
strTest = '1 234 706 6 234 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 706 6 234 239242723927 ';
|
|
strTest = ' 7 234 706 6 234 239242723927 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '8 a 6 234 6 234 70672392';
|
|
strTest = '8 234 6 234 6 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 8 a 6 234 923924272392';
|
|
strTest = ' 8 234 6 234 923924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 234 234 70672392 ';
|
|
strTest = '234 234 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 8 a 706 6 234 706 234 70672392';
|
|
strTest = ' 8 234 706 6 234 706 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '9 a 6 234 234 70672392 ';
|
|
strTest = '9 234 6 234 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 2 a 706 226 234 7063 26 234 70672392';
|
|
strTest = ' 2 234 706 226 234 7063 26 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '60 a 7060 16 234 7068 96 234 7062272392 ';
|
|
strTest = '60 234 7060 16 234 7068 96 234 7062272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 11 a 7060 76 234 7065 1576 234 706723923050 ';
|
|
strTest = ' 11 234 7060 76 234 7065 1576 234 706723923050 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 9 numbers /\d\d\d|\d\d\d\d/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\d\d\d|\d\d\d\d/;
|
|
regExp = new Array();
|
|
|
|
objExp = 'a 17622';
|
|
strTest = '234 17622';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '7 a 1762';
|
|
strTest = '7 234 1762';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '7 a 5 17627';
|
|
strTest = '7 234 5 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 5 17627';
|
|
strTest = '234 5 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627';
|
|
strTest = ' 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 17627';
|
|
strTest = '234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 17627';
|
|
strTest = '7 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627';
|
|
strTest = ' 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 17627';
|
|
strTest = ' 7 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 17627';
|
|
strTest = '23 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 17627';
|
|
strTest = '23 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 17627 ';
|
|
strTest = '23 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 5 17627 ';
|
|
strTest = '23 234 5 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 17627 ';
|
|
strTest = '23 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 5 7 a 706 17627 ';
|
|
strTest = '23 5 7 234 706 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 10 Slightly more complex strings');
|
|
|
|
objExp = 'a 17627 23 4 23924272392';
|
|
strTest = '234 17627 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627 23 4 23924272392';
|
|
strTest = ' 234 17627 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 4 7 a 706 17627 23924272392 ';
|
|
strTest = '23 4 7 234 706 17627 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 7 a 17627 23 4 239242723923';
|
|
strTest = ' 7 234 17627 23 4 239242723923';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '7 a 17627 23 4 239242723923 4 ';
|
|
strTest = '7 234 17627 23 4 239242723923 4 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 5 a 23 4 23924272392';
|
|
strTest = ' 5 234 23 4 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 a 17627 23 4 239242723923 7 ';
|
|
strTest = '6 234 17627 23 4 239242723923 7 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 11 numbers tests w/ multiples');
|
|
|
|
objExp = 'a 17627';
|
|
strTest = '234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627';
|
|
strTest = ' 234 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 17627 ';
|
|
strTest = '234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 a 17627 ';
|
|
strTest = '6 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627 ';
|
|
strTest = ' 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 706 5 17627 ';
|
|
strTest = ' 234 706 5 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 12 Slightly more complex strings w/ multiple finds');
|
|
|
|
objExp = 'a 17627 23924272392';
|
|
strTest = '234 17627 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' a 17627 23924272392';
|
|
strTest = ' 234 17627 23924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 17627 23924272392 ';
|
|
strTest = '234 17627 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 59 26 a 70635 8857 176271957920 239242723925';
|
|
strTest = ' 59 26 234 70635 8857 176271957920 239242723925';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '59 26 a 70635 8857 176271957920 239242723925 ';
|
|
strTest = '59 26 234 70635 8857 176271957920 239242723925 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 a 706 6 17627 5239242723928';
|
|
strTest = ' 6 234 706 6 17627 5239242723928';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 a 706 7 17627 23924272392 ';
|
|
strTest = '6 234 706 7 17627 23924272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 a 706 8 17627 239242723927 ';
|
|
strTest = ' 6 234 706 8 17627 239242723927 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 a 3 17627 6 234 70672392';
|
|
strTest = '6 234 3 17627 6 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 a 3 17627 923924272392';
|
|
strTest = ' 6 234 3 17627 923924272392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 17627 234 70672392 ';
|
|
strTest = '234 17627 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 a 706 3 176272 234 70672392';
|
|
strTest = ' 6 234 706 3 176272 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 a 0 17627 234 70672392 ';
|
|
strTest = '6 234 0 17627 234 70672392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 a 706 223 1762723 26 234 70672392';
|
|
strTest = ' 6 234 706 223 1762723 26 234 70672392';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '66 a 7060 12 176278 96 234 7062272392 ';
|
|
strTest = '66 234 7060 12 176278 96 234 7062272392 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 16 a 7060 76 17627 1576 234 706723923050 ';
|
|
strTest = ' 16 234 7060 76 17627 1576 234 706723923050 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
/*****************************************************************************/
|
|
apEndTest();
|
|
}
|
|
|
|
|
|
rep_128();
|
|
|
|
|
|
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() {}
|