Author: rhuijben
Date: Thu Apr 18 17:27:42 2013
New Revision: 1469478

URL: http://svn.apache.org/r1469478
Log:
Add regression test for issue #4356.

* subversion/tests/cmdline/move_tests.py
  (move_missing): New function. Verifying current Windows behavior.
  (test_list): Add move_missing.

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

Modified: subversion/trunk/subversion/tests/cmdline/move_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/move_tests.py?rev=1469478&r1=1469477&r2=1469478&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/move_tests.py Thu Apr 18 17:27:42 
2013
@@ -1192,6 +1192,42 @@ value3>>>>>>> (incoming property value)
   svntest.actions.verify_disk(wc_dir, expected_disk, True)
 
 
+@Issue(4356)
+def move_missing(sbox):
+  "move a missing directory"
+
+  sbox.build(read_only=True)
+  wc_dir = sbox.wc_dir
+
+  svntest.main.safe_rmtree(sbox.ospath('A/D/G'))
+
+  expected_err = '.*Can\'t move \'.*G\' to \'.*R\':.*'
+
+  # This move currently fails halfway between adding the dest and
+  # deleting the source
+  svntest.actions.run_and_verify_svn(None, None, expected_err,
+                                     'mv', sbox.ospath('A/D/G'),
+                                           sbox.ospath('R'))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/D/G', 'A/D/G/tau', 'A/D/G/pi', 'A/D/G/rho',
+                        status='! ', entry_status='  ')
+
+  expected_status.add({
+    'R'                 : Item(status='! ', wc_rev='-',
+                               entry_status='A ', entry_copied='+'),
+    'R/pi'              : Item(status='! ', wc_rev='-',
+                               entry_status='  ', entry_copied='+'),
+    'R/tau'             : Item(status='! ', wc_rev='-',
+                               entry_status='  ', entry_copied='+'),
+    'R/rho'             : Item(status='! ', wc_rev='-',
+                               entry_status='  ', entry_copied='+'),
+  })
+
+  # Verify that the status processing doesn't crash
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
 #######################################################################
 # Run the tests
 
@@ -1202,6 +1238,7 @@ test_list = [ None,
               shallower_move_file_test,
               deeper_move_file_test,
               property_merge,
+              move_missing,
             ]
 
 if __name__ == '__main__':


Reply via email to