Adding more cases.

This commit is contained in:
pschwartau%netscape.com 2003-10-24 17:55:06 +00:00
parent e3b4c16fa0
commit 82a03fc995

View File

@ -77,6 +77,34 @@ actualmatch = string.match(pattern);
expectedmatch = Array('');
addThis();
pattern = /(a|)/;
status = inSection(4);
string = 'a';
actualmatch = string.match(pattern);
expectedmatch = Array('a', 'a');
addThis();
pattern = /(a||)/;
status = inSection(5);
string = 'a';
actualmatch = string.match(pattern);
expectedmatch = Array('a', 'a');
addThis();
pattern = /(|a)/;
status = inSection(6);
string = 'a';
actualmatch = string.match(pattern);
expectedmatch = Array('', '');
addThis();
pattern = /(|a|)/;
status = inSection(7);
string = 'a';
actualmatch = string.match(pattern);
expectedmatch = Array('', '');
addThis();
//-------------------------------------------------------------------------------------------------
@ -84,6 +112,7 @@ test();
//-------------------------------------------------------------------------------------------------
function addThis()
{
statusmessages[i] = status;