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

Side by Side Diff: LayoutTests/fast/js/script-tests/regexp-non-capturing-groups.js

Issue 20867002: Remove old tests that have been migrated to the v8 repo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unused script-tests as well Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 description(
2 'Test for behavior of non-capturing groups, as described in <a href="http://blog .stevenlevithan.com/archives/npcg-javascript">' +
3 'a blog post by Steven Levithan</a> and <a href="http://bugs.webkit.org/show_bug .cgi?id=14931">bug 14931</a>.'
4 );
5
6 shouldBe('/(x)?\\1y/.test("y")', 'true');
7 shouldBe('/(x)?\\1y/.exec("y")', '["y", undefined]');
8 shouldBe('/(x)?y/.exec("y")', '["y", undefined]');
9 shouldBe('"y".match(/(x)?\\1y/)', '["y", undefined]');
10 shouldBe('"y".match(/(x)?y/)', '["y", undefined]');
11 shouldBe('"y".match(/(x)?\\1y/g)', '["y"]');
12 shouldBe('"y".split(/(x)?\\1y/)', '["", undefined, ""]');
13 shouldBe('"y".split(/(x)?y/)', '["", undefined, ""]');
14 shouldBe('"y".search(/(x)?\\1y/)', '0');
15 shouldBe('"y".replace(/(x)?\\1y/, "z")', '"z"');
16 shouldBe('"y".replace(/(x)?y/, "$1")', '""');
17 shouldBe('"y".replace(/(x)?\\1y/, function($0, $1){ return String($1); })', '"un defined"');
18 shouldBe('"y".replace(/(x)?y/, function($0, $1){ return String($1); })', '"undef ined"');
19 shouldBe('"y".replace(/(x)?y/, function($0, $1){ return $1; })', '"undefined"');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698