File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -4840,6 +4840,9 @@ fn close_output() {
4840
4840
4841
4841
[lib]
4842
4842
proc-macro = true
4843
+
4844
+ [[bin]]
4845
+ name = "foobar"
4843
4846
"# ,
4844
4847
)
4845
4848
. file (
@@ -4864,15 +4867,14 @@ fn close_output() {
4864
4867
} else {
4865
4868
println!("{}", i);
4866
4869
}
4867
- std::thread::sleep(std::time::Duration::new(0, 1));
4868
4870
}
4869
4871
TokenStream::new()
4870
4872
}
4871
4873
"#
4872
4874
. replace ( "__ADDR__" , & addr. to_string ( ) ) ,
4873
4875
)
4874
4876
. file (
4875
- "src/main .rs" ,
4877
+ "src/bin/foobar .rs" ,
4876
4878
r#"
4877
4879
foo::repro!();
4878
4880
@@ -4913,19 +4915,27 @@ fn close_output() {
4913
4915
} ;
4914
4916
4915
4917
let stderr = spawn ( false ) ;
4916
- lines_match (
4917
- "\
4918
+ assert ! (
4919
+ lines_match(
4920
+ "\
4918
4921
[COMPILING] foo [..]
4919
4922
hello stderr!
4920
4923
[ERROR] [..]
4921
4924
[WARNING] build failed, waiting for other jobs to finish...
4922
4925
[ERROR] build failed
4923
4926
" ,
4924
- & stderr,
4927
+ & stderr,
4928
+ ) ,
4929
+ "lines differ:\n {}" ,
4930
+ stderr
4925
4931
) ;
4926
4932
4927
4933
// Try again with stderr.
4928
4934
p. build_dir ( ) . rm_rf ( ) ;
4929
4935
let stdout = spawn ( true ) ;
4930
- lines_match ( "hello_stdout!" , & stdout) ;
4936
+ assert ! (
4937
+ lines_match( "hello stdout!\n " , & stdout) ,
4938
+ "lines differ:\n {}" ,
4939
+ stdout
4940
+ ) ;
4931
4941
}
You can’t perform that action at this time.
0 commit comments