Explorar el Código

Dirty fix false alarm of dangling header reported in issue #14

Matthew Wang hace 11 años
padre
commit
6a6249f4c6
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      cdiff.py
  2. 1
    1
      tests/test_cdiff.py

+ 1
- 1
cdiff.py Ver fichero

@@ -408,7 +408,7 @@ class Udiff(Diff):
408 408
         '----' likely to see in diff from yaml file
409 409
         """
410 410
         return line.startswith('-') and not self.is_old_path(line) and \
411
-            not re.match(r'^-{5,}$', line.rstrip())
411
+            not re.match(r'^-{72}$', line.rstrip())
412 412
 
413 413
     def is_new(self, line):
414 414
         return line.startswith('+') and not self.is_new_path(line)

+ 1
- 1
tests/test_cdiff.py Ver fichero

@@ -411,7 +411,7 @@ class TestUdiff(unittest.TestCase):
411 411
 
412 412
     def test_is_old_neg(self):
413 413
         self.assertFalse(self.diff.is_old('--- considered as old path'))
414
-        self.assertFalse(self.diff.is_old('-------------'))  # svn log --diff
414
+        self.assertFalse(self.diff.is_old('-' * 72))         # svn log --diff
415 415
 
416 416
     def test_is_new(self):
417 417
         self.assertTrue(self.diff.is_new('+hello world'))