File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ impl Args {
9292 . help ( "Add a dependency - either just the package name (for the latest version) or as `name=version`" )
9393 . long ( "dep" )
9494 . short ( 'd' )
95- . num_args ( 1 ..)
96- . number_of_values ( 1 )
95+ . action ( ArgAction :: Append )
9796 )
9897 . arg ( Arg :: new ( "extern" )
9998 . 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() {
281281 )
282282 . unwrap ( )
283283}
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