diff --git a/Cargo.lock b/Cargo.lock index 82a2484c50..fdba2ed73f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,6 +28,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -1593,7 +1604,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1602,7 +1613,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1610,6 +1621,9 @@ name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] [[package]] name = "heapless" @@ -3173,10 +3187,11 @@ dependencies = [ [[package]] name = "regress" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a92ff21fe8026ce3f2627faaf43606f0b67b014dbc9ccf027181a804f75d92e" +checksum = "d995d590bd8ec096d1893f414bf3f5e8b0ee4c9eed9a5642b9766ef2c8e2e8e9" dependencies = [ + "hashbrown 0.13.2", "memchr", ] diff --git a/boa_engine/Cargo.toml b/boa_engine/Cargo.toml index 20dc536381..3a1491a6e1 100644 --- a/boa_engine/Cargo.toml +++ b/boa_engine/Cargo.toml @@ -47,7 +47,7 @@ serde = { version = "1.0.154", features = ["derive", "rc"] } serde_json = "1.0.94" rand = "0.8.5" num-traits = "0.2.15" -regress = "0.4.1" +regress = "0.5.0" rustc-hash = "1.1.0" num-bigint = { version = "0.4.3", features = ["serde"] } num-integer = "0.1.45" diff --git a/boa_engine/src/builtins/regexp/tests.rs b/boa_engine/src/builtins/regexp/tests.rs index 95aa3f6a94..588cf45756 100644 --- a/boa_engine/src/builtins/regexp/tests.rs +++ b/boa_engine/src/builtins/regexp/tests.rs @@ -113,20 +113,9 @@ fn to_string() { TestAction::assert_eq("(new RegExp('bar', 'g')).toString()", "/bar/g"), TestAction::assert_eq(r"(new RegExp('\\n', 'g')).toString()", r"/\n/g"), TestAction::assert_eq(r"/\n/g.toString()", r"/\n/g"), + TestAction::assert_eq(r"/,\;/.toString()", r"/,\;/"), ]); } - -#[test] -fn no_panic_on_invalid_character_escape() { - // This used to panic, we now return an error - // The line below should not cause Boa to panic - run_test_actions([TestAction::assert_native_error( - r"const a = /,\;/", - ErrorKind::Syntax, - "Invalid regular expression literal: Invalid character escape at position: 1:11", - )]); -} - #[test] fn search() { const ERROR: &str = "RegExp.prototype[Symbol.search] method called on incompatible value"; diff --git a/boa_parser/Cargo.toml b/boa_parser/Cargo.toml index f08c366de2..f9659909b9 100644 --- a/boa_parser/Cargo.toml +++ b/boa_parser/Cargo.toml @@ -21,4 +21,4 @@ fast-float = "0.2.0" num-traits = "0.2.15" bitflags = "1.3.2" num-bigint = "0.4.3" -regress = "0.4.1" +regress = "0.5.0"