mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Adding more cases
This commit is contained in:
parent
8aff276808
commit
3b17289926
@ -91,7 +91,7 @@ string = 'foo {1} foo {2} foo';
|
|||||||
addThis();
|
addThis();
|
||||||
|
|
||||||
|
|
||||||
string = 'abccccc{3 }c{ 3}c{3, }c{3 ,}de';
|
string = 'abccccc{3 }c{ 3}c{3, }c{3 ,}c{3 ,4}c{3, 4}c{3,4 }de';
|
||||||
|
|
||||||
// use braces in a normal quantifier construct
|
// use braces in a normal quantifier construct
|
||||||
status = inSection(5);
|
status = inSection(5);
|
||||||
@ -145,13 +145,38 @@ string = 'abccccc{3 }c{ 3}c{3, }c{3 ,}de';
|
|||||||
expectedmatch = Array('c{3, }');
|
expectedmatch = Array('c{3, }');
|
||||||
addThis();
|
addThis();
|
||||||
|
|
||||||
// now disrupt it - the braces should now be interpreted literally
|
|
||||||
status = inSection(13);
|
status = inSection(13);
|
||||||
pattern = /c{3 ,}/;
|
pattern = /c{3 ,}/;
|
||||||
actualmatch = string.match(pattern);
|
actualmatch = string.match(pattern);
|
||||||
expectedmatch = Array('c{3 ,}');
|
expectedmatch = Array('c{3 ,}');
|
||||||
addThis();
|
addThis();
|
||||||
|
|
||||||
|
// using braces in a normal quantifier construct again
|
||||||
|
status = inSection(14);
|
||||||
|
pattern = /c{3,4}/;
|
||||||
|
actualmatch = string.match(pattern);
|
||||||
|
expectedmatch = Array('cccc');
|
||||||
|
addThis();
|
||||||
|
|
||||||
|
// now disrupt it - the braces should now be interpreted literally
|
||||||
|
status = inSection(15);
|
||||||
|
pattern = /c{3 ,4}/;
|
||||||
|
actualmatch = string.match(pattern);
|
||||||
|
expectedmatch = Array('c{3 ,4}');
|
||||||
|
addThis();
|
||||||
|
|
||||||
|
status = inSection(16);
|
||||||
|
pattern = /c{3, 4}/;
|
||||||
|
actualmatch = string.match(pattern);
|
||||||
|
expectedmatch = Array('c{3, 4}');
|
||||||
|
addThis();
|
||||||
|
|
||||||
|
status = inSection(17);
|
||||||
|
pattern = /c{3,4 }/;
|
||||||
|
actualmatch = string.match(pattern);
|
||||||
|
expectedmatch = Array('c{3,4 }');
|
||||||
|
addThis();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user