diff options
| author | kwantam <kwantam@gmail.com> | 2014-07-08 14:46:01 -0400 |
|---|---|---|
| committer | kwantam <kwantam@gmail.com> | 2014-07-09 10:14:46 -0400 |
| commit | 85e2bee4a2ca3e63ea47389377b632403db20195 (patch) | |
| tree | b9c2f10bc016ecb891fabc639953118597643f6f /src | |
| parent | 5d4238b6fc8769c35ff5818ed04d16a6deab784f (diff) | |
| download | rust-85e2bee4a2ca3e63ea47389377b632403db20195.tar.gz rust-85e2bee4a2ca3e63ea47389377b632403db20195.zip | |
fix test failures
- unicode tests live in coretest crate - libcollections str tests need UnicodeChar trait. - libregex perlw tests were checking a char in the Alphabetic category, \x2161. Confirmed perl 5.18 considers this a \w character. Changed to \x2961, which is not \w as the test expects.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/str.rs | 2 | ||||
| -rw-r--r-- | src/libregex/test/tests.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index cedb3383190..fc99c967e9f 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -972,6 +972,8 @@ mod tests { use string::String; use vec::Vec; + use unicode::UnicodeChar; + #[test] fn test_eq_slice() { assert!((eq_slice("foobar".slice(0, 3), "foo"))); diff --git a/src/libregex/test/tests.rs b/src/libregex/test/tests.rs index 35cb7c3c5b0..251ab10ad34 100644 --- a/src/libregex/test/tests.rs +++ b/src/libregex/test/tests.rs @@ -195,8 +195,8 @@ mat!(uni_case_lower, r"\p{Ll}+", "ΛΘΓΔα", Some((8, 10))) // Test the Unicode friendliness of Perl character classes. mat!(uni_perl_w, r"\w+", "dδd", Some((0, 4))) -mat!(uni_perl_w_not, r"\w+", "Ⅱ", None) -mat!(uni_perl_w_neg, r"\W+", "Ⅱ", Some((0, 3))) +mat!(uni_perl_w_not, r"\w+", "⥡", None) +mat!(uni_perl_w_neg, r"\W+", "⥡", Some((0, 3))) mat!(uni_perl_d, r"\d+", "1२३9", Some((0, 8))) mat!(uni_perl_d_not, r"\d+", "Ⅱ", None) mat!(uni_perl_d_neg, r"\D+", "Ⅱ", Some((0, 3))) |
