Minor change: improving variable names for greater clarity -

This commit is contained in:
pschwartau%netscape.com 2001-04-26 00:18:09 +00:00
parent ab41e1cf3a
commit 1097cf1b6d
8 changed files with 119 additions and 119 deletions

View File

@ -52,23 +52,23 @@ var cnFAILURE = 'RegExp() did NOT return the supplied RegExp object';
var i = -1; var j = -1; var s = ''; var f = '';
var obj = {};
var status = ''; var actual = ''; var expect = '';
var match = new Array();
var flag = new Array();
var patterns = new Array();
var flags = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// various flags to try -
flag[0] = 'i';
flag[1] = 'g';
flag[2] = 'm';
flag[3] = undefined;
flags[0] = 'i';
flags[1] = 'g';
flags[2] = 'm';
flags[3] = undefined;
@ -83,13 +83,13 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
for (j in flag)
for (j in flags)
{
f = flag[j];
f = flags[j];
status = getStatus(s, f);
obj = new RegExp(s, f);

View File

@ -60,23 +60,23 @@ var cnFAILURE = 'RegExp() did NOT return the supplied RegExp object';
var i = -1; var j = -1; var s = ''; var f = '';
var obj = {};
var status = ''; var actual = ''; var expect = '';
var match = new Array();
var flag = new Array();
var patterns = new Array();
var flags = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// various flags to try -
flag[0] = 'i';
flag[1] = 'g';
flag[2] = 'm';
flag[3] = undefined;
flags[0] = 'i';
flags[1] = 'g';
flags[2] = 'm';
flags[3] = undefined;
@ -91,13 +91,13 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
for (j in flag)
for (j in flags)
{
f = flag[j];
f = flags[j];
status = getStatus(s, f);
obj = new RegExp(s, f);

View File

@ -55,16 +55,16 @@ var singlequote = "'";
var i = -1; var s = '';
var obj1 = {}; var obj2 = {};
var status = ''; var actual = ''; var expect = ''; var msg = '';
var match = new Array();
var patterns = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
@ -79,9 +79,9 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
status =getStatus(s);
obj1 = new RegExp(s);
obj2 = new RegExp(obj1);

View File

@ -61,16 +61,16 @@ var singlequote = "'";
var i = -1; var s = '';
var obj1 = {}; var obj2 = {};
var status = ''; var actual = ''; var expect = ''; var msg = '';
var match = new Array();
var patterns = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
@ -85,9 +85,9 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
status =getStatus(s);
obj1 = new RegExp(s);
obj2 = new RegExp(obj1, undefined); // see introduction to bug

View File

@ -56,23 +56,23 @@ var singlequote = "'";
var i = -1; var j = -1; var s = '';
var obj1 = {}; var obj2 = {};
var status = ''; var actual = ''; var expect = ''; var msg = '';
var match = new Array();
var flag = new Array();
var patterns = new Array();
var flags = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// various flags to try -
flag[0] = 'i';
flag[1] = 'g';
flag[2] = 'm';
flag[3] = undefined;
flags[0] = 'i';
flags[1] = 'g';
flags[2] = 'm';
flags[3] = undefined;
@ -87,13 +87,13 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
for (j in flag)
for (j in flags)
{
f = flag[j];
f = flags[j];
status = getStatus(s, f);
obj1 = new RegExp(s, f);
obj2 = new RegExp(obj1);

View File

@ -62,23 +62,23 @@ var singlequote = "'";
var i = -1; var j = -1; var s = '';
var obj1 = {}; var obj2 = {};
var status = ''; var actual = ''; var expect = ''; var msg = '';
var match = new Array();
var flag = new Array();
var patterns = new Array();
var flags = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// various flags to try -
flag[0] = 'i';
flag[1] = 'g';
flag[2] = 'm';
flag[3] = undefined;
flags[0] = 'i';
flags[1] = 'g';
flags[2] = 'm';
flags[3] = undefined;
@ -93,13 +93,13 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
for (j in flag)
for (j in flags)
{
f = flag[j];
f = flags[j];
status = getStatus(s, f);
obj1 = new RegExp(s, f);
obj2 = new RegExp(obj1, undefined); // see introduction to bug

View File

@ -51,22 +51,22 @@ var cnFAILURE = 'Expected an exception to be thrown, but none was -';
var singlequote = "'";
var i = -1; var j = -1; var s = ''; var f = '';
var obj1 = {}; var obj2 = {};
var match = new Array();
var flag = new Array();
var patterns = new Array();
var flags = new Array();
// various regular expressions to try -
match[0] = '';
match[1] = 'abc';
match[2] = '(.*)(3-1)\s\w';
match[3] = '(.*)(...)\\s\\w';
match[4] = '[^A-Za-z0-9_]';
match[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
patterns[0] = '';
patterns[1] = 'abc';
patterns[2] = '(.*)(3-1)\s\w';
patterns[3] = '(.*)(...)\\s\\w';
patterns[4] = '[^A-Za-z0-9_]';
patterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// various flags to try -
flag[0] = 'i';
flag[1] = 'g';
flag[2] = 'm';
flags[0] = 'i';
flags[1] = 'g';
flags[2] = 'm';
@ -81,13 +81,13 @@ function test()
printBugNumber (bug);
printStatus (summary);
for (i in match)
for (i in patterns)
{
s = match[i];
s = patterns[i];
for (j in flag)
for (j in flags)
{
f = flag[j];
f = flags[j];
printStatus(getStatus(s, f));
obj1 = new RegExp(s, f);
obj2 = new RegExp(obj1, f); // this should cause an exception

View File

@ -37,34 +37,34 @@ var singlequote = "'";
var i = -1; var j = -1; var s = ''; var f = '';
var obj = {};
var status = ''; var actual = ''; var expect = ''; var msg = '';
var legalmatch = new Array(); var illegalmatch = new Array();
var legalflag = new Array(); var illegalflag = new Array();
var legalpatterns = new Array(); var illegalpatterns = new Array();
var legalflags = new Array(); var illegalflags = new Array();
// valid regular expressions to try -
legalmatch[0] = '';
legalmatch[1] = 'abc';
legalmatch[2] = '(.*)(3-1)\s\w';
legalmatch[3] = '(.*)(...)\\s\\w';
legalmatch[4] = '[^A-Za-z0-9_]';
legalmatch[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
legalpatterns[0] = '';
legalpatterns[1] = 'abc';
legalpatterns[2] = '(.*)(3-1)\s\w';
legalpatterns[3] = '(.*)(...)\\s\\w';
legalpatterns[4] = '[^A-Za-z0-9_]';
legalpatterns[5] = '[^\f\n\r\t\v](123.5)([4 - 8]$)';
// invalid regular expressions to try -
illegalmatch[0] = '()';
illegalmatch[1] = '(a';
illegalmatch[2] = '( ]';
illegalmatch[3] = '\d{s}';
illegalpatterns[0] = '()';
illegalpatterns[1] = '(a';
illegalpatterns[2] = '( ]';
illegalpatterns[3] = '\d{s}';
// valid flags to try -
legalflag[0] = 'i';
legalflag[1] = 'g';
legalflag[2] = 'm';
legalflag[3] = undefined;
legalflags[0] = 'i';
legalflags[1] = 'g';
legalflags[2] = 'm';
legalflags[3] = undefined;
// invalid flags to try -
illegalflag[0] = 'a';
illegalflag[1] = 123;
illegalflag[2] = new RegExp();
illegalflags[0] = 'a';
illegalflags[1] = 123;
illegalflags[2] = new RegExp();
@ -79,9 +79,9 @@ function test()
printBugNumber (bug);
printStatus (summary);
testIllegalRegExps(legalmatch, illegalflag);
testIllegalRegExps(illegalmatch, legalflag);
testIllegalRegExps(illegalmatch, illegalflag);
testIllegalRegExps(legalpatterns, illegalflags);
testIllegalRegExps(illegalpatterns, legalflags);
testIllegalRegExps(illegalpatterns, illegalflags);
exitFunc ('test');
}