You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/07/24 13:55:17 UTC
svn commit: r978856 -
/subversion/trunk/subversion/tests/cmdline/diff_tests.py
Author: dannas
Date: Sat Jul 24 11:55:17 2010
New Revision: 978856
URL: http://svn.apache.org/viewvc?rev=978856&view=rev
Log:
Add XFailing test for a property diff that has missing intermediate
context lines.
Runnning:
diff -u <(svn pg prop iota@BASE) <(svn pg prop iota)
gives the right result, e.g. all context lines that should be there are
there and the hunk header offsets are right.
* subversion/tests/cmdline/diff_tests.py
(diff_prop_missing_context): New.
(tests_list): Add the new test.
Modified:
subversion/trunk/subversion/tests/cmdline/diff_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=978856&r1=978855&r2=978856&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Sat Jul 24 11:55:17 2010
@@ -3367,6 +3367,72 @@ def diff_git_format_url_url(sbox):
'--old', repo_url + '@1', '--new',
repo_url + '@2')
+def diff_prop_missing_context(sbox):
+ "diff for property has missing context"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ iota_path = os.path.join(wc_dir, 'iota')
+ prop_val = "".join([
+ "One line\n",
+ "Another line\n",
+ "\n",
+ " $ email <<EOT\n",
+ " > matkin@docs.uu.se\n",
+ " > Something strange @ my place\n",
+ " > EOT\n",
+ "\n",
+ "to a shell, will produce the output\n",
+ "\n",
+ ])
+ svntest.main.run_svn(None,
+ "propset", "prop", prop_val, iota_path)
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(verb='Sending'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('iota', wc_rev=2)
+ svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+ expected_status, None, wc_dir)
+
+ prop_val = "".join(["\n",
+ " $ email <<EOT\n",
+ " > matkin@docs.uu.se\n",
+ " > Something strange @ my place\n",
+ " > EOT\n",
+ "\n",
+ "\n",
+ ])
+ svntest.main.run_svn(None,
+ "propset", "prop", prop_val, iota_path)
+ expected_output = [
+ "Index: iota\n",
+ "===================================================================\n",
+ "--- iota\t(revision 2)\n",
+ "+++ iota\t(working copy)\n",
+ "\n",
+ "Property changes on: iota\n",
+ "___________________________________________________________________\n",
+ "Modified: prop\n",
+ "## -1,10 +1,7 ##\n",
+ "-One line\n",
+ "-Another line\n",
+ "\n",
+ " $ email <<EOT\n",
+ " > matkin@docs.uu.se\n",
+ " > Something strange @ my place\n",
+ " > EOT\n",
+ "\n",
+ "-to a shell, will produce the output\n",
+ "\n",
+ "\n",
+ ]
+
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'diff', iota_path)
+
+
########################################################################
#Run the tests
@@ -3426,6 +3492,7 @@ test_list = [ None,
diff_git_format_wc_wc,
diff_git_format_url_wc,
diff_git_format_url_url,
+ XFail(diff_prop_missing_context),
]
if __name__ == '__main__':