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 @@ -584,13 +584,13 @@ echo username=c
584
584
return ;
585
585
} // shell scripts don't work on Windows
586
586
let td = TempDir :: new ( ) . unwrap ( ) ;
587
- let path = td. path ( ) . join ( "git-credential-script" ) ;
587
+ let path = td. path ( ) . join ( "git-credential-some- script" ) ;
588
588
File :: create ( & path)
589
589
. unwrap ( )
590
590
. write (
591
591
br"\
592
592
#!/bin/sh
593
- echo username=c
593
+ echo username=$1
594
594
" ,
595
595
)
596
596
. unwrap ( ) ;
@@ -602,14 +602,14 @@ echo username=c
602
602
env:: set_var ( "PATH" , & env:: join_paths ( paths) . unwrap ( ) ) ;
603
603
604
604
let cfg = test_cfg ! {
605
- "credential.https://example.com.helper" => "script" ,
605
+ "credential.https://example.com.helper" => "some- script \" value/with \\ slashes \" " ,
606
606
"credential.helper" => "!f() { echo username=a; echo password=b; }; f"
607
607
} ;
608
608
let ( u, p) = CredentialHelper :: new ( "https://example.com/foo/bar" )
609
609
. config ( & cfg)
610
610
. execute ( )
611
611
. unwrap ( ) ;
612
- assert_eq ! ( u, "c " ) ;
612
+ assert_eq ! ( u, "value/with \\ slashes " ) ;
613
613
assert_eq ! ( p, "b" ) ;
614
614
}
615
615
You can’t perform that action at this time.
0 commit comments