Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: test/mjsunit/regexp.js

Issue 2681323002: [regexp] Update lastIndex semantics in RegExpBuiltinExec (Closed)
Patch Set: Update test262.status Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | test/mjsunit/regress/regress-2438.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp.js
diff --git a/test/mjsunit/regexp.js b/test/mjsunit/regexp.js
index 04c723665a60162c40b8c8876905cf581c2f8b08..c9a1fd21b328449ab1d320d5041fed86eb4c0f75 100644
--- a/test/mjsunit/regexp.js
+++ b/test/mjsunit/regexp.js
@@ -564,21 +564,21 @@ log = [];
re.lastIndex = fakeLastIndex;
var result = re.exec(fakeString);
assertEquals(["str"], result);
-assertEquals(["ts"], log);
+assertEquals(["ts", "li"], log);
// Again, to check if caching interferes.
log = [];
re.lastIndex = fakeLastIndex;
result = re.exec(fakeString);
assertEquals(["str"], result);
-assertEquals(["ts"], log);
+assertEquals(["ts", "li"], log);
// And one more time, just to be certain.
log = [];
re.lastIndex = fakeLastIndex;
result = re.exec(fakeString);
assertEquals(["str"], result);
-assertEquals(["ts"], log);
+assertEquals(["ts", "li"], log);
// Now with a global regexp, where lastIndex is actually used.
re = /str/g;
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | test/mjsunit/regress/regress-2438.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698