Sha256: 5ae1cfb46212a674118ada2f66f37b25188e84643d406b95eb4665d722344262

Contents?: true

Size: 902 Bytes

Versions: 60

Compression:

Stored size: 902 Bytes

Contents

use regex_automata::{Input, Match};

mod multi_pattern_v2;

#[test]
fn multi_pattern_v2() {
    use multi_pattern_v2::MULTI_PATTERN_V2 as RE;

    assert_eq!(Some(Match::must(0, 0..4)), RE.find("abcd"));
    assert_eq!(Some(Match::must(0, 2..6)), RE.find("@ abcd @"));
    assert_eq!(Some(Match::must(1, 0..6)), RE.find("@abcd@"));
    assert_eq!(Some(Match::must(0, 1..5)), RE.find("\nabcd\n"));
    assert_eq!(Some(Match::must(0, 1..5)), RE.find("\nabcd wxyz\n"));
    assert_eq!(Some(Match::must(1, 1..7)), RE.find("\n@abcd@\n"));
    assert_eq!(Some(Match::must(2, 0..6)), RE.find("@abcd@\r\n"));
    assert_eq!(Some(Match::must(1, 2..8)), RE.find("\r\n@abcd@"));
    assert_eq!(Some(Match::must(2, 2..8)), RE.find("\r\n@abcd@\r\n"));

    // Fails because we have heuristic support for Unicode word boundaries
    // enabled.
    assert!(RE.try_search(&Input::new(b"\xFF@abcd@\xFF")).is_err());
}

Version data entries

60 entries across 30 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/sparse/mod.rs
wasmtime-29.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/dense/mod.rs
wasmtime-28.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/dense/mod.rs
wasmtime-28.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/sparse/mod.rs
wasmtime-27.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/sparse/mod.rs
wasmtime-27.0.0 ./ext/cargo-vendor/regex-automata-0.4.9/tests/gen/dense/mod.rs
wasmtime-26.0.0 ./ext/cargo-vendor/regex-automata-0.4.8/tests/gen/sparse/mod.rs
wasmtime-26.0.0 ./ext/cargo-vendor/regex-automata-0.4.8/tests/gen/dense/mod.rs
wasmtime-25.0.2 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/dense/mod.rs
wasmtime-25.0.2 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/sparse/mod.rs
wasmtime-25.0.1 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/dense/mod.rs
wasmtime-25.0.1 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/sparse/mod.rs
wasmtime-25.0.0 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/dense/mod.rs
wasmtime-25.0.0 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/sparse/mod.rs
wasmtime-24.0.0 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/sparse/mod.rs
wasmtime-24.0.0 ./ext/cargo-vendor/regex-automata-0.4.7/tests/gen/dense/mod.rs
wasmtime-23.0.2 ./ext/cargo-vendor/regex-automata-0.4.3/tests/gen/dense/mod.rs
wasmtime-23.0.2 ./ext/cargo-vendor/regex-automata-0.4.3/tests/gen/sparse/mod.rs
wasmtime-22.0.0 ./ext/cargo-vendor/regex-automata-0.4.3/tests/gen/dense/mod.rs
wasmtime-22.0.0 ./ext/cargo-vendor/regex-automata-0.4.3/tests/gen/sparse/mod.rs