t/helper: merge test-example-decorate into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8133061e69
commit
dbceb3ecc5
2
Makefile
2
Makefile
@ -660,12 +660,12 @@ TEST_BUILTINS_OBJS += test-delta.o
|
|||||||
TEST_BUILTINS_OBJS += test-drop-caches.o
|
TEST_BUILTINS_OBJS += test-drop-caches.o
|
||||||
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
|
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
|
||||||
TEST_BUILTINS_OBJS += test-dump-split-index.o
|
TEST_BUILTINS_OBJS += test-dump-split-index.o
|
||||||
|
TEST_BUILTINS_OBJS += test-example-decorate.o
|
||||||
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
|
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
|
||||||
TEST_BUILTINS_OBJS += test-sha1.o
|
TEST_BUILTINS_OBJS += test-sha1.o
|
||||||
|
|
||||||
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
|
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
|
||||||
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
|
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
|
||||||
TEST_PROGRAMS_NEED_X += test-example-decorate
|
|
||||||
TEST_PROGRAMS_NEED_X += test-fake-ssh
|
TEST_PROGRAMS_NEED_X += test-fake-ssh
|
||||||
TEST_PROGRAMS_NEED_X += test-genrandom
|
TEST_PROGRAMS_NEED_X += test-genrandom
|
||||||
TEST_PROGRAMS_NEED_X += test-hashmap
|
TEST_PROGRAMS_NEED_X += test-hashmap
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
#include "test-tool.h"
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "decorate.h"
|
#include "decorate.h"
|
||||||
|
|
||||||
int cmd_main(int argc, const char **argv)
|
int cmd__example_decorate(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
struct decoration n;
|
struct decoration n;
|
||||||
struct object_id one_oid = { {1} };
|
struct object_id one_oid = { {1} };
|
||||||
|
@ -15,6 +15,7 @@ static struct test_cmd cmds[] = {
|
|||||||
{ "drop-caches", cmd__drop_caches },
|
{ "drop-caches", cmd__drop_caches },
|
||||||
{ "dump-cache-tree", cmd__dump_cache_tree },
|
{ "dump-cache-tree", cmd__dump_cache_tree },
|
||||||
{ "dump-split-index", cmd__dump_split_index },
|
{ "dump-split-index", cmd__dump_split_index },
|
||||||
|
{ "example-decorate", cmd__example_decorate },
|
||||||
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
|
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
|
||||||
{ "sha1", cmd__sha1 },
|
{ "sha1", cmd__sha1 },
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,7 @@ int cmd__delta(int argc, const char **argv);
|
|||||||
int cmd__drop_caches(int argc, const char **argv);
|
int cmd__drop_caches(int argc, const char **argv);
|
||||||
int cmd__dump_cache_tree(int argc, const char **argv);
|
int cmd__dump_cache_tree(int argc, const char **argv);
|
||||||
int cmd__dump_split_index(int argc, const char **argv);
|
int cmd__dump_split_index(int argc, const char **argv);
|
||||||
|
int cmd__example_decorate(int argc, const char **argv);
|
||||||
int cmd__lazy_init_name_hash(int argc, const char **argv);
|
int cmd__lazy_init_name_hash(int argc, const char **argv);
|
||||||
int cmd__sha1(int argc, const char **argv);
|
int cmd__sha1(int argc, const char **argv);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ test_description='check that example code compiles and runs'
|
|||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
test_expect_success 'decorate' '
|
test_expect_success 'decorate' '
|
||||||
test-example-decorate
|
test-tool example-decorate
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user