about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-01 20:31:01 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-07 16:25:35 -0800
commita3f5626ad1b5bc47ceddfb0d600cf6fd8a6dad8c (patch)
tree9615505c4b94fd5e84128a40b21d5917e91a75bb /src/compiletest
parent159aebc28bdd3e7667cb269d64dee844699dc3b0 (diff)
downloadrust-a3f5626ad1b5bc47ceddfb0d600cf6fd8a6dad8c.tar.gz
rust-a3f5626ad1b5bc47ceddfb0d600cf6fd8a6dad8c.zip
String split renaming:
* Renamed str::split -> str::split_byte
* Renamed str::splitn -> str::splitn_byte
* Renamed str::split_func -> str::split
* Renamed str::split_char -> str::split_char
* Renamed str::split_chars_iter -> str::split_char_iter
* Added u8::is_ascii
* Fixed the behavior of str::split_str, so that it matches split_chars
  and split (i.e. ["", "XXX", "YYY", ""] == split_str(".XXX.YYY.", "."))
* Fixed str::split_byte and str::splitn_byte so that they handle
  splitting UTF-8 strings on a given UTF-8/ASCII byte and also handle ""
  as the others do
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/runtest.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index a3920ccb184..375625fc794 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -199,7 +199,7 @@ fn check_error_patterns(props: test_props,
 
     let next_err_idx = 0u;
     let next_err_pat = props.error_patterns[next_err_idx];
-    for line: str in str::split(procres.stdout, '\n' as u8) {
+    for line: str in str::split_byte(procres.stdout, '\n' as u8) {
         if str::find(line, next_err_pat) > 0 {
             #debug("found error pattern %s", next_err_pat);
             next_err_idx += 1u;
@@ -246,7 +246,7 @@ fn check_expected_errors(expected_errors: [errors::expected_error],
     //    filename:line1:col1: line2:col2: *warning:* msg
     // where line1:col1: is the starting point, line2:col2:
     // is the ending point, and * represents ANSI color codes.
-    for line: str in str::split(procres.stdout, '\n' as u8) {
+    for line: str in str::split_byte(procres.stdout, '\n' as u8) {
         let was_expected = false;
         vec::iteri(expected_errors) {|i, ee|
             if !found_flags[i] {
@@ -349,7 +349,7 @@ fn split_maybe_args(argstr: option<str>) -> [str] {
     }
 
     alt argstr {
-      option::some(s) { rm_whitespace(str::split(s, ' ' as u8)) }
+      option::some(s) { rm_whitespace(str::split_byte(s, ' ' as u8)) }
       option::none { [] }
     }
 }
@@ -411,7 +411,7 @@ fn output_base_name(config: config, testfile: str) -> str {
     let base = config.build_base;
     let filename =
         {
-            let parts = str::split(fs::basename(testfile), '.' as u8);
+            let parts = str::split_byte(fs::basename(testfile), '.' as u8);
             parts = vec::slice(parts, 0u, vec::len(parts) - 1u);
             str::connect(parts, ".")
         };