You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/01/18 18:08:03 UTC
svn commit: r900461 - /subversion/trunk/subversion/tests/cmdline/cat_tests.py
Author: pburba
Date: Mon Jan 18 17:08:03 2010
New Revision: 900461
URL: http://svn.apache.org/viewvc?rev=900461&view=rev
Log:
Add a test for issue #3560 'svn_wc_status3() returns incorrect status for
unversioned files'.
* subversion/tests/cmdline/cat_tests.py
(cat_unversioned_file): New.
(test_list): Add 'cat_unversioned_file' as XFailing test.
Modified:
subversion/trunk/subversion/tests/cmdline/cat_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/cat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/cat_tests.py?rev=900461&r1=900460&r2=900461&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/cat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/cat_tests.py Mon Jan 18 17:08:03 2010
@@ -146,6 +146,33 @@
'cat', rho_path, G_path, new_file_path)
+# Test for issue #3560 'svn_wc_status3() returns incorrect status for
+# unversioned files'.
+def cat_unversioned_file(sbox):
+ "cat an unversioned file parent dir thinks exists"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ iota_path = os.path.join(wc_dir, 'iota')
+
+ # Delete a file an commit the deletion.
+ svntest.actions.run_and_verify_svn2(None, None, [], 0,
+ 'delete', iota_path)
+ svntest.actions.run_and_verify_svn2(None, None, [], 0,
+ 'commit', '-m', 'delete a file',
+ iota_path)
+
+ # Now try to cat the deleted file, it should be reported as unversioned.
+ expected_error = ["svn: warning: '" + iota_path + "'"
+ + " is not under version control\n"]
+ svntest.actions.run_and_verify_svn2(None, [], expected_error, 0,
+ 'cat', iota_path)
+
+ # Put an unversioned file at 'iota' and try to cat it again, the result
+ # should still be the same.
+ svntest.main.file_write(iota_path, "This the unversioned file 'iota'.\n")
+ svntest.actions.run_and_verify_svn2(None, [], expected_error, 0,
+ 'cat', iota_path)
+
########################################################################
# Run the tests
@@ -157,6 +184,7 @@
cat_base,
cat_nonexistent_file,
cat_skip_uncattable,
+ XFail(cat_unversioned_file),
]
if __name__ == '__main__':