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 2015/03/10 12:32:16 UTC

svn commit: r1665481 - /subversion/trunk/subversion/tests/libsvn_ra/ra-test.c

Author: rhuijben
Date: Tue Mar 10 11:32:15 2015
New Revision: 1665481

URL: http://svn.apache.org/r1665481
Log:
Following up on r1665480, add regression test for the issues
resolved in this patch.

* subversion/tests/libsvn_ra/ra-test.c
  (replay_range_rev_start,
   replay_range_rev_end): New functions.
  (ra_revision_errors): Add test on svn_ra_replay_range().

Modified:
    subversion/trunk/subversion/tests/libsvn_ra/ra-test.c

Modified: subversion/trunk/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_ra/ra-test.c?rev=1665481&r1=1665480&r2=1665481&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Tue Mar 10 11:32:15 2015
@@ -811,6 +811,30 @@ store_lock_result(void *baton,
 }
 
 static svn_error_t *
+replay_range_rev_start(svn_revnum_t revision,
+                       void *replay_baton,
+                       const svn_delta_editor_t **editor,
+                       void **edit_baton,
+                       apr_hash_t *rev_props,
+                       apr_pool_t *pool)
+{
+  *editor = svn_delta_default_editor(pool);
+  *edit_baton = NULL;
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+replay_range_rev_end(svn_revnum_t revision,
+                     void *replay_baton,
+                     const svn_delta_editor_t *editor,
+                     void *edit_baton,
+                     apr_hash_t *rev_props,
+                     apr_pool_t *pool)
+{
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 ra_revision_errors(const svn_test_opts_t *opts,
                    apr_pool_t *pool)
 {
@@ -1225,7 +1249,24 @@ ra_revision_errors(const svn_test_opts_t
                           svn_delta_default_editor(pool), NULL,
                           pool));
   }
-  /* ### TODO: Replay range */
+
+  {
+    SVN_TEST_ASSERT_ERROR(svn_ra_replay_range(ra_session, 1, 2, 0,
+                                              TRUE,
+                                              replay_range_rev_start,
+                                              replay_range_rev_end, NULL,
+                                              pool),
+                          SVN_ERR_FS_NO_SUCH_REVISION);
+
+    SVN_DBG(("Pre-final"));
+    /* Simply assumes everything is there*/
+    SVN_TEST_ASSERT_ERROR(svn_ra_replay_range(ra_session, 2, 2, 0,
+                                              TRUE,
+                                              replay_range_rev_start,
+                                              replay_range_rev_end, NULL,
+                                              pool),
+                          SVN_ERR_FS_NO_SUCH_REVISION);
+  }
 
   {
     svn_revnum_t del_rev;