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.
1104 lines
35 KiB
JavaScript
1104 lines
35 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 = 53336;
|
|
|
|
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 repa118() {
|
|
|
|
@if(@_fast)
|
|
var i, strTest, regExp;
|
|
@end
|
|
|
|
apInitTest("repa118");
|
|
m_scen = ('Test 13 numbers /\w\w\w\w|\w\w\w/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\w\w\w\w|\w\w\w/;
|
|
regExp = new Array();
|
|
|
|
objExp = 'a 1762';
|
|
strTest = '234 1762';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 a 1762';
|
|
strTest = '6 234 1762';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 a 706 17627';
|
|
strTest = '6 234 706 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 706 17627';
|
|
strTest = '234 706 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 = ' 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 = '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 = '26 a 17627 ';
|
|
strTest = '26 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 706 17627 ';
|
|
strTest = '23 234 706 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 6 a 706 17627 ';
|
|
strTest = '23 5 6 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 14 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 6 a 706 17627 23924272392 ';
|
|
strTest = '23 4 6 234 706 17627 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';
|
|
strTest = ' 6 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 = '6 a 17627 23 4 239242723923 4 ';
|
|
strTest = '6 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 = ' 6 a 23 4 23924272392';
|
|
strTest = ' 6 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 15 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 16 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 = ' 5 9 26 a 70635 8857 176271957920 239242723925';
|
|
strTest = ' 5 9 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 = '5 9 26 a 70635 8857 176271957920 239242723925 ';
|
|
strTest = '5 9 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
|
|
|
|
|
|
m_scen = ('Test 17 numbers /\w\w\w|\w\w\w/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\w\w\w|\w\w\w/;
|
|
regExp = new Array();
|
|
|
|
objExp = 'a 1762';
|
|
strTest = '234 1762';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 a 1762';
|
|
strTest = '6 234 1762';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 a 706 17627';
|
|
strTest = '6 234 706 17627';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = 'a 706 17627';
|
|
strTest = '234 706 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 = ' 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 = '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 = '26 a 17627 ';
|
|
strTest = '26 234 17627 ';
|
|
ArrayEqual(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 a 706 17627 ';
|
|
strTest = '23 234 706 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 6 a 706 17627 ';
|
|
strTest = '23 5 6 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 18 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 6 a 706 17627 23924272392 ';
|
|
strTest = '23 4 6 234 706 17627 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';
|
|
strTest = ' 6 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 = '6 a 17627 23 4 239242723923 4 ';
|
|
strTest = '6 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 = ' 6 a 23 4 23924272392';
|
|
strTest = ' 6 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 19 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 20 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 = ' 5 9 26 a 70635 8857 176271957920 239242723925';
|
|
strTest = ' 5 9 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 = '5 9 26 a 70635 8857 176271957920 239242723925 ';
|
|
strTest = '5 9 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
|
|
|
|
m_scen = ('Test 21 Failure - Lowercase /\w\W\w\W\W\W\w\W|\w\w\W\w\W\W\W\W\W/');
|
|
|
|
apInitScenario(m_scen);
|
|
regPat = /\w\W\w\W\W\W\w\W|\w\W\w\w\w\W\w\W\W\W\W\W/;
|
|
regExp = new Array();
|
|
|
|
objExp = '234 1762';
|
|
strTest = '234 1762';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 234 1762';
|
|
strTest = '6 234 1762';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
objExp = '6 234 706 17627';
|
|
strTest = '6 234 706 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '234 706 17627';
|
|
strTest = '234 706 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627';
|
|
strTest = ' 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '234 17627';
|
|
strTest = '234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 17627';
|
|
strTest = '6 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627';
|
|
strTest = ' 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 17627';
|
|
strTest = ' 6 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 234 17627';
|
|
strTest = '23 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 234 17627';
|
|
strTest = '23 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '26 234 17627 ';
|
|
strTest = '26 234 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 234 706 17627 ';
|
|
strTest = '23 234 706 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 234 17627 ';
|
|
strTest = '23 234 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 5 6 234 706 17627 ';
|
|
strTest = '23 5 6 234 706 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 22 Failure - Slightly more complex strings');
|
|
|
|
objExp = '234 17627 23 4 23924272392';
|
|
strTest = '234 17627 23 4 23924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627 23 4 23924272392';
|
|
strTest = ' 234 17627 23 4 23924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '23 4 6 234 706 17627 23924272392 ';
|
|
strTest = '23 4 6 234 706 17627 23924272392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 17627 23 4 239242723923';
|
|
strTest = ' 6 234 17627 23 4 239242723923';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 17627 23 4 239242723923 4 ';
|
|
strTest = '6 234 17627 23 4 239242723923 4 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 23 4 23924272392';
|
|
strTest = ' 6 234 23 4 23924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 17627 23 4 239242723923 7 ';
|
|
strTest = '6 234 17627 23 4 239242723923 7 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
|
|
m_scen = ('Test 23 Failure - Lowercase tests w/ multiples');
|
|
|
|
objExp = '234 17627';
|
|
strTest = '234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627';
|
|
strTest = ' 234 17627';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '234 17627 ';
|
|
strTest = '234 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 17627 ';
|
|
strTest = '6 234 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627 ';
|
|
strTest = ' 234 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 706 5 17627 ';
|
|
strTest = ' 234 706 5 17627 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
m_scen = ('Test 24 Failure - Slightly more complex strings w/ multiple finds');
|
|
|
|
objExp = '234 17627 23924272392';
|
|
strTest = '234 17627 23924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 234 17627 23924272392';
|
|
strTest = ' 234 17627 23924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '234 17627 23924272392 ';
|
|
strTest = '234 17627 23924272392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 5 9 26 234 70635 8857 176271957920 239242723925';
|
|
strTest = ' 5 9 26 234 70635 8857 176271957920 239242723925';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '5 9 26 234 70635 8857 176271957920 239242723925 ';
|
|
strTest = '5 9 26 234 70635 8857 176271957920 239242723925 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 706 6 17627 5239242723928';
|
|
strTest = ' 6 234 706 6 17627 5239242723928';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 706 7 17627 23924272392 ';
|
|
strTest = '6 234 706 7 17627 23924272392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 706 8 17627 239242723927 ';
|
|
strTest = ' 6 234 706 8 17627 239242723927 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 3 17627 6 234 70672392';
|
|
strTest = '6 234 3 17627 6 234 70672392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 3 17627 923924272392';
|
|
strTest = ' 6 234 3 17627 923924272392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '234 17627 234 70672392 ';
|
|
strTest = '234 17627 234 70672392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 706 3 176272 234 70672392';
|
|
strTest = ' 6 234 706 3 176272 234 70672392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '6 234 0 17627 234 70672392 ';
|
|
strTest = '6 234 0 17627 234 70672392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 6 234 706 223 1762723 26 234 70672392';
|
|
strTest = ' 6 234 706 223 1762723 26 234 70672392';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = '66 234 7060 12 176278 96 234 7062272392 ';
|
|
strTest = '66 234 7060 12 176278 96 234 7062272392 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
|
|
objExp = ' 16 234 7060 76 17627 1576 234 706723923050 ';
|
|
strTest = ' 16 234 7060 76 17627 1576 234 706723923050 ';
|
|
verify(sCat+strTest, objExp, strTest.replace(regPat, "a"));
|
|
@if (!@_fast)
|
|
regVerify(sCat+strTest, regExp, strTest.replace(regPat, "a"));
|
|
@end
|
|
/*****************************************************************************/
|
|
apEndTest();
|
|
}
|
|
|
|
|
|
repa118();
|
|
|
|
|
|
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() {}
|