@@ -954,7 +954,7 @@ mod tests {
954
954
955
955
let run:: ProcessOutput { status, output, error}
956
956
= run:: process_output( "echo" , [ ~"hello"]);
957
- let output_str = str::from_bytes (output);
957
+ let output_str = str::from_utf8 (output);
958
958
959
959
assert_eq!(status, 0);
960
960
assert_eq!(output_str.trim().to_owned(), ~" hello");
@@ -1016,7 +1016,7 @@ mod tests {
1016
1016
let reader = io::FILE_reader(file, false);
1017
1017
let buf = reader.read_whole_stream();
1018
1018
os::fclose(file);
1019
- str::from_bytes (buf)
1019
+ str::from_utf8 (buf)
1020
1020
}
1021
1021
}
1022
1022
@@ -1039,7 +1039,7 @@ mod tests {
1039
1039
let mut prog = run::Process::new(" echo", [~" hello"], run::ProcessOptions::new());
1040
1040
let run::ProcessOutput {status, output, error}
1041
1041
= prog.finish_with_output();
1042
- let output_str = str::from_bytes (output);
1042
+ let output_str = str::from_utf8 (output);
1043
1043
1044
1044
assert_eq!(status, 0);
1045
1045
assert_eq!(output_str.trim().to_owned(), ~" hello");
@@ -1053,7 +1053,7 @@ mod tests {
1053
1053
let run::ProcessOutput {status, output, error}
1054
1054
= prog.finish_with_output();
1055
1055
1056
- let output_str = str::from_bytes (output);
1056
+ let output_str = str::from_utf8 (output);
1057
1057
1058
1058
assert_eq!(status, 0);
1059
1059
assert_eq!(output_str.trim().to_owned(), ~" hello");
@@ -1102,7 +1102,7 @@ mod tests {
1102
1102
fn test_keep_current_working_dir() {
1103
1103
let mut prog = run_pwd(None);
1104
1104
1105
- let output = str::from_bytes (prog.finish_with_output().output);
1105
+ let output = str::from_utf8 (prog.finish_with_output().output);
1106
1106
let parent_dir = os::getcwd().normalize();
1107
1107
let child_dir = Path(output.trim()).normalize();
1108
1108
@@ -1120,7 +1120,7 @@ mod tests {
1120
1120
let parent_dir = os::getcwd().dir_path().normalize();
1121
1121
let mut prog = run_pwd(Some(&parent_dir));
1122
1122
1123
- let output = str::from_bytes (prog.finish_with_output().output);
1123
+ let output = str::from_utf8 (prog.finish_with_output().output);
1124
1124
let child_dir = Path(output.trim()).normalize();
1125
1125
1126
1126
let parent_stat = parent_dir.stat().unwrap();
@@ -1150,7 +1150,7 @@ mod tests {
1150
1150
fn test_inherit_env() {
1151
1151
1152
1152
let mut prog = run_env(None);
1153
- let output = str::from_bytes (prog.finish_with_output().output);
1153
+ let output = str::from_utf8 (prog.finish_with_output().output);
1154
1154
1155
1155
for os::env().each |&(k, v)| {
1156
1156
// don't check windows magical empty-named variables
@@ -1165,7 +1165,7 @@ mod tests {
1165
1165
new_env.push((~" RUN_TEST_NEW_ENV ", ~" 123 "));
1166
1166
1167
1167
let mut prog = run_env(Some(new_env.slice(0, new_env.len())));
1168
- let output = str::from_bytes (prog.finish_with_output().output);
1168
+ let output = str::from_utf8 (prog.finish_with_output().output);
1169
1169
1170
1170
assert!(output.contains(" RUN_TEST_NEW_ENV =123 ") ) ;
1171
1171
}
0 commit comments