File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ pub fn cli() -> App {
26
26
"Build all targets (default)" ,
27
27
)
28
28
. arg_release ( "Build artifacts in release mode, with optimizations" )
29
+ . arg_features ( )
29
30
. arg_manifest_path ( )
30
31
. arg_message_format ( )
31
32
. after_help (
Original file line number Diff line number Diff line change @@ -225,3 +225,29 @@ fn rustdoc_same_name_documents_lib() {
225
225
) ) ,
226
226
) ;
227
227
}
228
+
229
+ #[ test]
230
+ fn features ( ) {
231
+ let p = project ( "foo" )
232
+ . file (
233
+ "Cargo.toml" ,
234
+ r#"
235
+ [package]
236
+ name = "foo"
237
+ version = "0.0.1"
238
+ authors = []
239
+
240
+ [features]
241
+ quux = []
242
+ "# ,
243
+ )
244
+ . file ( "src/lib.rs" , "" )
245
+ . build ( ) ;
246
+
247
+ assert_that (
248
+ p. cargo ( "rustdoc --verbose --features quux" ) ,
249
+ execs ( )
250
+ . with_status ( 0 )
251
+ . with_stderr_contains ( "[..]feature=[..]quux[..]" ) ,
252
+ ) ;
253
+ }
You can’t perform that action at this time.
0 commit comments