You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/11/04 03:20:15 UTC

svn commit: r1845702 - in /subversion/trunk/subversion/tests/cmdline: basic_tests.py pegrev_parse_tests.py

Author: brane
Date: Sun Nov  4 03:20:15 2018
New Revision: 1845702

URL: http://svn.apache.org/viewvc?rev=1845702&view=rev
Log:
Move tests for issue #4530 to a new file.

[In subversion/tests/cmdline]
* basic_tests.py
  (do_move_with_at_signs,
   move_to_target_with_leading_at_sign,
   move_to_target_with_leading_and_trailing_at_sign): Move from here.
* pegrev_parse_tests.py: New file.
  (do_move_with_at_signs,
   move_to_target_with_leading_at_sign,
   move_to_target_with_leading_and_trailing_at_sign): Move to here.

Added:
    subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py   (with props)
Modified:
    subversion/trunk/subversion/tests/cmdline/basic_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1845702&r1=1845701&r2=1845702&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Sun Nov  4 03:20:15 2018
@@ -3050,33 +3050,6 @@ def peg_rev_on_non_existent_wc_path(sbox
                                      'cat', '-r2', sbox.ospath('mu3') + '@3')
 
 
-def do_move_with_at_signs(sbox, src, dst, dst_cmdline):
-  sbox.build()
-
-  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
-  expected_status.tweak(src, status='D ', moved_to=dst)
-  expected_status.add({dst: Item(status='A ', copied='+',
-                                 moved_from=src, wc_rev='-')})
-
-  sbox.simple_move(src, dst_cmdline)
-  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
-
-@Issue(4530)
-@XFail()
-def move_to_target_with_leading_at_sign(sbox):
-  "rename to dir/@file"
-
-  do_move_with_at_signs(sbox, 'iota', 'A/@upsilon', 'A/@upsilon')
-
-
-@Issue(4530)
-@XFail()
-def move_to_target_with_leading_and_trailing_at_sign(sbox):
-  "rename to dir/@file@"
-
-  do_move_with_at_signs(sbox, 'iota', 'A/@upsilon', 'A/@upsilon@')
-
-
 @Issue(4532)
 def diff_previous_revision_of_r0(sbox):
   """diff -rPREV on WC at revision 0"""
@@ -3338,8 +3311,6 @@ test_list = [ None,
               rm_missing_with_case_clashing_ondisk_item,
               delete_conflicts_one_of_many,
               peg_rev_on_non_existent_wc_path,
-              move_to_target_with_leading_at_sign,
-              move_to_target_with_leading_and_trailing_at_sign,
               diff_previous_revision_of_r0,
               mkdir_parents_target_exists_on_disk,
               plaintext_password_storage_disabled,

Added: subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py?rev=1845702&view=auto
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py (added)
+++ subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py Sun Nov  4 03:20:15 2018
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+#
+#  basic_tests.py:  testing working-copy interactions with ra_local
+#
+#  Subversion is a tool for revision control.
+#  See http://subversion.apache.org for more information.
+#
+# ====================================================================
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements.  See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership.  The ASF licenses this file
+#    to you under the Apache License, Version 2.0 (the
+#    "License"); you may not use this file except in compliance
+#    with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing,
+#    software distributed under the License is distributed on an
+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#    KIND, either express or implied.  See the License for the
+#    specific language governing permissions and limitations
+#    under the License.
+######################################################################
+
+# General modules
+import shutil, stat, re, os, logging
+
+logger = logging.getLogger()
+
+# Our testing module
+import svntest
+from svntest import wc
+
+# (abbreviation)
+Skip = svntest.testcase.Skip_deco
+SkipUnless = svntest.testcase.SkipUnless_deco
+XFail = svntest.testcase.XFail_deco
+Issues = svntest.testcase.Issues_deco
+Issue = svntest.testcase.Issue_deco
+Wimp = svntest.testcase.Wimp_deco
+Item = wc.StateItem
+
+######################################################################
+# Helper functions
+
+def do_move_with_at_signs(sbox, src, dst, dst_cmdline):
+  sbox.build()
+
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+  expected_status.tweak(src, status='D ', moved_to=dst)
+  expected_status.add({dst: Item(status='A ', copied='+',
+                                 moved_from=src, wc_rev='-')})
+
+  sbox.simple_move(src, dst_cmdline)
+  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+
+######################################################################
+# Tests
+#
+#   Each test must return on success or raise on failure.
+
+@XFail()
+@Issue(4530)
+def move_to_target_with_leading_at_sign(sbox):
+  "rename to dir/@file"
+
+  do_move_with_at_signs(sbox, 'iota', 'A/@upsilon', 'A/@upsilon')
+
+
+@XFail()
+@Issue(4530)
+def move_to_target_with_leading_and_trailing_at_sign(sbox):
+  "rename to dir/@file@"
+
+  do_move_with_at_signs(sbox, 'iota', 'A/@upsilon', 'A/@upsilon@')
+
+
+########################################################################
+# Run the tests
+
+# list all tests here, starting with None:
+test_list = [ None,
+              move_to_target_with_leading_at_sign,
+              move_to_target_with_leading_and_trailing_at_sign,
+             ]
+
+if __name__ == '__main__':
+  svntest.main.run_tests(test_list)
+  # NOTREACHED
+
+
+### End of file.

Propchange: subversion/trunk/subversion/tests/cmdline/pegrev_parse_tests.py
------------------------------------------------------------------------------
    svn:eol-style = native