зеркало из https://github.com/mozilla/pjs.git
Fixed test cases for non-global regexp. case - the result array should be
exactly the same as that returned by simply 'exec'ing the regexp against the input string.
This commit is contained in:
Родитель
3fb95c9126
Коммит
49598375a1
|
@ -63,7 +63,7 @@
|
|||
"re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex =0",
|
||||
s,
|
||||
s.lastIndexOf("0"),
|
||||
["02134", ]);
|
||||
["02134", "02134"]);
|
||||
|
||||
|
||||
re.lastIndex = s.length;
|
||||
|
@ -82,7 +82,7 @@
|
|||
s.lastIndexOf("0"),
|
||||
s,
|
||||
s.lastIndexOf("0"),
|
||||
["02134"]);
|
||||
["02134", "02134"]);
|
||||
|
||||
re.lastIndex = s.lastIndexOf("0") + 1;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче