Skip to content

Commit dbceb3e

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-example-decorate into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8133061 commit dbceb3e

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,12 +660,12 @@ TEST_BUILTINS_OBJS += test-delta.o
660660
TEST_BUILTINS_OBJS += test-drop-caches.o
661661
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
662662
TEST_BUILTINS_OBJS += test-dump-split-index.o
663+
TEST_BUILTINS_OBJS += test-example-decorate.o
663664
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
664665
TEST_BUILTINS_OBJS += test-sha1.o
665666

666667
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
667668
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
668-
TEST_PROGRAMS_NEED_X += test-example-decorate
669669
TEST_PROGRAMS_NEED_X += test-fake-ssh
670670
TEST_PROGRAMS_NEED_X += test-genrandom
671671
TEST_PROGRAMS_NEED_X += test-hashmap

t/helper/test-example-decorate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
#include "test-tool.h"
12
#include "cache.h"
23
#include "object.h"
34
#include "decorate.h"
45

5-
int cmd_main(int argc, const char **argv)
6+
int cmd__example_decorate(int argc, const char **argv)
67
{
78
struct decoration n;
89
struct object_id one_oid = { {1} };

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ static struct test_cmd cmds[] = {
1515
{ "drop-caches", cmd__drop_caches },
1616
{ "dump-cache-tree", cmd__dump_cache_tree },
1717
{ "dump-split-index", cmd__dump_split_index },
18+
{ "example-decorate", cmd__example_decorate },
1819
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
1920
{ "sha1", cmd__sha1 },
2021
};

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ int cmd__delta(int argc, const char **argv);
99
int cmd__drop_caches(int argc, const char **argv);
1010
int cmd__dump_cache_tree(int argc, const char **argv);
1111
int cmd__dump_split_index(int argc, const char **argv);
12+
int cmd__example_decorate(int argc, const char **argv);
1213
int cmd__lazy_init_name_hash(int argc, const char **argv);
1314
int cmd__sha1(int argc, const char **argv);
1415

t/t9004-example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='check that example code compiles and runs'
44
. ./test-lib.sh
55

66
test_expect_success 'decorate' '
7-
test-example-decorate
7+
test-tool example-decorate
88
'
99

1010
test_done

0 commit comments

Comments
 (0)