You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2009/12/23 18:12:42 UTC

svn commit: r893578 - /subversion/trunk/subversion/tests/cmdline/prop_tests.py

Author: julianfoad
Date: Wed Dec 23 17:12:41 2009
New Revision: 893578

URL: http://svn.apache.org/viewvc?rev=893578&view=rev
Log:
Add a test for a post-revprop-change hook that fails and sends back an error
message. This is XFAIL over RA-DAV because we deliberately include non-XML-
safe characters and mod_dav_svn fails to XML-encode it. See issue #3553.

* subversion/tests/cmdline/prop_tests.py
  (post_revprop_change_hook): New test.
  (test_list): Add the new test.

Modified:
    subversion/trunk/subversion/tests/cmdline/prop_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/prop_tests.py?rev=893578&r1=893577&r2=893578&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Wed Dec 23 17:12:41 2009
@@ -1703,6 +1703,30 @@
                                      'propdel', 'yellow',
                                      os.path.join(wc_dir, 'A', 'D', 'G'))
 
+#----------------------------------------------------------------------
+def post_revprop_change_hook(sbox):
+  "post-revprop-change hook"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  repo_dir = sbox.repo_dir
+
+  # Include a non-XML-safe message to regression-test issue #3553.
+  error_msg = 'Text with <angle brackets> & ampersand'
+
+  svntest.actions.enable_revprop_changes(repo_dir)
+  svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
+                                      error_msg)
+
+  expected_error = svntest.verify.ExpectedOutput([
+    "svn: " + svntest.actions.hook_failure_message('post-revprop-change'),
+    error_msg + "\n",
+  ], match_all = False)
+
+  svntest.actions.run_and_verify_svn(None, [], expected_error,
+                                     'ps', '--revprop', '-r0', 'p', 'v',
+                                     wc_dir)
+
 
 ########################################################################
 # Run the tests
@@ -1743,6 +1767,7 @@
               same_replacement_props,
               added_moved_file,
               delete_nonexistent_property,
+              XFail(post_revprop_change_hook, svntest.main.is_ra_type_dav),
              ]
 
 if __name__ == '__main__':