Lines Matching refs:r
37 r = /a/;
38 r.lastIndex = 1;
39 r.exec("zzzz");
40 assertEquals(0, r.lastIndex);
43 r = /a/;
44 r.lastIndex = 1;
45 r.test("zzzz");
46 assertEquals(0, r.lastIndex);
49 r = /a/;
50 r.lastIndex = 1;
51 "zzzz".match(r);
52 assertEquals(0, r.lastIndex);
55 r = /a/;
56 r.lastIndex = 1;
57 "zzzz".replace(r, "");
58 assertEquals(0, r.lastIndex);
61 r = /\d/;
62 r.lastIndex = 1;
63 "zzzz".replace(r, "");
64 assertEquals(0, r.lastIndex);
67 r = /a/;
68 r.lastIndex = 1;
69 "zzzz".replace(r, "a");
70 assertEquals(0, r.lastIndex);
73 r = /\d/;
74 r.lastIndex = 1;
75 "zzzz".replace(r, "a");
76 assertEquals(0, r.lastIndex);
79 r = /a/;
80 r.lastIndex = 1;
81 "zzzz".replace(r, function() { return ""; });
82 assertEquals(0, r.lastIndex);
86 r = /a/g;
87 r.lastIndex = -1;
88 "0123abcd".replace(r, "x");
89 assertEquals(0, r.lastIndex);
91 r.lastIndex = -1;
92 "01234567".replace(r, "x");
93 assertEquals(0, r.lastIndex);
95 r.lastIndex = -1;
96 "0123abcd".match(r);
97 assertEquals(0, r.lastIndex);
99 r.lastIndex = -1;
100 "01234567".match(r);
101 assertEquals(0, r.lastIndex);
104 r = /a/;
105 r.lastIndex = -1;
106 "0123abcd".replace(r, "x");
107 assertEquals(-1, r.lastIndex);
109 r.lastIndex = -1;
110 "01234567".replace(r, "x");
111 assertEquals(0, r.lastIndex);
113 r.lastIndex = -1;
114 "0123abcd".match(r);
115 assertEquals(-1, r.lastIndex);
117 r.lastIndex = -1;
118 "01234567".match(r);
119 assertEquals(0, r.lastIndex);
122 r = /a/g;
123 r.lastIndex = 1;
124 r.exec("01234567");
125 assertEquals(0, r.lastIndex);
127 r.lastIndex = 1;
128 r.exec("0123abcd");
129 assertEquals(5, r.lastIndex);
131 r = /a/;
132 r.lastIndex = 1;
133 r.exec("01234567");
134 assertEquals(0, r.lastIndex);
136 r.lastIndex = 1;
137 r.exec("0123abcd");
138 assertEquals(1, r.lastIndex);
140 r = /a/g;
141 r.lastIndex = 1;
142 r.test("01234567");
143 assertEquals(0, r.lastIndex);
145 r.lastIndex = 1;
146 r.test("0123abcd");
147 assertEquals(5, r.lastIndex);
149 r = /a/;
150 r.lastIndex = 1;
151 r.test("01234567");
152 assertEquals(0, r.lastIndex);
154 r.lastIndex = 1;
155 r.test("0123abcd");
156 assertEquals(1, r.lastIndex);