File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ mod prepare {
131
131
/// Use a shell, but try to split arguments by hand if this can be safely done without a shell.
132
132
///
133
133
/// If that's not the case, use a shell instead.
134
- pub fn with_shell_allow_argument_splitting ( mut self ) -> Self {
134
+ pub fn with_shell_allow_manual_argument_splitting ( mut self ) -> Self {
135
135
self . allow_manual_arg_splitting = true ;
136
136
self . with_shell ( )
137
137
}
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ mod prepare {
246
246
#[ test]
247
247
fn multiple_arguments_in_one_line_with_auto_split ( ) {
248
248
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 ( ) ,
250
250
) ;
251
251
assert_eq ! (
252
252
format!( "{cmd:?}" ) ,
@@ -313,8 +313,9 @@ mod prepare {
313
313
314
314
#[ test]
315
315
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
+ ) ;
318
319
assert_eq ! (
319
320
format!( "{cmd:?}" ) ,
320
321
format!( r#""ls" "--foo=a b""# ) ,
@@ -332,8 +333,9 @@ mod prepare {
332
333
333
334
#[ test]
334
335
fn single_and_complex_arguments_will_not_auto_split_on_special_characters ( ) {
335
- let cmd =
336
- 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
+ ) ;
337
339
assert_eq ! (
338
340
format!( "{cmd:?}" ) ,
339
341
format!( r#""{SH}" "-c" "ls --foo=~/path" "--""# ) ,
You can’t perform that action at this time.
0 commit comments