]> git.lizzy.rs Git - rust.git/commitdiff
fix test failures
authorkwantam <kwantam@gmail.com>
Tue, 8 Jul 2014 18:46:01 +0000 (14:46 -0400)
committerkwantam <kwantam@gmail.com>
Wed, 9 Jul 2014 14:14:46 +0000 (10:14 -0400)
- 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.

mk/crates.mk
mk/tests.mk
src/libcollections/str.rs
src/libregex/test/tests.rs

index 4ad16b785a4d7542eb4f9cf68b4cdbd4e1dcfc8c..48a5bf6caf4cc2fc320be0edce7db7852be5d494 100644 (file)
@@ -52,7 +52,7 @@
 TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
                  uuid serialize sync getopts collections num test time rand \
                  url log regex graphviz core rlibc alloc debug rustrt \
-                                unicode
+                 unicode
 HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
 CRATES := $(TARGET_CRATES) $(HOST_CRATES)
 TOOLS := compiletest rustdoc rustc
index 44bedde99ccffdba2a1571000adc371b601da523..2090f89e796cc4313f609cfaecbed03f6dbc0cbe 100644 (file)
 
 # The names of crates that must be tested
 
-# libcore tests are in a separate crate
+# libcore/libunicode tests are in a separate crate
 DEPS_coretest :=
 $(eval $(call RUST_CRATE,coretest))
 
-TEST_TARGET_CRATES = $(filter-out core,$(TARGET_CRATES)) coretest
+TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
 TEST_DOC_CRATES = $(DOC_CRATES)
 TEST_HOST_CRATES = $(HOST_CRATES)
 TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
index cedb33831900de72b796f0d0240bdb6ecc2557df..fc99c967e9f278bee0ba06bc8f8285d3d3c6e80f 100644 (file)
@@ -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")));
index 35cb7c3c5b09c78185e3e8225d6e8f0897dd1152..251ab10ad34e9d47c2950357647522ccf340b238 100644 (file)
@@ -195,8 +195,8 @@ fn $name() {
 
 // 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+", "â\85¡", None)
-mat!(uni_perl_w_neg, r"\W+", "â\85¡", 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)))