You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/08/02 16:56:02 UTC

svn commit: r981538 - /subversion/trunk/subversion/tests/cmdline/input_validation_tests.py

Author: stsp
Date: Mon Aug  2 14:56:02 2010
New Revision: 981538

URL: http://svn.apache.org/viewvc?rev=981538&view=rev
Log:
* subversion/tests/cmdline/input_validation_tests.py
  (invalid_copy_sources, invalid_copy_target): New tests, verifying that
   svn copy rejects invalid sources and targets.

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

Modified: subversion/trunk/subversion/tests/cmdline/input_validation_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/input_validation_tests.py?rev=981538&r1=981537&r2=981538&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/input_validation_tests.py Mon Aug  2 14:56:02 2010
@@ -90,6 +90,22 @@ def invalid_wcpath_commit(sbox):
     run_and_verify_svn_in_wc(sbox, "svn: '.*' is a URL, but URLs cannot be " +
                              "commit targets", 'commit', target)
 
+def invalid_copy_sources(sbox):
+  "invalid sources for 'copy'"
+  sbox.build(read_only=True)
+  for (src1, src2) in [("iota", "^/"), ("^/", "iota"), ("file://", "iota")]:
+    run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working " +
+                             "copy sources", 'copy', src1, src2, "A")
+
+def invalid_copy_target(sbox):
+  "invalid target for 'copy'"
+  sbox.build(read_only=True)
+  mu_path = os.path.join('A', 'mu')
+  C_path = os.path.join('A', 'C')
+  run_and_verify_svn_in_wc(sbox, "svn: Path '.*' is not a directory",
+                           'copy', mu_path, C_path, "iota")
+
+
 ########################################################################
 # Run the tests
 
@@ -99,6 +115,8 @@ test_list = [ None,
               invalid_wcpath_changelist,
               invalid_wcpath_cleanup,
               invalid_wcpath_commit,
+              invalid_copy_sources,
+              invalid_copy_target,
              ]
 
 if __name__ == '__main__':