@@ -25,30 +25,6 @@ fn option_long() {
25
25
assert_eq ! ( m. values_of( "option" ) . unwrap( ) . collect:: <Vec <_>>( ) , [ "val1" , "val2" , "val3" ] ) ;
26
26
}
27
27
28
- #[ test]
29
- fn with_subcmd ( ) {
30
- let m = App :: new ( "multiple_values" )
31
- . arg ( Arg :: with_name ( "option" )
32
- . long ( "option" )
33
- . help ( "multiple options" )
34
- . takes_value ( true )
35
- . multiple ( true ) )
36
- . subcommand ( SubCommand :: with_name ( "foo" ) )
37
- . get_matches_from_safe ( vec ! [
38
- "" ,
39
- "--option" , "val1" ,
40
- "val2" , "foo"
41
- ] ) ;
42
-
43
- assert ! ( m. is_ok( ) ) ;
44
- let m = m. unwrap ( ) ;
45
-
46
- assert ! ( m. is_present( "option" ) ) ;
47
- assert_eq ! ( m. occurrences_of( "option" ) , 1 ) ;
48
- assert_eq ! ( m. values_of( "option" ) . unwrap( ) . collect:: <Vec <_>>( ) , [ "val1" , "val2" ] ) ;
49
- assert_eq ! ( m. subcommand_name( ) , Some ( "foo" ) ) ;
50
- }
51
-
52
28
#[ test]
53
29
fn option_short ( ) {
54
30
let m = App :: new ( "multiple_values" )
@@ -985,35 +961,6 @@ fn low_index_positional() {
985
961
assert_eq ! ( m. value_of( "target" ) . unwrap( ) , "target" ) ;
986
962
}
987
963
988
- #[ test]
989
- fn low_index_positional_with_subcmd ( ) {
990
- let m = App :: new ( "lip" )
991
- . arg ( Arg :: with_name ( "files" )
992
- . index ( 1 )
993
- . required ( true )
994
- . multiple ( true ) )
995
- . arg ( Arg :: with_name ( "target" )
996
- . index ( 2 )
997
- . required ( true ) )
998
- . subcommand ( SubCommand :: with_name ( "test" ) . arg ( Arg :: with_name ( "other" ) ) )
999
- . get_matches_from_safe ( vec ! [
1000
- "lip" ,
1001
- "file1" , "file2" ,
1002
- "file3" , "target" ,
1003
- "test"
1004
- ] ) ;
1005
-
1006
- assert ! ( m. is_ok( ) , "{:?}" , m. unwrap_err( ) . kind) ;
1007
- let m = m. unwrap ( ) ;
1008
-
1009
- assert ! ( m. is_present( "files" ) ) ;
1010
- assert_eq ! ( m. occurrences_of( "files" ) , 3 ) ;
1011
- assert ! ( m. is_present( "target" ) ) ;
1012
- assert_eq ! ( m. occurrences_of( "target" ) , 1 ) ;
1013
- assert_eq ! ( m. values_of( "files" ) . unwrap( ) . collect:: <Vec <_>>( ) , [ "file1" , "file2" , "file3" ] ) ;
1014
- assert_eq ! ( m. value_of( "target" ) . unwrap( ) , "target" ) ;
1015
- }
1016
-
1017
964
#[ test]
1018
965
fn low_index_positional_in_subcmd ( ) {
1019
966
let m = App :: new ( "lip" )
0 commit comments