Skip to content

Commit

Permalink
Add test for quotes in config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
garyvdm authored and jelmer committed Sep 13, 2015
1 parent 38ce15f commit 037f9cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dulwich/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ def test_same_line(self):
cf = self.from_file(b"[branch.foo] foo = bar\n")
self.assertEqual(b"bar", cf.get((b"branch", b"foo"), b"foo"))

def test_quoted(self):
cf = self.from_file(b"""[gui]
fontdiff = -family \\\"Ubuntu Mono\\\" -size 11 -weight normal -slant roman -underline 0 -overstrike 0
""")
self.assertEqual(ConfigFile({(b'gui', ): {
b'fontdiff': b'-family "Ubuntu Mono" -size 11 -weight normal -slant roman -underline 0 -overstrike 0',
}}), cf)


class ConfigDictTests(TestCase):

Expand Down

0 comments on commit 037f9cb

Please sign in to comment.