File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -578,13 +578,13 @@ echo username=c
578
578
return ;
579
579
} // shell scripts don't work on Windows
580
580
let td = TempDir :: new ( ) . unwrap ( ) ;
581
- let path = td. path ( ) . join ( "git-credential-script" ) ;
581
+ let path = td. path ( ) . join ( "git-credential-some- script" ) ;
582
582
File :: create ( & path)
583
583
. unwrap ( )
584
584
. write (
585
585
br"\
586
586
#!/bin/sh
587
- echo username=c
587
+ echo username=$1
588
588
" ,
589
589
)
590
590
. unwrap ( ) ;
@@ -596,14 +596,14 @@ echo username=c
596
596
env:: set_var ( "PATH" , & env:: join_paths ( paths) . unwrap ( ) ) ;
597
597
598
598
let cfg = test_cfg ! {
599
- "credential.https://example.com.helper" => "script" ,
599
+ "credential.https://example.com.helper" => "some- script \" value/with \\ slashes \" " ,
600
600
"credential.helper" => "!f() { echo username=a; echo password=b; }; f"
601
601
} ;
602
602
let ( u, p) = CredentialHelper :: new ( "https://example.com/foo/bar" )
603
603
. config ( & cfg)
604
604
. execute ( )
605
605
. unwrap ( ) ;
606
- assert_eq ! ( u, "c " ) ;
606
+ assert_eq ! ( u, "value/with \\ slashes " ) ;
607
607
assert_eq ! ( p, "b" ) ;
608
608
}
609
609
You can’t perform that action at this time.
0 commit comments