@@ -398,6 +398,10 @@ def test_complex_aliases(self):
398
398
self ._to_memcache (fixture_path (".gitconfig" )).getvalue (),
399
399
)
400
400
401
+ def test_config_with_extra_whitespace (self ):
402
+ cr = GitConfigParser (fixture_path ("git_config_with_extra_whitespace" ), read_only = True )
403
+ self .assertEqual (cr .get ("init" , "defaultBranch" ), "trunk" )
404
+
401
405
def test_empty_config_value (self ):
402
406
cr = GitConfigParser (fixture_path ("git_config_with_empty_value" ), read_only = True )
403
407
@@ -413,9 +417,13 @@ def test_config_with_quotes(self):
413
417
self .assertEqual (cr .get ("user" , "email" ), "cveal05@gmail.com" )
414
418
415
419
def test_config_with_quotes_with_literal_whitespace (self ):
416
- cr = GitConfigParser (fixture_path ("git_config_with_quotes_whitespace " ), read_only = True )
420
+ cr = GitConfigParser (fixture_path ("git_config_with_quotes_whitespace_inside " ), read_only = True )
417
421
self .assertEqual (cr .get ("core" , "commentString" ), "# " )
418
422
423
+ def test_config_with_quotes_with_whitespace_outside_value (self ):
424
+ cr = GitConfigParser (fixture_path ("git_config_with_quotes_whitespace_outside" ), read_only = True )
425
+ self .assertEqual (cr .get ("init" , "defaultBranch" ), "trunk" )
426
+
419
427
def test_get_values_works_without_requiring_any_other_calls_first (self ):
420
428
file_obj = self ._to_memcache (fixture_path ("git_config_multiple" ))
421
429
cr = GitConfigParser (file_obj , read_only = True )
0 commit comments