Author: philip
Date: Mon Apr 16 15:04:50 2012
New Revision: 1326639
URL: http://svn.apache.org/viewvc?rev=1326639&view=rev
Log:
* subversion/tests/libsvn_wc/op-depth-test.c
(test_scan_delete): New XFAIL test.
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=1326639&r1=1326638&r2=1326639&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Mon Apr 16
15:04:50 2012
@@ -4576,6 +4576,78 @@ move_update(const svn_test_opts_t *opts,
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_scan_delete(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ const char *moved_to_abspath, *moved_to_op_root_abspath;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "scan_delete", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_mkdir(&b, "A2"));
+ SVN_ERR(wc_mkdir(&b, "A2/B"));
+ SVN_ERR(wc_mkdir(&b, "C2"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A2", "X"));
+ SVN_ERR(wc_delete(&b, "X/B"));
+ SVN_ERR(wc_move(&b, "A/B", "X/B"));
+ SVN_ERR(wc_move(&b, "X/B/C", "Y"));
+ SVN_ERR(wc_move(&b, "C2", "X/B/C"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0, "A2", "normal", 1, "A2"},
+ {0, "A2/B", "normal", 1, "A2/B"},
+ {0, "C2", "normal", 1, "C2"},
+ {1, "A2", "base-deleted", NO_COPY_FROM, "X"},
+ {1, "A2/B", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A2", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A2/B", MOVED_HERE},
+ {2, "A/B", "base-deleted", NO_COPY_FROM, "X/B"},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {2, "X/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {1, "Y", "normal", 1, "A/B/C", MOVED_HERE},
+ {1, "C2", "base-deleted", NO_COPY_FROM, "X/B/C"},
+ {3, "X/B/C", "normal", 1, "C2", FALSE, "Y", TRUE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+ NULL, &moved_to_op_root_abspath,
+ b.wc_ctx->db, wc_path(&b, "C2"),
+ pool, pool));
+ SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B/C"));
+ SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B/C"));
+
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+ NULL, &moved_to_op_root_abspath,
+ b.wc_ctx->db, wc_path(&b, "A/B"),
+ pool, pool));
+ SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B"));
+ SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B"));
+
+ /* XFAIL here as it gives moved-to X/Y/Z rather than Y. */
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+ NULL, &moved_to_op_root_abspath,
+ b.wc_ctx->db, wc_path(&b, "A/B/C"),
+ pool, pool));
+ SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "Y"));
+ SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "Y"));
+
+ return SVN_NO_ERROR;
+}
/* ---------------------------------------------------------------------- */
@@ -4668,5 +4740,7 @@ struct svn_test_descriptor_t test_funcs[
"move_added"),
SVN_TEST_OPTS_XFAIL(move_update,
"move_update"),
+ SVN_TEST_OPTS_XFAIL(test_scan_delete,
+ "scan_delete"),
SVN_TEST_NULL
};