subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1073827 - /subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
Date Wed, 23 Feb 2011 17:02:57 GMT
Author: philip
Date: Wed Feb 23 17:02:56 2011
New Revision: 1073827

URL: http://svn.apache.org/viewvc?rev=1073827&view=rev
Log:
* subversion/tests/libsvn_wc/op-depth-test.c
  (test_op_revert): Add more cases, revert delete of child of copied tree.

Modified:
    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c

Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1073827&r1=1073826&r2=1073827&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Wed Feb 23 17:02:56 2011
@@ -2201,6 +2201,54 @@ test_op_revert(const svn_test_opts_t *op
 
   {
     nodes_row_t before[] = {
+      { 0, "",    "normal", 4, "" },
+      { 1, "A",   "normal", 2, "X" },
+      { 1, "A/B", "normal", 2, "X/B" },
+      { 2, "A/B", "base-deleted", NO_COPY_FROM },
+      { 0 },
+    };
+    nodes_row_t after[] = {
+      { 0, "",    "normal", 4, "" },
+      { 1, "A",   "normal", 2, "X" },
+      { 1, "A/B", "normal", 2, "X/B" },
+      { 0 },
+    };
+    const char *before_actual[] = { "A", "A/B", NULL };
+    const char *after_actual[] = {"A", NULL };
+    SVN_ERR(revert(&b, "A/B", svn_depth_empty,
+                   before, after, NULL, NULL));
+    SVN_ERR(revert(&b, "A/B", svn_depth_empty,
+                   before, after, before_actual, after_actual));
+  }
+
+  {
+    nodes_row_t before[] = {
+      { 0, "",    "normal", 4, "" },
+      { 0, "A",   "normal", 4, "A" },
+      { 0, "A/B", "normal", 4, "A/B" },
+      { 1, "A",   "normal", 2, "X" },
+      { 1, "A/B", "normal", 2, "X/B" },
+      { 2, "A/B", "base-deleted", NO_COPY_FROM },
+      { 0 },
+    };
+    nodes_row_t after[] = {
+      { 0, "",    "normal", 4, "" },
+      { 0, "A",   "normal", 4, "A" },
+      { 0, "A/B", "normal", 4, "A/B" },
+      { 1, "A",   "normal", 2, "X" },
+      { 1, "A/B", "normal", 2, "X/B" },
+      { 0 },
+    };
+    const char *before_actual[] = { "A", "A/B", NULL };
+    const char *after_actual[] = {"A", NULL };
+    SVN_ERR(revert(&b, "A/B", svn_depth_empty,
+                   before, after, NULL, NULL));
+    SVN_ERR(revert(&b, "A/B", svn_depth_empty,
+                   before, after, before_actual, after_actual));
+  }
+
+  {
+    nodes_row_t before[] = {
       { 0, "",        "normal", 4, "" },
       { 0, "A",       "normal", 4, "A" },
       { 0, "A/B",     "normal", 4, "A/B" },
@@ -2349,6 +2397,43 @@ test_op_revert(const svn_test_opts_t *op
     svn_error_clear(err);
   }
 
+  {
+    nodes_row_t before[] = {
+      { 0, "",      "normal", 4, "" },
+      { 0, "A",     "normal", 4, "A" },
+      { 0, "A/B",   "normal", 4, "A/B" },
+      { 1, "A",     "normal", 2, "X" },
+      { 1, "A/B",   "normal", 2, "X/B" },
+      { 1, "A/B/C", "normal", 2, "X/B/C" },
+      { 2, "A/B",   "base-deleted", NO_COPY_FROM },
+      { 2, "A/B/C", "base-deleted", NO_COPY_FROM },
+      { 0 },
+    };
+    nodes_row_t after1[] = {
+      { 0, "",      "normal", 4, "" },
+      { 0, "A",     "normal", 4, "A" },
+      { 0, "A/B",   "normal", 4, "A/B" },
+      { 1, "A",     "normal", 2, "X" },
+      { 1, "A/B",   "normal", 2, "X/B" },
+      { 1, "A/B/C", "normal", 2, "X/B/C" },
+      { 3, "A/B/C", "base-deleted", NO_COPY_FROM },
+      { 0 },
+    };
+    nodes_row_t after2[] = {
+      { 0, "",      "normal", 4, "" },
+      { 0, "A",     "normal", 4, "A" },
+      { 0, "A/B",   "normal", 4, "A/B" },
+      { 1, "A",     "normal", 2, "X" },
+      { 1, "A/B",   "normal", 2, "X/B" },
+      { 1, "A/B/C", "normal", 2, "X/B/C" },
+      { 0 },
+    };
+    SVN_ERR(revert(&b, "A/B", svn_depth_empty,
+                   before, after1, NULL, NULL));
+    SVN_ERR(revert(&b, "A/B", svn_depth_infinity,
+                   before, after2, NULL, NULL));
+  }
+
   return SVN_NO_ERROR;
 }
 



Mime
View raw message