Even a space in a file name makes "svn blame" fail. Here is an initial test.
- Julian
Add a first regression test for "svn blame".
* build.conf
(fs-test-scripts): Add the new test file "blame_tests.py".
* subversion/tests/clients/cmdline/blame_tests.py
New file.
Index: build.conf
===================================================================
--- build.conf (revision 7999)
+++ build.conf (working copy)
@@ -56,6 +56,7 @@
subversion/tests/clients/cmdline/stat_tests.py
subversion/tests/clients/cmdline/trans_tests.py
subversion/tests/clients/cmdline/autoprop_tests.py
+ subversion/tests/clients/cmdline/blame_tests.py
subversion/tests/clients/cmdline/svnadmin_tests.py
subversion/tests/clients/cmdline/svnlook_tests.py
subversion/tests/clients/cmdline/svnversion_tests.py
Index: subversion/tests/clients/cmdline/blame_tests.py
===================================================================
--- subversion/tests/clients/cmdline/blame_tests.py (revision 0)
+++ subversion/tests/clients/cmdline/blame_tests.py (revision 0)
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+#
+# blame_tests.py: testing line-by-line annotation.
+#
+# Subversion is a tool for revision control.
+# See http://subversion.tigris.org for more information.
+#
+# ====================================================================
+# Copyright (c) 2000-2003 CollabNet. All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://subversion.tigris.org/license-1.html.
+# If newer versions of this license are posted there, you may use a
+# newer version instead, at your option.
+#
+######################################################################
+
+# General modules
+import os
+
+# Our testing module
+import svntest
+
+
+# (abbreviation)
+Skip = svntest.testcase.Skip
+XFail = svntest.testcase.XFail
+Item = svntest.wc.StateItem
+
+
+######################################################################
+# Tests
+#
+# Each test must return on success or raise on failure.
+
+
+#----------------------------------------------------------------------
+
+def blame_space_in_name(sbox):
+ "annotate a file whose name contains a space"
+ sbox.build()
+
+ file_path = os.path.join(sbox.wc_dir, 'space in name')
+ svntest.main.file_append(file_path, "Hello\n")
+ svntest.main.run_svn(None, 'add', file_path)
+ svntest.main.run_svn(None, 'ci',
+ '--username', svntest.main.wc_author,
+ '--password', svntest.main.wc_passwd,
+ '-m', 'Property change', file_path)
+
+ svntest.main.run_svn(None, 'blame', file_path)
+
+
+########################################################################
+# Run the tests
+
+
+# list all tests here, starting with None:
+test_list = [ None,
+ blame_space_in_name
+ ]
+
+if __name__ == '__main__':
+ svntest.main.run_tests(test_list)
+ # NOTREACHED
+
+
+### End of file.
Property changes on: subversion/tests/clients/cmdline/blame_tests.py
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 14 18:46:57 2003