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 2012/09/26 13:15:17 UTC

svn commit: r1390404 - /subversion/trunk/subversion/tests/cmdline/stat_tests.py

Author: stsp
Date: Wed Sep 26 11:15:17 2012
New Revision: 1390404

URL: http://svn.apache.org/viewvc?rev=1390404&view=rev
Log:
* subversion/tests/cmdline/stat_tests.py
  (status_unversioned_dir): New test, which runs svn status on the root
   directory of the system (or current drive, on Windows), and expects
   a "not a working copy" error.
  (test_list): Add new test.

Suggested by: rhuijben

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

Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1390404&r1=1390403&r2=1390404&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Wed Sep 26 11:15:17 2012
@@ -2031,6 +2031,19 @@ def status_not_present(sbox):
                                      sbox.ospath('A/mu'),
                                      sbox.ospath('no-file'))
 
+# Skip this test is a .svn dir exists in the root directory
+@Skip(lambda: os.path.exists("/%s" % svntest.main.get_admin_name())) 
+def status_unversioned_dir(sbox):
+  "status on unversioned dir"
+  sbox.build(read_only = True, create_wc = False)
+
+  # Run svn status on "/", which we assume exists and isn't a WC.
+  # This should work on UNIX-like systems and Windows systems
+  expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
+                 "' is not a working copy"
+  svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
+                                      "status", "/")
+
 ########################################################################
 # Run the tests
 
@@ -2075,6 +2088,7 @@ test_list = [ None,
               wclock_status,
               modified_modulo_translation,
               status_not_present,
+              status_unversioned_dir,
              ]
 
 if __name__ == '__main__':