Author: rhuijben
Date: Mon Jan 26 14:17:25 2015
New Revision: 1654810

URL: http://svn.apache.org/r1654810
Log:
Following up on r1654794, add a related test that verifies the author value
retrieved with the stat ra functions.

* subversion/tests/cmdline/prop_tests.py
  (xml_unsafe_author2): New test.
  (test_list): Add xml_unsafe_author2.

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=1654810&r1=1654809&r2=1654810&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Mon Jan 26 14:17:25 
2015
@@ -2669,6 +2669,46 @@ def xml_unsafe_author(sbox):
                                      'proplist', '--revprop', '-r', '1', '-v',
                                      wc_dir)
 
+@Issue(4415)
+def xml_unsafe_author2(sbox):
+  "svn:author with XML unsafe chars 2"
+
+  sbox.build(create_wc = False)
+  repo_url = sbox.repo_url
+
+  svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+  # client sends svn:author (via PROPPATCH for DAV)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', '--revprop', '-r', '1',
+                                     'svn:author', 'foo\bbar', repo_url)
+
+  # Ensure a stable date
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', '--revprop', '-r', '1',
+                                     'svn:date', '2000-01-01T12:00:00.0Z',
+                                     repo_url)
+
+  if svntest.main.is_ra_type_dav():
+    # This receives the filtered author (but that is better than an Xml fail)
+    expected_author = 'foobar'
+  else:
+    expected_author = 'foo\bbar'
+
+  expected_output = svntest.verify.UnorderedOutput([
+    '      1 %-8s              Jan 01  2000 ./\n' % expected_author,
+    '      1 %-8s              Jan 01  2000 A/\n' % expected_author,
+    '      1 %-8s           25 Jan 01  2000 iota\n' % expected_author
+  ])
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'ls', '-v', repo_url)
+
+  expected_info = [{
+      'Repository Root' : sbox.repo_url,
+      'Last Changed Author' : expected_author,
+  }]
+  svntest.actions.run_and_verify_info(expected_info, repo_url)
+
 def dir_prop_conflict_details(sbox):
   "verify dir property conflict details"
 
@@ -2821,6 +2861,7 @@ test_list = [ None,
               almost_known_prop_names,
               peg_rev_base_working,
               xml_unsafe_author,
+              xml_unsafe_author2,
               dir_prop_conflict_details,
               iprops_list_abspath,
               wc_propop_on_url,


Reply via email to