mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Added Stephen Ostermiller's pattern-match from bug 69989 to this test -
This commit is contained in:
parent
65297cc906
commit
d3de39854b
@ -123,6 +123,17 @@ pattern = /^(\S+)+(\d+)$/;
|
||||
string = 'asdldflkj1111111aaa1';
|
||||
actualmatch = string.match(pattern);
|
||||
expectedmatch = Array(string, 'asdldflkj1111111aaa', '1');
|
||||
addThis();
|
||||
|
||||
|
||||
/*
|
||||
* This one comes from Stephen Ostermiller.
|
||||
* See http://bugzilla.mozilla.org/show_bug.cgi?id=69989
|
||||
*/
|
||||
pattern = /^[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)+$/;
|
||||
string = 'some.host.tld';
|
||||
actualmatch = string.match(pattern);
|
||||
expectedmatch = Array(string, '.tld', '.');
|
||||
addThis();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user