changeset 4693:9740ec3be07a

diff: test rename with tab after ---/+++ and bare CR in diff
author Mads Kiilerich <madski@unity3d.com>
date Mon, 15 Dec 2014 13:47:36 +0100
parents 7b8cbcb927b2
children 11d6d1cec667
files kallithea/tests/fixtures/hg_diff_rename_space_cr.diff kallithea/tests/models/test_diff_parsers.py
diffstat 2 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kallithea/tests/fixtures/hg_diff_rename_space_cr.diff	Mon Dec 15 13:47:36 2014 +0100
@@ -0,0 +1,17 @@
+diff --git a/ohno b/ohyes
+rename from ohno
+rename to ohyes
+--- a/ohno	
++++ b/ohyes	
+@@ -1,5 +1,6 @@
+ 1
+-2
+ 2
+-3
 
++2
++3
+ 4
+@@ -5,3 +6,4 @@
+ 5
+ 6
+ 7
++8
--- a/kallithea/tests/models/test_diff_parsers.py	Mon Dec 15 13:47:36 2014 +0100
+++ b/kallithea/tests/models/test_diff_parsers.py	Mon Dec 15 13:47:36 2014 +0100
@@ -246,7 +246,14 @@
           'ops': {COPIED_FILENODE: 'file copied from file4 to file5',
                   CHMOD_FILENODE: 'modified file chmod 100755 => 100644',
                   MOD_FILENODE: 'modified file'}}),
-    ]
+    ],
+    'hg_diff_rename_space_cr.diff': [
+        ('ohyes', 'R',
+         {'added': 4,
+          'deleted': 2,
+          'binary': False,
+          'ops': {RENAMED_FILENODE: 'file renamed from ohno to ohyes'}}),
+    ],
 }