//# ==++== //# //# //# 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 = 221577; var sCat = ''; var regPat = ""; var objExp = ""; var m_scen = ''; var strTest = ""; var strTemp = ""; var result = ""; var regExp; 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 exec0271b() { apInitTest("exec0271b"); m_scen = ('Test 9 UPPERCASE /ABC{0,}/'); sCat = "Pattern: {0,} "; apInitScenario(m_scen); regPat = /ABC{0,}/; 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 = '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 = ' ABC '; ArrayEqual(sCat+strTest, objExp, regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC'; ArrayEqual(sCat+strTest, new Array('ABCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC '; ArrayEqual(sCat+strTest, new Array('ABCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC'; ArrayEqual(sCat+strTest, new Array('ABCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC '; ArrayEqual(sCat+strTest, new Array('ABCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC '; ArrayEqual(sCat+strTest, new Array('ABCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC'; ArrayEqual(sCat+strTest, new Array('ABCCCCCCCCCCCCCCCCCCCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC '; ArrayEqual(sCat+strTest, new Array('ABCCCCCCCCCCCCCCCCCCCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC'; ArrayEqual(sCat+strTest, new Array('ABCCCCCCCCCCCCCCCCCCCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC '; ArrayEqual(sCat+strTest, new Array('ABCCCCCCCCCCCCCCCCCCCC'), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC '; ArrayEqual(sCat+strTest, new Array('ABCCCCCCCCCCCCCCCCCCCC'), 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 = '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 strTemp = 'AB' strTest = 'AB'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'AB AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AB AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'AB AB C ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DAB AB C ABRACADABRAB'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DAB AB C ABRACADABRAB C '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCC' strTest = 'ABCC AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC AB C ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCC AB C ABRACADABRAB'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DABCC AB C ABRACADABRAB C '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCCCCCCCCCCCCCCCCCCCC' strTest = 'ABCCCCCCCCCCCCCCCCCCCC AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC AB C ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC AB C ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCCCCCCCCCCCCCCCCCCCC AB C ABRACADABRAB'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DABCCCCCCCCCCCCCCCCCCCC AB C ABRACADABRAB C '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end m_scen = ('Test 11 UPPERCASE 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 strTemp = 'AB' strTest = 'AB ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AB ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'AB ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DAB ABCE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AB ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABD EABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCC' strTest = 'ABCC ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DABCC ABCE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCD EABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCCCCCCCCCCCCCCCCCCCC' strTest = 'ABCCCCCCCCCCCCCCCCCCCC ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC ABC'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'DABCCCCCCCCCCCCCCCCCCCC ABCE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC ABC '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCCD EABC '; ArrayEqual(sCat+strTest, new Array(strTemp), 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 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 strTemp = 'AB' strTest = 'AB ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AB ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'AB ABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ORANABABO SIENABCATHEDRAL ABRACADABRAE'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ORANABABO SIENABCATHEDRAL ABRACADABRAE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABE FABCG EABRACADABRAS'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'TABN DABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABN SABC ABRACADABRAD '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'SAB BABC RABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SAB BABC RABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'AB ABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SABR BABCA ABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'RAB VABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AABD AABABCAB AAABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'FGABDG MAABCCDS RZABCXAADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' MTABDG DFABCWO MKNOABCADABRABLOL '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCC' strTest = 'ABCC ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCC ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC ABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ORANABCCABO SIENABCATHEDRAL ABRACADABRAE'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ORANABCCABO SIENABCATHEDRAL ABRACADABRAE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCCE FABCG EABRACADABRAS'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'TABCCN DABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCCN SABC ABRACADABRAD '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'SABCC BABC RABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SABCC BABC RABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCC ABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SABCCR BABCA ABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'RABCC VABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AABCCD AABABCAB AAABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'FGABCCDG MAABCCDS RZABCXAADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' MTABCCDG DFABCWO MKNOABCADABRABLOL '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTemp = 'ABCCCCCCCCCCCCCCCCCCCC' strTest = 'ABCCCCCCCCCCCCCCCCCCCC ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ABCCCCCCCCCCCCCCCCCCCC ABC ABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC ABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' ORANABCCCCCCCCCCCCCCCCCCCCABO SIENABCATHEDRAL ABRACADABRAE'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ORANABCCCCCCCCCCCCCCCCCCCCABO SIENABCATHEDRAL ABRACADABRAE '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCCCCCCCCCCCCCCCCCCCCE FABCG EABRACADABRAS'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'TABCCCCCCCCCCCCCCCCCCCCN DABC ABRACADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' DABCCCCCCCCCCCCCCCCCCCCN SABC ABRACADABRAD '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'SABCCCCCCCCCCCCCCCCCCCC BABC RABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SABCCCCCCCCCCCCCCCCCCCC BABC RABRACADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'ABCCCCCCCCCCCCCCCCCCCC ABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' SABCCCCCCCCCCCCCCCCCCCCR BABCA ABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'RABCCCCCCCCCCCCCCCCCCCC VABC ABCADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' AABCCCCCCCCCCCCCCCCCCCCD AABABCAB AAABCADABRA'; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = 'FGABCCCCCCCCCCCCCCCCCCCCDG MAABCCCCCCCCCCCCCCCCCCCCDS RZABCXAADABRA '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end strTest = ' MTABCCCCCCCCCCCCCCCCCCCCDG DFABCWO MKNOABCADABRABLOL '; ArrayEqual(sCat+strTest, new Array(strTemp), regPat.exec(strTest)); @if (!@_fast) @if (!@_fast) regVerify(sCat+strTest, regExp, regPat.exec(strTest)); @end @end /*****************************************************************************/ apEndTest(); } exec0271b(); 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() {}