You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/09/28 14:26:48 UTC
svn commit: r1705668 -
/subversion/trunk/subversion/tests/cmdline/patch_tests.py
Author: rhuijben
Date: Mon Sep 28 12:26:48 2015
New Revision: 1705668
URL: http://svn.apache.org/viewvc?rev=1705668&view=rev
Log:
Following up on r1705663, add regression test for a new issue:
patches that just tweak filemode should not create an empty file.
* subversion/tests/cmdline/patch_tests.py
(patch_adds_executability_nocontents2): New test.
(test_list): Insert test.
Modified:
subversion/trunk/subversion/tests/cmdline/patch_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/patch_tests.py?rev=1705668&r1=1705667&r2=1705668&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Mon Sep 28 12:26:48 2015
@@ -6016,6 +6016,37 @@ def patch_adds_executability_nocontents(
expected_status, expected_skip,
[], True, True, '--reverse-diff')
+@XFail()
+def patch_adds_executability_nocontents2(sbox):
+ "patch adds svn:executable, without contents 2"
+
+ sbox.build(read_only=True)
+ wc_dir = sbox.wc_dir
+
+ unidiff_patch = (
+ "diff --git a/new b/new\n"
+ "old mode 100644\n"
+ "new mode 100755\n"
+ )
+ patch_file_path = make_patch_path(sbox)
+ svntest.main.file_write(patch_file_path, unidiff_patch)
+
+ expected_output = wc.State(wc_dir, {
+ })
+ expected_disk = svntest.main.greek_state.copy()
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('iota', status=' M')
+
+ expected_skip = wc.State(wc_dir, {
+ 'new' : Item(verb='Skipped')
+ })
+
+ # This creates 'new', while a skip or reject is expected
+ svntest.actions.run_and_verify_patch(wc_dir, patch_file_path,
+ expected_output, expected_disk,
+ expected_status, expected_skip)
+
+
def patch_adds_executability_yescontents(sbox):
"""patch adds svn:executable, with contents"""
@@ -6234,6 +6265,7 @@ test_list = [ None,
patch_delete_missing_eol,
patch_final_eol,
patch_adds_executability_nocontents,
+ patch_adds_executability_nocontents2,
patch_adds_executability_yescontents,
patch_deletes_executability,
patch_ambiguous_executability_contradiction,