]> git.proxmox.com Git - cargo.git/blob - vendor/regex/tests/test_nfa_bytes.rs
New upstream version 0.31.1
[cargo.git] / vendor / regex / tests / test_nfa_bytes.rs
1 // Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 extern crate rand;
12 extern crate regex;
13
14 macro_rules! regex_new {
15 ($re:expr) => {{
16 use regex::internal::ExecBuilder;
17 ExecBuilder::new($re)
18 .nfa()
19 .only_utf8(false)
20 .build()
21 .map(|e| e.into_byte_regex())
22 }}
23 }
24
25 macro_rules! regex {
26 ($re:expr) => {
27 regex_new!($re).unwrap()
28 }
29 }
30
31 macro_rules! regex_set_new {
32 ($re:expr) => {{
33 use regex::internal::ExecBuilder;
34 ExecBuilder::new_many($re)
35 .nfa()
36 .only_utf8(false)
37 .build()
38 .map(|e| e.into_byte_regex_set())
39 }}
40 }
41
42 macro_rules! regex_set {
43 ($res:expr) => {
44 regex_set_new!($res).unwrap()
45 }
46 }
47
48 // Must come before other module definitions.
49 include!("macros_bytes.rs");
50 include!("macros.rs");
51
52 mod api;
53 mod bytes;
54 mod crazy;
55 mod flags;
56 mod fowler;
57 mod multiline;
58 mod noparse;
59 mod regression;
60 mod replace;
61 mod set;
62 mod suffix_reverse;
63 mod unicode;
64 mod word_boundary;
65 mod word_boundary_ascii;