Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-strcmp-offset into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:59 +0000
(08:44 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000
(08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-strcmp-offset.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t0065-strcmp-offset.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e154a6f
)
diff --git
a/Makefile
b/Makefile
index 51de8882d06b2bb6ade335c5e321a984f9fdf15a..528a80b6a61e441ca85b2dcb4bebc09e3c2da62a 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-680,6
+680,7
@@
TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
TEST_BUILTINS_OBJS += test-sha1-array.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_BUILTINS_OBJS += test-sigchain.o
TEST_BUILTINS_OBJS += test-sha1-array.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_BUILTINS_OBJS += test-sigchain.o
+TEST_BUILTINS_OBJS += test-strcmp-offset.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@
-687,7
+688,6
@@
TEST_PROGRAMS_NEED_X += test-fake-ssh
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-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
-TEST_PROGRAMS_NEED_X += test-strcmp-offset
TEST_PROGRAMS_NEED_X += test-string-list
TEST_PROGRAMS_NEED_X += test-submodule-config
TEST_PROGRAMS_NEED_X += test-subprocess
TEST_PROGRAMS_NEED_X += test-string-list
TEST_PROGRAMS_NEED_X += test-submodule-config
TEST_PROGRAMS_NEED_X += test-subprocess
diff --git
a/t/helper/test-strcmp-offset.c
b/t/helper/test-strcmp-offset.c
index e159c9a127f6854541ab497c8fd4b6efb9d4ea39..44e4a6d143e24cbd05b5d94404a5f5d4e732c880 100644
(file)
--- 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"
#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;
{
int result;
size_t offset;
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index b2cecd594ba572db35fcd7002f939f9cae4cb5cd..6acbf976d8bdf16221ac69d26150fc07005cadf2 100644
(file)
--- 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 },
{ "sha1-array", cmd__sha1_array },
{ "sha1", cmd__sha1 },
{ "sigchain", cmd__sigchain },
+ { "strcmp-offset", cmd__strcmp_offset },
};
int cmd_main(int argc, const char **argv)
};
int cmd_main(int argc, const char **argv)
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index 1d366846f34f7d90e95300f7be221f807fb96e62..035e82ec6ad20db3b5eb4917872e599f1978d1a8 100644
(file)
--- 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__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
#endif
diff --git
a/t/t0065-strcmp-offset.sh
b/t/t0065-strcmp-offset.sh
index 7d6d21425f483c412bb6d42ea551aaf5eaef4aa0..91fa639c4a74ed69ed69ff7360728b2f1ab08a66 100755
(executable)
--- 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 &&
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
test_cmp expect actual
'
done <<-EOF