forked from mirrors/gecko-dev
		
	MozReview-Commit-ID: 6eeqvTqSxam --HG-- rename : third_party/rust/memchr/.cargo-checksum.json => third_party/rust/memchr-1.0.2/.cargo-checksum.json rename : third_party/rust/memchr/Cargo.toml => third_party/rust/memchr-1.0.2/Cargo.toml rename : third_party/rust/memchr/src/lib.rs => third_party/rust/memchr-1.0.2/src/lib.rs rename : third_party/rust/regex/.cargo-checksum.json => third_party/rust/regex-0.2.2/.cargo-checksum.json rename : third_party/rust/regex/.travis.yml => third_party/rust/regex-0.2.2/.travis.yml rename : third_party/rust/regex/CHANGELOG.md => third_party/rust/regex-0.2.2/CHANGELOG.md rename : third_party/rust/regex/Cargo.toml => third_party/rust/regex-0.2.2/Cargo.toml rename : third_party/rust/regex/HACKING.md => third_party/rust/regex-0.2.2/HACKING.md rename : third_party/rust/regex/PERFORMANCE.md => third_party/rust/regex-0.2.2/PERFORMANCE.md rename : third_party/rust/regex/README.md => third_party/rust/regex-0.2.2/README.md rename : third_party/rust/regex/appveyor.yml => third_party/rust/regex-0.2.2/appveyor.yml rename : third_party/rust/regex/ci/after_success.sh => third_party/rust/regex-0.2.2/ci/after_success.sh rename : third_party/rust/regex/ci/run-kcov => third_party/rust/regex-0.2.2/ci/run-kcov rename : third_party/rust/regex/ci/script.sh => third_party/rust/regex-0.2.2/ci/script.sh rename : third_party/rust/regex/examples/bug347.rs => third_party/rust/regex-0.2.2/examples/bug347.rs rename : third_party/rust/regex/examples/shootout-regex-dna-bytes.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-dna-bytes.rs rename : third_party/rust/regex/examples/shootout-regex-dna-single.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-dna-single.rs rename : third_party/rust/regex/examples/shootout-regex-dna.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-dna.rs rename : third_party/rust/regex/examples/shootout-regex-redux-1.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-redux-1.rs rename : third_party/rust/regex/examples/shootout-regex-redux-chunked.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-redux-chunked.rs rename : third_party/rust/regex/examples/shootout-regex-redux.rs => third_party/rust/regex-0.2.2/examples/shootout-regex-redux.rs rename : third_party/rust/regex/scripts/unicode.py => third_party/rust/regex-0.2.2/scripts/unicode.py rename : third_party/rust/regex/src/backtrack.rs => third_party/rust/regex-0.2.2/src/backtrack.rs rename : third_party/rust/regex/src/compile.rs => third_party/rust/regex-0.2.2/src/compile.rs rename : third_party/rust/regex/src/dfa.rs => third_party/rust/regex-0.2.2/src/dfa.rs rename : third_party/rust/regex/src/error.rs => third_party/rust/regex-0.2.2/src/error.rs rename : third_party/rust/regex/src/exec.rs => third_party/rust/regex-0.2.2/src/exec.rs rename : third_party/rust/regex/src/expand.rs => third_party/rust/regex-0.2.2/src/expand.rs rename : third_party/rust/regex/src/input.rs => third_party/rust/regex-0.2.2/src/input.rs rename : third_party/rust/regex/src/lib.rs => third_party/rust/regex-0.2.2/src/lib.rs rename : third_party/rust/regex/src/literals.rs => third_party/rust/regex-0.2.2/src/literals.rs rename : third_party/rust/regex/src/pikevm.rs => third_party/rust/regex-0.2.2/src/pikevm.rs rename : third_party/rust/regex/src/prog.rs => third_party/rust/regex-0.2.2/src/prog.rs rename : third_party/rust/regex/src/re_builder.rs => third_party/rust/regex-0.2.2/src/re_builder.rs rename : third_party/rust/regex/src/re_bytes.rs => third_party/rust/regex-0.2.2/src/re_bytes.rs rename : third_party/rust/regex/src/re_plugin.rs => third_party/rust/regex-0.2.2/src/re_plugin.rs rename : third_party/rust/regex/src/re_set.rs => third_party/rust/regex-0.2.2/src/re_set.rs rename : third_party/rust/regex/src/re_trait.rs => third_party/rust/regex-0.2.2/src/re_trait.rs rename : third_party/rust/regex/src/re_unicode.rs => third_party/rust/regex-0.2.2/src/re_unicode.rs rename : third_party/rust/regex/src/simd_accel/mod.rs => third_party/rust/regex-0.2.2/src/simd_accel/mod.rs rename : third_party/rust/regex/src/simd_accel/teddy128.rs => third_party/rust/regex-0.2.2/src/simd_accel/teddy128.rs rename : third_party/rust/regex/src/simd_fallback/mod.rs => third_party/rust/regex-0.2.2/src/simd_fallback/mod.rs rename : third_party/rust/regex/src/simd_fallback/teddy128.rs => third_party/rust/regex-0.2.2/src/simd_fallback/teddy128.rs rename : third_party/rust/regex/src/utf8.rs => third_party/rust/regex-0.2.2/src/utf8.rs rename : third_party/rust/regex/tests/api_str.rs => third_party/rust/regex-0.2.2/tests/api_str.rs rename : third_party/rust/regex/tests/bytes.rs => third_party/rust/regex-0.2.2/tests/bytes.rs rename : third_party/rust/regex/tests/crazy.rs => third_party/rust/regex-0.2.2/tests/crazy.rs rename : third_party/rust/regex/tests/macros.rs => third_party/rust/regex-0.2.2/tests/macros.rs rename : third_party/rust/regex/tests/macros_bytes.rs => third_party/rust/regex-0.2.2/tests/macros_bytes.rs rename : third_party/rust/regex/tests/macros_str.rs => third_party/rust/regex-0.2.2/tests/macros_str.rs rename : third_party/rust/regex/tests/noparse.rs => third_party/rust/regex-0.2.2/tests/noparse.rs rename : third_party/rust/regex/tests/plugin.rs => third_party/rust/regex-0.2.2/tests/plugin.rs rename : third_party/rust/regex/tests/regression.rs => third_party/rust/regex-0.2.2/tests/regression.rs rename : third_party/rust/regex/tests/replace.rs => third_party/rust/regex-0.2.2/tests/replace.rs rename : third_party/rust/regex/tests/test_default.rs => third_party/rust/regex-0.2.2/tests/test_default.rs rename : third_party/rust/regex/tests/test_default_bytes.rs => third_party/rust/regex-0.2.2/tests/test_default_bytes.rs rename : third_party/rust/regex/tests/test_plugin.rs => third_party/rust/regex-0.2.2/tests/test_plugin.rs rename : third_party/rust/regex/tests/unicode.rs => third_party/rust/regex-0.2.2/tests/unicode.rs rename : third_party/rust/regex/tests/word_boundary_unicode.rs => third_party/rust/regex-0.2.2/tests/word_boundary_unicode.rs rename : third_party/rust/regex-syntax/.cargo-checksum.json => third_party/rust/regex-syntax-0.4.1/.cargo-checksum.json rename : third_party/rust/regex-syntax/Cargo.toml => third_party/rust/regex-syntax-0.4.1/Cargo.toml rename : third_party/rust/regex-syntax/src/lib.rs => third_party/rust/regex-syntax-0.4.1/src/lib.rs rename : third_party/rust/regex-syntax/src/literals.rs => third_party/rust/regex-syntax-0.4.1/src/literals.rs rename : third_party/rust/regex-syntax/src/parser.rs => third_party/rust/regex-syntax-0.4.1/src/parser.rs rename : third_party/rust/regex-syntax/src/properties.rs => third_party/rust/regex-syntax-0.4.1/src/properties.rs rename : third_party/rust/regex-syntax/src/unicode.rs => third_party/rust/regex-syntax-0.4.1/src/unicode.rs extra : rebase_source : b0c643eb68b9262945345145ec1578c14369dbf7
		
			
				
	
	
		
			50 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
