We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41aef56 commit 801e8e3Copy full SHA for 801e8e3
tests/jerry/regexp-routines.js
@@ -48,3 +48,21 @@ catch (e)
48
{
49
assert (e instanceof TypeError);
50
}
51
+
52
53
+/* Test continous calls to the exec method to see how does the match
54
+ * updates the lastIndex propertyand see if the match restarts.
55
+ */
56
+var re = new RegExp("a", "g");
57
+result = re.exec("a");
58
+assert (result.length === 1);
59
+assert (result[0] === "a");
60
+assert (re.lastIndex === 1);
61
62
+assert (re.exec("a") === null);
63
+assert (re.lastIndex === 0);
64
65
66
67
68
0 commit comments