Skip to content

Commit fc6cf6e

Browse files
committed
---
yaml --- r: 63883 b: refs/heads/snap-stage3 c: d820355 h: refs/heads/master i: 63881: 59314e7 63879: d5ad126 v: v3
1 parent 09b34fe commit fc6cf6e

File tree

3 files changed

+8
-154
lines changed

3 files changed

+8
-154
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 439b13f071a4a884ea8645670df83162ffcf129f
4+
refs/heads/snap-stage3: d820355213d433c85ef49bae03022d754ca2f5d5
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/iterator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,20 @@ pub trait IteratorUtil<A> {
356356
///
357357
/// # Example
358358
///
359-
/// --- {.rust}
359+
/// ~~~ {.rust}
360360
/// let xs = [-3, 0, 1, 5, -10];
361361
/// assert_eq!(*xs.iter().max_by(|x| x.abs()).unwrap(), -10);
362-
/// ---
362+
/// ~~~
363363
fn max_by<B: Ord>(&mut self, f: &fn(&A) -> B) -> Option<A>;
364364

365365
/// Return the element that gives the minimum value from the specfied function
366366
///
367367
/// # Example
368368
///
369-
/// --- {.rust}
369+
/// ~~~ {.rust}
370370
/// let xs = [-3, 0, 1, 5, -10];
371371
/// assert_eq!(*xs.iter().min_by(|x| x.abs()).unwrap(), 0);
372-
/// ---
372+
/// ~~~
373373
fn min_by<B: Ord>(&mut self, f: &fn(&A) -> B) -> Option<A>;
374374
}
375375

branches/snap-stage3/src/libstd/run.rs

Lines changed: 3 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -943,20 +943,12 @@ mod tests {
943943
}
944944

945945
#[test]
946-
#[cfg(not(target_os="android"))]
947946
fn test_process_status() {
948947
assert_eq!(run::process_status("false", []), 1);
949948
assert_eq!(run::process_status("true", []), 0);
950949
}
951-
#[test]
952-
#[cfg(target_os="android")]
953-
fn test_process_status() {
954-
assert_eq!(run::process_status("/system/bin/sh", [~"-c",~"false"]), 1);
955-
assert_eq!(run::process_status("/system/bin/sh", [~"-c",~"true"]), 0);
956-
}
957950