macro_rules! noparse(
 | 
						|
    ($name:ident, $re:expr) => (
 | 
						|
        #[test]
 | 
						|
        fn $name() {
 | 
						|
            let re = $re;
 | 
						|
            match regex_new!(re) {
 | 
						|
                Err(_) => {},
 | 
						|
                Ok(_) => panic!("Regex '{}' should cause a parse error.", re),
 | 
						|
            }
 | 
						|
        }
 | 
						|
    );
 | 
						|
);
 | 
						|
 | 
						|
noparse!(fail_no_repeat_arg, "*");
 | 
						|
noparse!(fail_incomplete_escape, "\\");
 | 
						|
noparse!(fail_class_incomplete, "[A-");
 | 
						|
noparse!(fail_class_not_closed, "[A");
 | 
						|
noparse!(fail_class_no_begin, r"[\A]");
 | 
						|
noparse!(fail_class_no_end, r"[\z]");
 | 
						|
noparse!(fail_class_no_boundary, r"[\b]");
 | 
						|
noparse!(fail_open_paren, "(");
 | 
						|
noparse!(fail_close_paren, ")");
 | 
						|
noparse!(fail_invalid_range, "[a-Z]");
 | 
						|
noparse!(fail_empty_capture_name, "(?P<>a)");
 | 
						|
noparse!(fail_bad_capture_name, "(?P<na-me>)");
 | 
						|
noparse!(fail_bad_flag, "(?a)a");
 | 
						|
noparse!(fail_too_big, "a{10000000}");
 | 
						|
noparse!(fail_counted_no_close, "a{1001");
 | 
						|
noparse!(fail_unfinished_cap, "(?");
 | 
						|
noparse!(fail_unfinished_escape, "\\");
 | 
						|
noparse!(fail_octal_digit, r"\8");
 | 
						|
noparse!(fail_hex_digit, r"\xG0");
 | 
						|
noparse!(fail_hex_short, r"\xF");
 | 
						|
noparse!(fail_hex_long_digits, r"\x{fffg}");
 | 
						|
noparse!(fail_flag_bad, "(?a)");
 | 
						|
noparse!(fail_flag_empty, "(?)");
 | 
						|
noparse!(fail_double_neg, "(?-i-i)");
 | 
						|
noparse!(fail_neg_empty, "(?i-)");
 | 
						|
noparse!(fail_dupe_named, "(?P<a>.)(?P<a>.)");
 | 
						|
noparse!(fail_range_end_no_class, "[a-[:lower:]]");
 | 
						|
noparse!(fail_range_end_no_begin, r"[a-\A]");
 | 
						|
noparse!(fail_range_end_no_end, r"[a-\z]");
 | 
						|
noparse!(fail_range_end_no_boundary, r"[a-\b]");
 | 
						|
noparse!(fail_empty_alt1, r"|z");
 | 
						|
noparse!(fail_empty_alt2, r"z|");
 | 
						|
noparse!(fail_empty_alt3, r"|");
 | 
						|
noparse!(fail_empty_alt4, r"||");
 | 
						|
noparse!(fail_empty_alt5, r"()|z");
 | 
						|
noparse!(fail_empty_alt6, r"z|()");
 | 
						|
noparse!(fail_empty_alt7, r"(|)");
 |