@@ -556,6 +556,42 @@ public void Settings_ProxyConfiguration_GitHttpConfig_ReturnsValue()
556
556
Assert . False ( actualConfig . IsDeprecatedSource ) ;
557
557
}
558
558
559
+ [ Fact ]
560
+ public void Settings_ProxyConfiguration_NoProxyMixedSplitChar_ReturnsValue ( )
561
+ {
562
+ const string remoteUrl = "http://example.com/foo.git" ;
563
+ const string section = Constants . GitConfiguration . Http . SectionName ;
564
+ const string property = Constants . GitConfiguration . Http . Proxy ;
565
+ var remoteUri = new Uri ( remoteUrl ) ;
566
+
567
+ const string expectedUserName = "john.doe" ;
568
+ const string expectedPassword = "letmein123" ;
569
+ var expectedAddress = new Uri ( "http://proxy.example.com" ) ;
570
+ var settingValue = new Uri ( "http://john.doe:[email protected] " ) ;
571
+ var bypassList = new List < string > { "contoso.com" , "fabrikam.com" , "example.com" } ;
572
+
573
+ var envars = new TestEnvironment
574
+ {
575
+ Variables = { [ Constants . EnvironmentVariables . CurlNoProxy ] = "contoso.com, fabrikam.com example.com," }
576
+ } ;
577
+ var git = new TestGit ( ) ;
578
+ git . GlobalConfiguration [ $ "{ section } .{ property } "] = settingValue . ToString ( ) ;
579
+
580
+ var settings = new Settings ( envars , git )
581
+ {
582
+ RemoteUri = remoteUri
583
+ } ;
584
+
585
+ ProxyConfiguration actualConfig = settings . GetProxyConfiguration ( ) ;
586
+
587
+ Assert . NotNull ( actualConfig ) ;
588
+ Assert . Equal ( expectedAddress , actualConfig . Address ) ;
589
+ Assert . Equal ( expectedUserName , actualConfig . UserName ) ;
590
+ Assert . Equal ( expectedPassword , actualConfig . Password ) ;
591
+ Assert . Equal ( bypassList , actualConfig . BypassHosts ) ;
592
+ Assert . False ( actualConfig . IsDeprecatedSource ) ;
593
+ }
594
+
559
595
[ Fact ]
560
596
public void Settings_ProxyConfiguration_CurlHttpEnvar_ReturnsValue ( )
561
597
{
0 commit comments