Author: rhuijben
Date: Sun Jan 20 01:07:26 2013
New Revision: 1435775
URL: http://svn.apache.org/viewvc?rev=1435775&view=rev
Log:
* subversion/tests/cmdline/patch_tests.py
(patch_change_symlink_target): Verify patch by applying it on a similar text.
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=1435775&r1=1435774&r2=1435775&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Sun Jan 20
01:07:26 2013
@@ -4226,20 +4226,35 @@ def patch_change_symlink_target(sbox):
"\\ No newline at end of file",
"",
]))
-
- # r2
- sbox.simple_add_symlink('target', 'link')
+
+ # r2 - Try as plain text with how we encode the symlink
+ svntest.main.file_write(sbox.ospath('link'), 'link foo')
+ sbox.simple_add('link')
sbox.simple_commit()
expected_output = [
- 'M %s\n' % sbox.ospath('link'),
+ 'U %s\n' % sbox.ospath('link'),
]
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'patch', patch_file_path, wc_dir)
+
+ # r3 - Store result
+ sbox.simple_commit()
+
+ # r4 - Now as symlink
+ sbox.simple_rm('link')
+ sbox.simple_add_symlink('target', 'link')
+ sbox.simple_commit()
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'patch', patch_file_path, wc_dir)
+
# This currently fails.
+ # (On Windows it deletes the file that represents the symlink as 'D XX\link')
# TODO: when it passes, verify that the on-disk 'link' is correct ---
# symlink to 'bar' (or "link bar" on non-HAVE_SYMLINK platforms)
- svntest.actions.run_and_verify_svn(None, "U *link", [],
- 'patch', patch_file_path, wc_dir)
+
########################################################################
#Run the tests