TEST_BUILTINS_OBJS += test-regex.o
TEST_BUILTINS_OBJS += test-revision-walking.o
TEST_BUILTINS_OBJS += test-run-command.o
+TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
-TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
TEST_PROGRAMS_NEED_X += test-sha1-array
TEST_PROGRAMS_NEED_X += test-sigchain
TEST_PROGRAMS_NEED_X += test-strcmp-offset
+#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"
#include "tree.h"
static struct lock_file index_lock;
-int cmd_main(int ac, const char **av)
+int cmd__scrap_cache_tree(int ac, const char **av)
{
setup_git_directory();
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
{ "regex", cmd__regex },
{ "revision-walking", cmd__revision_walking },
{ "run-command", cmd__run_command },
+ { "scrap-cache-tree", cmd__scrap_cache_tree },
{ "sha1", cmd__sha1 },
};
int cmd__regex(int argc, const char **argv);
int cmd__revision_walking(int argc, const char **argv);
int cmd__run_command(int argc, const char **argv);
+int cmd__scrap_cache_tree(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
#endif
'
test_expect_success 'write-tree establishes cache-tree' '
- test-scrap-cache-tree &&
+ test-tool scrap-cache-tree &&
git write-tree &&
test_cache_tree
'
-test_expect_success 'test-scrap-cache-tree works' '
+test_expect_success 'test-tool scrap-cache-tree works' '
git read-tree HEAD &&
- test-scrap-cache-tree &&
+ test-tool scrap-cache-tree &&
test_no_cache_tree
'
'
test_expect_success 'reset --hard gives cache-tree' '
- test-scrap-cache-tree &&
+ test-tool scrap-cache-tree &&
git reset --hard &&
test_cache_tree
'