File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ pub fn cli() -> App {
27
27
)
28
28
. arg_release ( "Build artifacts in release mode, with optimizations" )
29
29
. arg_features ( )
30
+ . arg_target_triple ( "Build for the target triple" )
30
31
. arg_target_dir ( )
31
32
. arg_manifest_path ( )
32
33
. arg_message_format ( )
Original file line number Diff line number Diff line change @@ -251,3 +251,32 @@ fn features() {
251
251
. with_stderr_contains ( "[..]feature=[..]quux[..]" ) ,
252
252
) ;
253
253
}
254
+
255
+ #[ test]
256
+ #[ cfg( all( target_arch = "x86_64" , target_os = "linux" ) ) ]
257
+ fn rustdoc_target ( ) {
258
+ let p = project ( "foo" )
259
+ . file (
260
+ "Cargo.toml" ,
261
+ r#"
262
+ [package]
263
+ name = "a"
264
+ version = "0.0.1"
265
+ authors = []
266
+ "# ,
267
+ )
268
+ . file ( "src/lib.rs" , "" )
269
+ . build ( ) ;
270
+
271
+ assert_that (
272
+ p. cargo ( "rustdoc --verbose --target x86_64-unknown-linux-gnu" ) ,
273
+ execs ( ) . with_status ( 0 ) . with_stderr ( "\
274
+ [DOCUMENTING] a v0.0.1 ([..])
275
+ [RUNNING] `rustdoc --crate-name a src[/]lib.rs \
276
+ --target x86_64-unknown-linux-gnu \
277
+ -o [..]foo[/]target[/]x86_64-unknown-linux-gnu[/]doc \
278
+ -L dependency=[..]foo[/]target[/]x86_64-unknown-linux-gnu[/]debug[/]deps \
279
+ -L dependency=[..]foo[/]target[/]debug[/]deps`
280
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" ) ,
281
+ ) ;
282
+ }
You can’t perform that action at this time.
0 commit comments