958951
#[test]
959-
#[cfg(not(target_os="android"))]
960952
fn test_process_output_output() {
961953

962954
let run::ProcessOutput {status, output, error}
@@ -970,24 +962,8 @@ mod tests {
970962
assert_eq!(error, ~[]);
971963
}
972964
}
973-
#[test]
974-
#[cfg(target_os="android")]
975-
fn test_process_output_output() {
976-
977-
let run::ProcessOutput {status, output, error}
978-
= run::process_output("/system/bin/sh", [~"-c",~"echo hello"]);
979-
let output_str = str::from_bytes(output);
980-
981-
assert_eq!(status, 0);
982-
assert_eq!(output_str.trim().to_owned(), ~"hello");
983-
// FIXME #7224
984-
if !running_on_valgrind() {
985-
assert_eq!(error, ~[]);
986-
}
987-
}
988965
989966
#[test]
990-
#[cfg(not(target_os="android"))]
991967
fn test_process_output_error() {
992968
993969
let run::ProcessOutput {status, output, error}
@@ -997,17 +973,6 @@ mod tests {
997973
assert_eq!(output, ~[]);
998974
assert!(!error.is_empty());
999975
}
1000-
#[test]
1001-
#[cfg(target_os="android")]
1002-
fn test_process_output_error() {
1003-
1004-
let run::ProcessOutput {status, output, error}
1005-
= run::process_output("/system/bin/mkdir", [~"."]);
1006-
1007-
assert_eq!(status, 255);
1008-
assert_eq!(output, ~[]);
1009-
assert!(!error.is_empty());
1010-
}
1011976
1012977
#[test]
1013978
fn test_pipes() {
@@ -1058,37 +1023,19 @@ mod tests {
10581023
}
10591024
10601025
#[test]
1061-
#[cfg(not(target_os="android"))]
10621026
fn test_finish_once() {
10631027
let mut prog = run::Process::new("false", [], run::ProcessOptions::new());
10641028
assert_eq!(prog.finish(), 1);
10651029
}
1066-
#[test]
1067-
#[cfg(target_os="android")]
1068-
fn test_finish_once() {
1069-
let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"false"],
1070-
run::ProcessOptions::new());
1071-
assert_eq!(prog.finish(), 1);
1072-
}
10731030
10741031
#[test]
1075-
#[cfg(not(target_os="android"))]
10761032
fn test_finish_twice() {
10771033
let mut prog = run::Process::new("false", [], run::ProcessOptions::new());
10781034
assert_eq!(prog.finish(), 1);
10791035
assert_eq!(prog.finish(), 1);
10801036
}
1081-
#[test]
1082-
#[cfg(target_os="android")]
1083-
fn test_finish_twice() {
1084-
let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"false"],
1085-
run::ProcessOptions::new());
1086-
assert_eq!(prog.finish(), 1);
1087-
assert_eq!(prog.finish(), 1);
1088-
}
10891037
10901038
#[test]
1091-
#[cfg(not(target_os="android"))]
10921039
fn test_finish_with_output_once() {
10931040
10941041
let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new());
@@ -1103,26 +1050,8 @@ mod tests {
11031050
assert_eq!(error, ~[]);
11041051
}
11051052
}
1106-
#[test]
1107-
#[cfg(target_os="android")]
1108-
fn test_finish_with_output_once() {
1109-
1110-
let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"echo hello"],
1111-
run::ProcessOptions::new());
1112-
let run::ProcessOutput {status, output, error}
1113-
= prog.finish_with_output();
1114-
let output_str = str::from_bytes(output);
1115-
1116-
assert_eq!(status, 0);
1117-
assert_eq!(output_str.trim().to_owned(), ~"hello");
1118-
// FIXME #7224
1119-
if !running_on_valgrind() {
1120-
assert_eq!(error, ~[]);
1121-
}
1122-
}
11231053
11241054
#[test]
1125-
#[cfg(not(target_os="android"))]
11261055
fn test_finish_with_output_twice() {
11271056
11281057
let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new());
@@ -1148,38 +1077,10 @@ mod tests {
11481077
assert_eq!(error, ~[]);
11491078
}
11501079
}
1151-
#[test]
1152-
#[cfg(target_os="android")]
1153-
fn test_finish_with_output_twice() {
1154-
1155-
let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"echo hello"],
1156-
run::ProcessOptions::new());
1157-
let run::ProcessOutput {status, output, error}
1158-
= prog.finish_with_output();
1159-
1160-
let output_str = str::from_bytes(output);
1161-
1162-
assert_eq!(status, 0);
1163-
assert_eq!(output_str.trim().to_owned(), ~"hello");
1164-
// FIXME #7224
1165-
if !running_on_valgrind() {
1166-
assert_eq!(error, ~[]);
1167-
}
1168-
1169-
let run::ProcessOutput {status, output, error}
1170-
= prog.finish_with_output();
1171-
1172-
assert_eq!(status, 0);
1173-
assert_eq!(output, ~[]);
1174-
// FIXME #7224
1175-
if !running_on_valgrind() {
1176-
assert_eq!(error, ~[]);
1177-
}
1178-
}
11791080
11801081
#[test]
11811082
#[should_fail]
1182-
#[cfg(not(windows),not(target_os="android"))]
1083+
#[cfg(not(windows))]
11831084
fn test_finish_with_output_redirected() {
11841085
let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions {
11851086
env: None,
@@ -1191,36 +1092,14 @@ mod tests {
11911092
// this should fail because it is not valid to read the output when it was redirected
11921093
prog.finish_with_output();
11931094
}
1194-
#[test]
1195-
#[should_fail]
1196-
#[cfg(not(windows),target_os="android")]
1197-
fn test_finish_with_output_redirected() {
1198-
let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"echo hello"],
1199-
run::ProcessOptions {
1200-
env: None,
1201-
dir: None,
1202-
in_fd: Some(0),
1203-
out_fd: Some(1),
1204-
err_fd: Some(2)
1205-
});
1206-
// this should fail because it is not valid to read the output when it was redirected
1207-
prog.finish_with_output();
1208-
}
12091095
1210-
#[cfg(unix,not(target_os="android"))]
1096+
#[cfg(unix)]
12111097
fn run_pwd(dir: Option<&Path>) -> run::Process {
12121098
run::Process::new("pwd", [], run::ProcessOptions {
12131099
dir: dir,
12141100
.. run::ProcessOptions::new()
12151101
})
12161102
}
1217-
#[cfg(unix,target_os="android")]
1218-
fn run_pwd(dir: Option<&Path>) -> run::Process {
1219-
run::Process::new("/system/bin/sh", [~"-c",~"pwd"], run::ProcessOptions {
1220-
dir: dir,
1221-
.. run::ProcessOptions::new()
1222-
})
1223-
}
12241103
12251104
#[cfg(windows)]
12261105
fn run_pwd(dir: Option<&Path>) -> run::Process {
@@ -1262,20 +1141,13 @@ mod tests {
12621141
assert_eq!(parent_stat.st_ino, child_stat.st_ino);
12631142
}
12641143
1265-
#[cfg(unix,not(target_os="android"))]
1144+
#[cfg(unix)]
12661145
fn run_env(env: Option<&[(~str, ~str)]>) -> run::Process {
12671146
run::Process::new("env", [], run::ProcessOptions {
12681147
env: env,
12691148
.. run::ProcessOptions::new()
12701149
})
12711150
}
1272-
#[cfg(unix,target_os="android")]
1273-
fn run_env(env: Option<&[(~str, ~str)]>) -> run::Process {
1274-
run::Process::new("/system/bin/sh", [~"-c",~"set"], run::ProcessOptions {
1275-
env: env,
1276-
.. run::ProcessOptions::new()
1277-
})
1278-
}
12791151
12801152
#[cfg(windows)]
12811153
fn run_env(env: Option<&[(~str, ~str)]>) -> run::Process {
@@ -1286,7 +1158,6 @@ mod tests {
12861158
}
12871159
12881160
#[test]
1289-
#[cfg(not(target_os="android"))]
12901161
fn test_inherit_env() {
12911162
if running_on_valgrind() { return; }
12921163
@@ -1299,23 +1170,6 @@ mod tests {
12991170
assert!(k.is_empty() || output.contains(fmt!("%s=%s", k, v)));
13001171
}
13011172
}
1302-
#[test]
1303-
#[cfg(target_os="android")]
1304-
fn test_inherit_env() {
1305-
if running_on_valgrind() { return; }
1306-
1307-
let mut prog = run_env(None);
1308-
let output = str::from_bytes(prog.finish_with_output().output);
1309-
1310-
let r = os::env();
1311-
for r.iter().advance |&(k, v)| {
1312-
// don't check android RANDOM variables
1313-
if k != ~"RANDOM" {
1314-
assert!(output.contains(fmt!("%s=%s", k, v)) ||
1315-
output.contains(fmt!("%s=\'%s\'", k, v)));
1316-
}
1317-
}
1318-
}
13191173
13201174
#[test]
13211175
fn test_add_to_env() {

0 commit comments

Comments
 (0)