Browse Source

Fix special hunk meta handling in unit tests

Matthew Wang 9 years ago
parent
commit
8f4d68e171
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      tests/test_cdiff.py

+ 4
- 4
tests/test_cdiff.py View File

420
 
420
 
421
     def test_parse_hunk_meta_missing(self):
421
     def test_parse_hunk_meta_missing(self):
422
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3 +3,6 @@'),
422
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3 +3,6 @@'),
423
-                         ((3, 0), (3, 6)))
423
+                         ((3, 1), (3, 6)))
424
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3,7 +3 @@'),
424
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3,7 +3 @@'),
425
-                         ((3, 7), (3, 0)))
425
+                         ((3, 7), (3, 1)))
426
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3 +3 @@'),
426
         self.assertEqual(self.diff.parse_hunk_meta('@@ -3 +3 @@'),
427
-                         ((3, 0), (3, 0)))
427
+                         ((3, 1), (3, 1)))
428
 
428
 
429
     def test_parse_hunk_meta_svn_prop(self):
429
     def test_parse_hunk_meta_svn_prop(self):
430
         self.assertEqual(self.diff.parse_hunk_meta('## -0,0 +1 ##'),
430
         self.assertEqual(self.diff.parse_hunk_meta('## -0,0 +1 ##'),
431
-                         ((0, 0), (1, 0)))
431
+                         ((0, 0), (1, 1)))
432
 
432
 
433
     def test_is_old(self):
433
     def test_is_old(self):
434
         self.assertTrue(self.diff.is_old('-hello world'))
434
         self.assertTrue(self.diff.is_old('-hello world'))