Skip to content

Commit

Permalink
Add test for regexp "x" flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
kangax committed Mar 17, 2011
1 parent 3913fd0 commit 50dfabf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions non-standard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,46 @@ <h1>
<td class="no besen">No</td>
<td class="no rhino">No</td>
</tr>
<tr>
<td>RegExp "x" flag</td>

<script>
test((function(){
try {
var re = RegExp("^ ( \\d+ ) \
( \\w+ ) \
( foo )", "x");
return re.exec('23xfoo')[0] === '23xfoo';
}
catch(err) { return false }
})());
</script>

<td class=" ie7">-</td>
<td class=" ie8">-</td>
<td class=" ie9">-</td>

<td class="no firefox3">No</td>
<td class="no firefox3_5">No</td>
<td class="no firefox4">No</td>

<td class="no safari3">No</td>
<td class="no safari4">No</td>
<td class="no safari5">No</td>
<td class="no webkit">No</td>

<!-- <td class=" chrome5">-</td>
<td class=" chrome6">-</td> -->
<td class="no chrome7">No</td>

<td class="yes opera10_10">Yes</td>
<td class="yes opera10_50">Yes</td>

<td class=" konq">-</td>

<td class=" besen">-</td>
<td class="no rhino">No</td>
</tr>

<tr>
<td>RegExp "lastMatch"</td>
Expand Down
2 changes: 1 addition & 1 deletion strict-mode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ <h1>
print('<span class="test"><code>function arguments(){ }<\/code> is a SyntaxError<\/span>' + colorResult(error instanceof SyntaxError));
})();

print('<br><strong>NON-STANDARD</strong><br><br>');
print('<br><strong>NON-STANDARD</strong> (i.e. not part of ECMA-262 standard)<br><br>');

(function(){
var error;
Expand Down

0 comments on commit 50dfabf

Please sign in to comment.