summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/helper/test-strcmp-offset.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rwxr-xr-xt/t0065-strcmp-offset.sh2
4 files changed, 5 insertions, 2 deletions
diff --git a/t/helper/test-strcmp-offset.c b/t/helper/test-strcmp-offset.c
index e159c9a127..44e4a6d143 100644
--- a/t/helper/test-strcmp-offset.c
+++ b/t/helper/test-strcmp-offset.c
@@ -1,6 +1,7 @@
+#include "test-tool.h"
#include "cache.h"
-int cmd_main(int argc, const char **argv)
+int cmd__strcmp_offset(int argc, const char **argv)
{
int result;
size_t offset;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index b2cecd594b..6acbf976d8 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -35,6 +35,7 @@ static struct test_cmd cmds[] = {
{ "sha1-array", cmd__sha1_array },
{ "sha1", cmd__sha1 },
{ "sigchain", cmd__sigchain },
+ { "strcmp-offset", cmd__strcmp_offset },
};
int cmd_main(int argc, const char **argv)
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 1d366846f3..035e82ec6a 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -29,5 +29,6 @@ int cmd__scrap_cache_tree(int argc, const char **argv);
int cmd__sha1_array(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
int cmd__sigchain(int argc, const char **argv);
+int cmd__strcmp_offset(int argc, const char **argv);
#endif
diff --git a/t/t0065-strcmp-offset.sh b/t/t0065-strcmp-offset.sh
index 7d6d21425f..91fa639c4a 100755
--- a/t/t0065-strcmp-offset.sh
+++ b/t/t0065-strcmp-offset.sh
@@ -8,7 +8,7 @@ while read s1 s2 expect
do
test_expect_success "strcmp_offset($s1, $s2)" '
echo "$expect" >expect &&
- test-strcmp-offset "$s1" "$s2" >actual &&
+ test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
'
done <<-EOF