Index: test/webkit/fast/regex/malformed-escapes-expected.txt |
diff --git a/test/webkit/regexp-non-bmp-expected.txt b/test/webkit/fast/regex/malformed-escapes-expected.txt |
similarity index 68% |
copy from test/webkit/regexp-non-bmp-expected.txt |
copy to test/webkit/fast/regex/malformed-escapes-expected.txt |
index 28d78e2b003066a0f7478b4a1347b14d55620643..0b3e2cf87316c8e8319333017732b680cb624d9e 100644 |
--- a/test/webkit/regexp-non-bmp-expected.txt |
+++ b/test/webkit/fast/regex/malformed-escapes-expected.txt |
@@ -21,20 +21,44 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-Tests that regular expressions treat non-BMP characters as two separate characters. From a Unicode correctness point of view this is wrong, but it is what other browsers do. And given that we store strings as UTF-16, it is also more efficient to implement. Also test some other cases related to UTF-8 and UTF-16. |
+This page tests handling of malformed escape sequences. |
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
-PASS /./.exec(surrogatePair).toString().length is 1 |
-PASS /\D/.exec(surrogatePair).toString().length is 1 |
-PASS /\S/.exec(surrogatePair).toString().length is 1 |
-PASS /\W/.exec(surrogatePair).toString().length is 1 |
-PASS /[^x]/.exec(surrogatePair).toString().length is 1 |
-PASS /.{1,2}/.exec("!!" + String.fromCharCode(0xA1)).toString().length is 2 |
-PASS /./.exec("") is null |
+Testing regexp: /\ug/gm |
+PASS regexp.test('ug') is true |
+PASS regexp.lastIndex is 2 |
+Testing regexp: /\xg/gm |
+PASS regexp.test('xg') is true |
+PASS regexp.lastIndex is 2 |
+ |
+Testing regexp: /\c_/gm |
+PASS regexp.test('\\c_') is true |
+PASS regexp.lastIndex is 3 |
+ |
+Testing regexp: /[\B]/gm |
+PASS regexp.test('B') is true |
+PASS regexp.lastIndex is 1 |
+ |
+Testing regexp: /[\b]/gm |
+PASS regexp.test('\b') is true |
+PASS regexp.lastIndex is 1 |
+ |
+Testing regexp: /\8/gm |
+PASS regexp.test('\\8') is true |
+PASS regexp.lastIndex is 2 |
+ |
+Testing regexp: /^[\c]$/ |
+PASS regexp.test('c') is true |
+ |
+Testing regexp: /^[\c_]$/ |
+PASS regexp.test('c') is false |
+ |
+Testing regexp: /^[\c]]$/ |
+PASS regexp.test('c]') is true |
PASS successfullyParsed is true |
TEST COMPLETE |