subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1665321 - /subversion/trunk/subversion/tests/libsvn_ra/ra-test.c
Date Mon, 09 Mar 2015 18:48:35 GMT
Author: rhuijben
Date: Mon Mar  9 18:48:35 2015
New Revision: 1665321

URL: http://svn.apache.org/r1665321
Log:
* subversion/tests/libsvn_ra/ra-test.c
  (ra_revision_errors): Add a few more lock/unlock behavior tests.

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=1665321&r1=1665320&r2=1665321&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Mon Mar  9 18:48:35 2015
@@ -1177,10 +1177,34 @@ ra_revision_errors(const svn_test_opts_t
     svn_hash_sets(locks, "A", &rev);
     rev = SVN_INVALID_REVNUM;
     SVN_ERR(svn_ra_lock(ra_session, locks, "comment", FALSE,
-                         store_lock_result, &lr, pool));
+                        store_lock_result, &lr, pool));
     SVN_TEST_ASSERT(lr.result_code == SVN_ERR_FS_NOT_FILE);
   }
 
+  {
+    apr_hash_t *locks = apr_hash_make(pool);
+    struct lock_stub_baton_t lr = {0};
+
+    svn_hash_sets(locks, "A/iota", "no-token");
+
+    SVN_ERR(svn_ra_unlock(ra_session, locks, FALSE,
+                          store_lock_result, &lr, pool));
+    SVN_TEST_ASSERT(lr.result_code == SVN_ERR_FS_NO_SUCH_LOCK);
+
+
+    svn_hash_sets(locks, "A/iota", NULL);
+    svn_hash_sets(locks, "A", "no-token");
+    SVN_ERR(svn_ra_unlock(ra_session, locks, FALSE,
+                          store_lock_result, &lr, pool));
+    SVN_TEST_ASSERT(lr.result_code == SVN_ERR_FS_NO_SUCH_LOCK);
+  }
+
+  {
+    svn_lock_t *lock;
+    SVN_ERR(svn_ra_get_lock(ra_session, &lock, "A", pool));
+    SVN_TEST_ASSERT(lock == NULL);
+  }
+
   return SVN_NO_ERROR;
 }
 



Mime
View raw message