@@ -195,7 +195,6 @@ fn custom_build_script_wrong_rustc_flags() {
195
195
. run ( ) ;
196
196
}
197
197
198
- /*
199
198
#[ cargo_test]
200
199
fn custom_build_script_rustc_flags ( ) {
201
200
let p = project ( )
@@ -211,7 +210,8 @@ fn custom_build_script_rustc_flags() {
211
210
[dependencies.foo]
212
211
path = "foo"
213
212
"# ,
214
- ).file("src/main.rs", "fn main() {}")
213
+ )
214
+ . file ( "src/main.rs" , "fn main() {}" )
215
215
. file (
216
216
"foo/Cargo.toml" ,
217
217
r#"
@@ -222,33 +222,37 @@ fn custom_build_script_rustc_flags() {
222
222
authors = ["wycats@example.com"]
223
223
build = "build.rs"
224
224
"# ,
225
- ).file("foo/src/lib.rs", "")
225
+ )
226
+ . file ( "foo/src/lib.rs" , "" )
226
227
. file (
227
228
"foo/build.rs" ,
228
229
r#"
229
230
fn main() {
230
231
println!("cargo:rustc-flags=-l nonexistinglib -L /dummy/path1 -L /dummy/path2");
231
232
}
232
233
"# ,
233
- ).build();
234
+ )
235
+ . build ( ) ;
234
236
235
- // TODO: TEST FAILS BECAUSE OF WRONG STDOUT (but otherwise, the build works).
236
237
p. cargo ( "build --verbose" )
237
- .with_status(101)
238
238
. with_stderr (
239
239
"\
240
- [COMPILING] bar v0.5.0 ([CWD])
241
- [RUNNING] `rustc --crate-name test [CWD]/src/lib.rs --crate-type lib -C debuginfo=2 \
242
- -C metadata=[..] \
243
- -C extra-filename=-[..] \
244
- --out-dir [CWD]/target \
245
- --emit=[..]link \
246
- -L [CWD]/target \
247
- -L [CWD]/target/deps`
240
+ [COMPILING] foo [..]
241
+ [RUNNING] `rustc --crate-name build_script_build foo/build.rs [..]
242
+ [RUNNING] `[..]build-script-build`
243
+ [RUNNING] `rustc --crate-name foo foo/src/lib.rs [..]\
244
+ -L dependency=[CWD]/target/debug/deps \
245
+ -L /dummy/path1 -L /dummy/path2 -l nonexistinglib`
246
+ [COMPILING] bar [..]
247
+ [RUNNING] `rustc --crate-name bar src/main.rs [..]\
248
+ -L dependency=[CWD]/target/debug/deps \
249
+ --extern foo=[..]libfoo-[..] \
250
+ -L /dummy/path1 -L /dummy/path2`
251
+ [FINISHED] dev [..]
248
252
" ,
249
- ).run();
253
+ )
254
+ . run ( ) ;
250
255
}
251
- */
252
256
253
257
#[ cargo_test]
254
258
fn links_no_build_cmd ( ) {
0 commit comments