Changeset - 3e8f48ccca86
[Not reviewed]
default
0 1 3
Marcin Kuzminski - 12 years ago 2013-06-17 20:10:47
marcin@python-works.com
Added some missing tests for copy+chmod, copy+chmod+modify
on diff parser
4 files changed with 52 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/tests/fixtures/hg_diff_copy_and_chmod_file.diff
Show inline comments
 
new file 100644
 
diff --git a/file3 b/file4
 
old mode 100644
 
new mode 100755
 
copy from file3
 
copy to file4
rhodecode/tests/fixtures/hg_diff_copy_and_modify_file.diff
Show inline comments
 
new file 100644
 
diff --git a/file2 b/file3
 
copy from file2
 
copy to file3
 
--- a/file2
 
+++ b/file3
 
@@ -1,2 +1,3 @@
 
 line1
 
 line2
 
+line3
rhodecode/tests/fixtures/hg_diff_copy_chmod_and_edit_file.diff
Show inline comments
 
new file 100644
 
diff --git a/file4 b/file5
 
old mode 100755
 
new mode 100644
 
copy from file4
 
copy to file5
 
--- a/file4
 
+++ b/file5
 
@@ -1,3 +1,4 @@
 
-line1
 
 line2
 
 line3
 
+line4
 
+line5
rhodecode/tests/models/test_diff_parsers.py
Show inline comments
 
@@ -223,6 +223,31 @@ DIFF_FIXTURES = {
 
          'deleted': 0,
 
          'binary': True,
 
          'ops': {COPIED_FILENODE: 'file copied from file1 to file2'}}),
 
    ],
 
    'hg_diff_copy_and_modify_file.diff': [
 
        ('file3', 'M',
 
         {'added': 1,
 
          'deleted': 0,
 
          'binary': False,
 
          'ops': {COPIED_FILENODE: 'file copied from file2 to file3',
 
                  MOD_FILENODE: 'modified file'}}),
 
    ],
 
    'hg_diff_copy_and_chmod_file.diff': [
 
        ('file4', 'M',
 
         {'added': 0,
 
          'deleted': 0,
 
          'binary': True,
 
          'ops': {COPIED_FILENODE: 'file copied from file3 to file4',
 
                  CHMOD_FILENODE: 'modified file chmod 100644 => 100755'}}),
 
    ],
 
    'hg_diff_copy_chmod_and_edit_file.diff': [
 
        ('file5', 'M',
 
         {'added': 2,
 
          'deleted': 1,
 
          'binary': False,
 
          'ops': {COPIED_FILENODE: 'file copied from file4 to file5',
 
                  CHMOD_FILENODE: 'modified file chmod 100755 => 100644',
 
                  MOD_FILENODE: 'modified file'}}),
 
    ]
 
#     'large_diff.diff': [
 
#         ('.hgignore', 'A', {'deleted': 0, 'binary': False, 'added': 3, 'ops': {1: 'new file 100644'}}),
0 comments (0 inline, 0 general)