@@ -246,7 +246,7 @@ mod prepare {
246246 #[ test]
247247 fn multiple_arguments_in_one_line_with_auto_split ( ) {
248248 let cmd = std:: process:: Command :: from (
249- gix_command:: prepare ( "echo first second third" ) . with_shell_allow_argument_splitting ( ) ,
249+ gix_command:: prepare ( "echo first second third" ) . with_shell_allow_manual_argument_splitting ( ) ,
250250 ) ;
251251 assert_eq ! (
252252 format!( "{cmd:?}" ) ,
@@ -313,19 +313,29 @@ mod prepare {
313313
314314 #[ test]
315315 fn single_and_complex_arguments_with_auto_split ( ) {
316- let cmd =
317- std:: process:: Command :: from ( gix_command:: prepare ( "ls --foo=\" a b\" " ) . with_shell_allow_argument_splitting ( ) ) ;
316+ let cmd = std:: process:: Command :: from (
317+ gix_command:: prepare ( "ls --foo=\" a b\" " ) . with_shell_allow_manual_argument_splitting ( ) ,
318+ ) ;
318319 assert_eq ! (
319320 format!( "{cmd:?}" ) ,
320321 format!( r#""ls" "--foo=a b""# ) ,
321322 "splitting can also handle quotes"
322323 ) ;
323324 }
324325
326+ #[ test]
327+ fn single_and_complex_arguments_without_auto_split ( ) {
328+ let cmd = std:: process:: Command :: from (
329+ gix_command:: prepare ( "ls --foo=\" a b\" " ) . with_shell_disallow_manual_argument_splitting ( ) ,
330+ ) ;
331+ assert_eq ! ( format!( "{cmd:?}" ) , quoted( & [ SH , "-c" , r#"ls --foo=\"a b\""# , "--" ] ) ) ;
332+ }
333+
325334 #[ test]
326335 fn single_and_complex_arguments_will_not_auto_split_on_special_characters ( ) {
327- let cmd =
328- std:: process:: Command :: from ( gix_command:: prepare ( "ls --foo=~/path" ) . with_shell_allow_argument_splitting ( ) ) ;
336+ let cmd = std:: process:: Command :: from (
337+ gix_command:: prepare ( "ls --foo=~/path" ) . with_shell_allow_manual_argument_splitting ( ) ,
338+ ) ;
329339 assert_eq ! (
330340 format!( "{cmd:?}" ) ,
331341 format!( r#""{SH}" "-c" "ls --foo=~/path" "--""# ) ,
0 commit comments