-
Notifications
You must be signed in to change notification settings - Fork 480
Closed
Description
Hi π
First, thank you for a fantastic crate!
What version of regex are you using?
$ cargo tree
testcasev0.1.0 (/Users/emorley/src/testcase)
βββ regex v1.10.0
βββ aho-corasick v1.1.2
β βββ memchr v2.6.4
βββ memchr v2.6.4
βββ regex-automata v0.4.1
β βββ aho-corasick v1.1.2 (*)
β βββ memchr v2.6.4
β βββ regex-syntax v0.8.0
βββ regex-syntax v0.8.0
Describe the bug at a high level.
Using regex-syntax
v0.8.0, a Regex::is_match
that previously matched in regex-syntax
v0.7.4 no longer matches.
Whilst the issue no longer reproduces as part of the regex-syntax
v0.8.1 release (I would guess due to the revert in that release: #1102), I thought you might still wish to see the testcase in case it covers something that the newly added fuzz tests do not, ready for the future relanding of #1051.
What are the steps to reproduce the behavior?
cargo new testcase && cd $_
cargo add regex@1.10.0
cargo update -p regex-syntax --precise 0.8.0
- Add this to the end of
main.rs
:#[cfg(test)] mod tests { #[test] fn testcase() { assert!(regex::Regex::new(r"^[[:alnum:]./-]+$") .unwrap() .is_match("a-b")); } }
cargo test
cargo update -p regex-syntax --precise 0.8.1
cargo test
What is the actual behavior?
cargo test
at step 5 (ie: when using regex-syntax v0.8.0) fails with the output belowcargo test
at step 7 (ie: when using regex-syntax v0.8.1) passes
---- tests::testcase stdout ----
thread 'tests::testcase' panicked at src/main.rs:9:9:
assertion failed: regex::Regex::new(r\"^[[:alnum:]./-]+$\").unwrap().is_match(\"a-b\")
What is the expected behavior?
cargo test
passes regardless of regex-syntax version.
Notes
- I'm using Rust 1.74.0-beta.1 on macOS on ARM
- If I replace the
[:alnum:]
in the regex with ega-z
then the issue stops reproducing.
Metadata
Metadata
Assignees
Labels
No labels