subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1655373 - /subversion/trunk/subversion/tests/cmdline/blame_tests.py
Date Wed, 28 Jan 2015 16:00:20 GMT
Author: rhuijben
Date: Wed Jan 28 16:00:20 2015
New Revision: 1655373

URL: http://svn.apache.org/r1655373
Log:
* subversion/tests/cmdline/blame_tests.py
  (blame_multiple_targets): Simplify test and reinstante old purpose of
    checking the internal error codes.

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

Modified: subversion/trunk/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/blame_tests.py?rev=1655373&r1=1655372&r2=1655373&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/blame_tests.py Wed Jan 28 16:00:20 2015
@@ -819,53 +819,33 @@ def blame_multiple_targets(sbox):
   sbox.build()
 
   # First, make a new revision of iota.
-  iota = os.path.join(sbox.wc_dir, 'iota')
-  svntest.main.file_append(iota, "New contents for iota\n")
-  svntest.main.run_svn(None, 'ci', '-m', '', iota)
+  sbox.simple_append('iota', "New contents for iota\n")
+  sbox.simple_commit()
+  iota = sbox.ospath('iota')
 
   expected_output = [
     "     1    jrandom This is the file 'iota'.\n",
     "     2    jrandom New contents for iota\n",
     ]
 
-  def multiple_wc_targets():
-    "multiple wc targets"
+  # We use --force to avoid an early bail from the current blame code,
+  # that performs a property check before the actual blame.
 
-    non_existent = os.path.join(sbox.wc_dir, 'non-existent')
+  non_existent = os.path.join(sbox.wc_dir, 'non-existent')
+  svntest.actions.run_and_verify_svn(None, None,
+                                     ".*W155010: The node.*non-existent'.*",
+                                     'blame', non_existent, iota,
+                                     '--force')
+
+  iota_url = sbox.repo_url + '/iota'
+  non_existent_url = sbox.repo_url + '/non-existent'
+
+  # SVN_ERR_FS_NOT_FILE | SVN_ERR_FS_NOT_FOUND
+  svntest.actions.run_and_verify_svn(None, None,
+                                     ".*W1600(13|17): '.*non-existent' .*not",
+                                     'blame', non_existent_url, iota_url,
+                                     '--force')
 
-    expected_err = ".*W155010.*\n.*E200009.*"
-    expected_err_re = re.compile(expected_err, re.DOTALL)
-
-    exit_code, output, error = svntest.main.run_svn(1, 'blame',
-                                                    non_existent, iota)
-
-    # Verify error
-    if not expected_err_re.match("".join(error)):
-      raise svntest.Failure('blame failed: expected error "%s", but received '
-                            '"%s"' % (expected_err, "".join(error)))
-    svntest.verify.verify_outputs(None, output, None, expected_output, None)
-
-  def multiple_url_targets():
-    "multiple url targets"
-
-    iota_url = sbox.repo_url + '/iota'
-    non_existent = sbox.repo_url + '/non-existent'
-
-    expected_err = ".*(W160017|W160013|W150000).*\n.*E200009.*"
-    expected_err_re = re.compile(expected_err, re.DOTALL)
-
-    exit_code, output, error = svntest.main.run_svn(1, 'blame',
-                                                    non_existent, iota_url)
-
-    # Verify error
-    if not expected_err_re.match("".join(error)):
-      raise svntest.Failure('blame failed: expected error "%s", but received '
-                            '"%s"' % (expected_err, "".join(error)))
-    svntest.verify.verify_outputs(None, output, None, expected_output, None)
-
-  # Test one by one
-  multiple_wc_targets()
-  multiple_url_targets()
 
 @Issue(4034)
 def blame_eol_handling(sbox):



Mime
View raw message