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

Side by Side Diff: test/mjsunit/string-match.js

Issue 465273002: Remove RegExp.$input. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/regexp.js ('k') | test/webkit/fast/js/Object-getOwnPropertyNames-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 for (var i = 1; i <= 9; i++) { 59 for (var i = 1; i <= 9; i++) {
60 if (i <= captures.length) { 60 if (i <= captures.length) {
61 assertEquals(captures[i - 1], RegExp["$" + i], name + "-capture-" + i); 61 assertEquals(captures[i - 1], RegExp["$" + i], name + "-capture-" + i);
62 } else { 62 } else {
63 assertEquals("", RegExp["$" + i], name + "-nocapture-" + i); 63 assertEquals("", RegExp["$" + i], name + "-nocapture-" + i);
64 } 64 }
65 } 65 }
66 assertEquals(undefined, RegExp.$10, name + "-nocapture-10"); 66 assertEquals(undefined, RegExp.$10, name + "-nocapture-10");
67 67
68 assertEquals(input, RegExp.input, name + "-input"); 68 assertEquals(input, RegExp.input, name + "-input");
69 assertEquals(input, RegExp.$input, name + "-$input");
70 assertEquals(input, RegExp.$_, name + "-$_"); 69 assertEquals(input, RegExp.$_, name + "-$_");
71 70
72 assertEquals(preMatch, RegExp["$`"], name + "-$`"); 71 assertEquals(preMatch, RegExp["$`"], name + "-$`");
73 assertEquals(preMatch, RegExp.leftContext, name + "-leftContex"); 72 assertEquals(preMatch, RegExp.leftContext, name + "-leftContex");
74 73
75 assertEquals(postMatch, RegExp["$'"], name + "-$'"); 74 assertEquals(postMatch, RegExp["$'"], name + "-$'");
76 assertEquals(postMatch, RegExp.rightContext, name + "-rightContex"); 75 assertEquals(postMatch, RegExp.rightContext, name + "-rightContex");
77 76
78 assertEquals(lastParen, RegExp["$+"], name + "-$+"); 77 assertEquals(lastParen, RegExp["$+"], name + "-$+");
79 assertEquals(lastParen, RegExp.lastParen, name + "-lastParen"); 78 assertEquals(lastParen, RegExp.lastParen, name + "-lastParen");
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 [], 3, 5); 139 [], 3, 5);
141 140
142 141
143 // Atom, global 142 // Atom, global
144 143
145 var re_atomg = /an/g; 144 var re_atomg = /an/g;
146 145
147 testMatch("Global-Atom", stringSample, re_atomg, 146 testMatch("Global-Atom", stringSample, re_atomg,
148 ["an", "an", "an", "an"], 147 ["an", "an", "an", "an"],
149 [], 25, 27); 148 [], 25, 27);
OLDNEW
« no previous file with comments | « src/regexp.js ('k') | test/webkit/fast/js/Object-getOwnPropertyNames-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698