Skip to content

Commit 1050981

Browse files
aplefullgmta
authored andcommitted
Tests+Meta: Reimport WebKit regexp tests
This commit updates Meta/import-webkit-regexp-tests.py and re-imports WebKit tests. Removed pcre-test-1 from SKIP_TESTS because we pass it. Removed everything except slow.js from XFAIL_TESTS. We pass everything except slow.js, which still hits the step limit. Moved overflow.js to SKIP_FILES because it tests WebKit's behaviour of rejecting regexps with huge quantifiers. Ladybird, Chrome, and Firefox just clamp them.
1 parent b3bd888 commit 1050981

23 files changed

Lines changed: 95 additions & 86 deletions

Meta/import-webkit-regexp-tests.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
// No-op, just used for test documentation in WebKit.
2020
}
2121
22+
function debug(msg) {
23+
// No-op, just used for debugging in WebKit tests.
24+
}
25+
2226
function shouldBe(actual_code, expected_code) {
2327
let actual = eval(actual_code);
2428
let expected = eval(expected_code);
@@ -69,23 +73,16 @@
6973
# Files to skip entirely.
7074
SKIP_FILES = {
7175
"TEMPLATE.html",
76+
# Tests WebKit-specific overflow rejection for huge quantifiers.
77+
# Ladybird, Chrome, and Firefox just clamp them silently.
78+
"overflow.js",
7279
}
7380

7481
# Tests that crash or hang -- use test.skip().
75-
SKIP_TESTS = {
76-
# Crashes (SIGSEGV).
77-
"pcre-test-1",
78-
}
82+
SKIP_TESTS = {}
7983

8084
# Tests that fail -- use test.xfail().
8185
XFAIL_TESTS = {
82-
"backreferences",
83-
"dotstar",
84-
"malformed-escapes",
85-
"non-pattern-characters",
86-
"overflow",
87-
"quantified-assertions",
88-
"repeat-match-waldemar",
8986
"slow",
9087
}
9188

Tests/LibJS/Runtime/3rdparty/webkit/alternative-length-miscalculation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("alternative-length-miscalculation", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/assertion.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("assertion", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/backreferences.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("backreferences", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/constructor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("constructor", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/dotstar.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("dotstar", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/early-acid3-86.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("early-acid3-86", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/ecma-regex-examples.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("ecma-regex-examples", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/invalid-range-in-class.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("invalid-range-in-class", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

Tests/LibJS/Runtime/3rdparty/webkit/lastIndex.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ test("lastIndex", () => {
55
// No-op, just used for test documentation in WebKit.
66
}
77

8+
function debug(msg) {
9+
// No-op, just used for debugging in WebKit tests.
10+
}
11+
812
function shouldBe(actual_code, expected_code) {
913
let actual = eval(actual_code);
1014
let expected = eval(expected_code);

0 commit comments

Comments
 (0)