File tree Expand file tree Collapse file tree 4 files changed +46
-12
lines changed
tests/run-make/crate-data-smoke Expand file tree Collapse file tree 4 files changed +46
-12
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl Rustc {
205205
206206 /// Get the [`Output`][::std::process::Output] of the finished process.
207207 #[ track_caller]
208- pub fn command_output ( & mut self ) -> :: std :: process :: Output {
208+ pub fn command_output ( & mut self ) -> Output {
209209 // let's make sure we piped all the input and outputs
210210 self . cmd . stdin ( Stdio :: piped ( ) ) ;
211211 self . cmd . stdout ( Stdio :: piped ( ) ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ run-make/compiler-rt-works-on-mingw/Makefile
2424run-make/compressed-debuginfo/Makefile
2525run-make/const-prop-lint/Makefile
2626run-make/const_fn_mir/Makefile
27- run-make/crate-data-smoke/Makefile
2827run-make/crate-hash-rustc-version/Makefile
2928run-make/crate-name-priority/Makefile
3029run-make/cross-lang-lto-clang/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // Tests that const prop lints interrupting codegen don't leave `.o` files around.
2+
3+ use std:: process:: Output ;
4+
5+ use run_make_support:: { bin_name, rust_lib, rustc} ;
6+
7+ fn compare_stdout < S : AsRef < str > > ( output : Output , expected : S ) {
8+ assert_eq ! (
9+ String :: from_utf8( output. stdout) . unwrap( ) . trim( ) ,
10+ expected. as_ref( )
11+ ) ;
12+ }
13+
14+ fn main ( ) {
15+ compare_stdout ( rustc ( ) . print ( "crate-name" ) . input ( "crate.rs" ) . run ( ) , "foo" ) ;
16+ compare_stdout (
17+ rustc ( ) . print ( "file-names" ) . input ( "crate.rs" ) . run ( ) ,
18+ bin_name ( "foo" ) ,
19+ ) ;
20+ compare_stdout (
21+ rustc ( )
22+ . print ( "file-names" )
23+ . crate_type ( "lib" )
24+ . arg ( "--test" )
25+ . input ( "crate.rs" )
26+ . run ( ) ,
27+ bin_name ( "foo" ) ,
28+ ) ;
29+ compare_stdout (
30+ rustc ( )
31+ . print ( "file-names" )
32+ . arg ( "--test" )
33+ . input ( "lib.rs" )
34+ . run ( ) ,
35+ bin_name ( "mylib" ) ,
36+ ) ;
37+ compare_stdout (
38+ rustc ( ) . print ( "file-names" ) . input ( "lib.rs" ) . run ( ) ,
39+ rust_lib ( "mylib" ) . file_name ( ) . unwrap ( ) . to_string_lossy ( ) ,
40+ ) ;
41+ compare_stdout (
42+ rustc ( ) . print ( "file-names" ) . input ( "rlib.rs" ) . run ( ) ,
43+ rust_lib ( "mylib" ) . file_name ( ) . unwrap ( ) . to_string_lossy ( ) ,
44+ ) ;
45+ }
You can’t perform that action at this time.
0 commit comments