File tree 3 files changed +23
-2
lines changed
3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ impl Args {
92
92
. help ( "Add a dependency - either just the package name (for the latest version) or as `name=version`" )
93
93
. long ( "dep" )
94
94
. short ( 'd' )
95
- . num_args ( 1 ..)
96
- . number_of_values ( 1 )
95
+ . action ( ArgAction :: Append )
97
96
)
98
97
. arg ( Arg :: new ( "extern" )
99
98
. help ( "Adds an `#[macro_use] extern crate name;` item for expressions and loop scripts" )
Original file line number Diff line number Diff line change
1
+ use anyhow:: Result ;
2
+ use serde_json:: from_str;
3
+
4
+ println ! ( "--output--" ) ;
5
+ println ! ( "Ok" ) ;
Original file line number Diff line number Diff line change @@ -281,3 +281,20 @@ fn test_extern_c_main() {
281
281
)
282
282
. unwrap ( )
283
283
}
284
+
285
+ #[ test]
286
+ #[ cfg_attr( not( feature = "online_tests" ) , ignore) ]
287
+ fn test_script_multiple_deps ( ) {
288
+ let out = rust_script ! (
289
+ "-d" ,
290
+ "serde_json=1.0.96" ,
291
+ "-d" ,
292
+ "anyhow=1.0.71" ,
293
+ "tests/data/script-using-anyhow-and-serde.rs"
294
+ )
295
+ . unwrap ( ) ;
296
+ scan ! ( out. stdout_output( ) ;
297
+ ( "Ok" ) => ( )
298
+ )
299
+ . unwrap ( )
300
+ }
You can’t perform that action at this time.
0 commit comments