You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/06/03 18:12:38 UTC

svn commit: r1131086 - /subversion/trunk/subversion/tests/cmdline/info_tests.py

Author: rhuijben
Date: Fri Jun  3 16:12:38 2011
New Revision: 1131086

URL: http://svn.apache.org/viewvc?rev=1131086&view=rev
Log:
Add a test on the path value in 'svn info'. For the first level of children
and the root itself the path is the basename of the node. Below that it is the
full path below the root.

* subversion/tests/cmdline/info_tests.py
  (info_url_special_characters): Verify the repository root.
  (info_repos_root_url): New test. Verify several values for the repository
    root and a child.
  (test_list): Add new test.

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

Modified: subversion/trunk/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/info_tests.py?rev=1131086&r1=1131085&r2=1131086&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/info_tests.py Fri Jun  3 16:12:38 2011
@@ -321,7 +321,7 @@ def info_url_special_characters(sbox):
                   sbox.repo_url + '%2F' + 'A']
 
   expected = {'Path' : 'A',
-              'Repository Root' : '.*',
+              'Repository Root' : re.escape(sbox.repo_url),
               'Revision' : '1',
               'Node Kind' : 'dir',
              }
@@ -384,6 +384,34 @@ def info_multiple_targets(sbox):
   multiple_wc_targets()
   multiple_url_targets()
 
+def info_repos_root_url(sbox):
+  """verify values for repository root"""
+  sbox.build(create_wc = False)
+  wc_dir = sbox.wc_dir
+
+  expected_info = [
+    {
+        'Path'              : re.escape(os.path.basename(sbox.repo_dir)),
+        'Repository Root'   : re.escape(sbox.repo_url),
+        'URL'               : re.escape(sbox.repo_url),
+        'Revision'          : '1',
+        'Node Kind'         : 'directory',
+        'Last Changed Rev'  : '1',
+    },
+    {
+        'Path'              : 'iota',
+        'Name'              : 'iota',
+        'Repository Root'   : re.escape(sbox.repo_url),
+        'URL'               : re.escape(sbox.repo_url + '/iota'),
+        'Revision'          : '1',
+        'Node Kind'         : 'file',
+        'Last Changed Rev'  : '1',
+    }
+  ]
+
+  svntest.actions.run_and_verify_info(expected_info, sbox.repo_url,
+                                      '--depth', 'files')
+
 ########################################################################
 # Run the tests
 
@@ -395,6 +423,7 @@ test_list = [ None,
               info_wcroot_abspaths,
               info_url_special_characters,
               info_multiple_targets,
+              info_repos_root_url,
              ]
 
 if __name__ == '__main__':