diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-06-14 07:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 07:38:26 +0200 |
commit | d22c40b942cca16ff9e70d879b669c97599406b7 (patch) | |
tree | c096676b530c03d941ec7d053cbba5b65b39e556 /git/test/test_diff.py | |
parent | 4510b3c42b85305c95c1f39be2b9872be52c2e5e (diff) | |
parent | 200d3c6cb436097eaee7c951a0c9921bfcb75c7f (diff) | |
download | gitpython-d22c40b942cca16ff9e70d879b669c97599406b7.tar.gz |
Merge pull request #467 from gitpython-developers/fix-dont-choke-on-invalid-unicode-paths
Don't choke on (legitimately) invalidly encoded Unicode paths
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r-- | git/test/test_diff.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index 8966351a..8d189b12 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -162,16 +162,17 @@ class TestDiff(TestBase): self.assertEqual(res[7].b_path, u'path/with-question-mark?') self.assertEqual(res[8].b_path, u'path/¯\\_(ツ)_|¯') self.assertEqual(res[9].b_path, u'path/💩.txt') + self.assertEqual(res[10].b_path, u'path/�-invalid-unicode-path.txt') # The "Moves" # NOTE: The path prefixes a/ and b/ here are legit! We're actually # verifying that it's not "a/a/" that shows up, see the fixture data. - self.assertEqual(res[10].a_path, u'a/with spaces') # NOTE: path a/ here legit! - self.assertEqual(res[10].b_path, u'b/with some spaces') # NOTE: path b/ here legit! - self.assertEqual(res[11].a_path, u'a/ending in a space ') - self.assertEqual(res[11].b_path, u'b/ending with space ') - self.assertEqual(res[12].a_path, u'a/"with-quotes"') - self.assertEqual(res[12].b_path, u'b/"with even more quotes"') + self.assertEqual(res[11].a_path, u'a/with spaces') # NOTE: path a/ here legit! + self.assertEqual(res[11].b_path, u'b/with some spaces') # NOTE: path b/ here legit! + self.assertEqual(res[12].a_path, u'a/ending in a space ') + self.assertEqual(res[12].b_path, u'b/ending with space ') + self.assertEqual(res[13].a_path, u'a/"with-quotes"') + self.assertEqual(res[13].b_path, u'b/"with even more quotes"') def test_diff_patch_format(self): # test all of the 'old' format diffs for completness - it should at least |