Skip to content

Commit 537446a

Browse files
committed
---
yaml --- r: 176814 b: refs/heads/tmp c: 918dd34 h: refs/heads/master v: v3
1 parent 43253ef commit 537446a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 06d401948ba7451d8ed10b4a58e1e2d08c0094f7
37+
refs/heads/tmp: 918dd3488f450383c5ce27f0a27f45fa3fc9d0d6

branches/tmp/src/test/run-pass/issue-15149.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::path::BytesContainer;
1112
use std::io::{Command, fs, USER_RWX};
1213
use std::os;
1314

1415
fn main() {
1516
// If we're the child, make sure we were invoked correctly
1617
let args = os::args();
1718
if args.len() > 1 && args[1].as_slice() == "child" {
18-
return assert_eq!(args[0].as_slice(), "mytest");
19+
return assert_eq!(args[0],
20+
format!("mytest{}", os::consts::EXE_SUFFIX));
1921
}
2022

2123
test();
@@ -38,7 +40,12 @@ fn test() {
3840
path.push(child_dir.clone());
3941
let path = os::join_paths(path.as_slice()).unwrap();
4042

41-
assert!(Command::new("mytest").env("PATH", path.as_slice())
42-
.arg("child")
43-
.status().unwrap().success());
43+
let child_output = Command::new("mytest").env("PATH", path.as_slice())
44+
.arg("child")
45+
.output().unwrap();
46+
47+
assert!(child_output.status.success(),
48+
format!("child assertion failed\n child stdout:\n {}\n child stderr:\n {}",
49+
child_output.output.container_as_str().unwrap(),
50+
child_output.error.container_as_str().unwrap()));
4451
}

0 commit comments

Comments
 (0)