Skip to contentSkip to conversation

Combine t/helper binaries into a single one

PATCH Superseded Nguyễn Thái Ngọc Duy 7 participants 110 messages Mar 17, 2018 – Mar 27, 2018 Page 2 of 2

Subsystems (2)
lore
Share & tools
lore
#88 lore raw

PATCH v2 21/36 t/helper: merge test-prio-queue into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                   | 2 +-
 t/helper/test-prio-queue.c | 3 ++-
 t/helper/test-tool.c       | 1 +
 t/helper/test-tool.h       | 1 +
 t/t0009-prio-queue.sh      | 6 +++---
 5 files changed, 8 insertions(+), 5 deletions(-)
Makefile +1 -1
index 751ea6cad7..076c778494 100644
@@ -670,6 +670,7 @@ TEST_BUILTINS_OBJS += test-mergesort.o
 TEST_BUILTINS_OBJS += test-mktemp.o
 TEST_BUILTINS_OBJS += test-online-cpus.o
 TEST_BUILTINS_OBJS += test-path-utils.o
+TEST_BUILTINS_OBJS += test-prio-queue.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -677,7 +678,6 @@ TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 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-prio-queue
 TEST_PROGRAMS_NEED_X += test-read-cache
 TEST_PROGRAMS_NEED_X += test-write-cache
 TEST_PROGRAMS_NEED_X += test-ref-store
t/helper/test-prio-queue.c +2 -1
index ae58fff359..9807b649b1 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "prio-queue.h"
 
@@ -16,7 +17,7 @@ static void show(int *v)
 	free(v);
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__prio_queue(int argc, const char **argv)
 {
 	struct prio_queue pq = { intcmp };
 
t/helper/test-tool.c +1 -0
index 4c985074b7..be5f784865 100644
@@ -25,6 +25,7 @@ static struct test_cmd cmds[] = {
 	{ "mktemp", cmd__mktemp },
 	{ "online-cpus", cmd__online_cpus },
 	{ "path-utils", cmd__path_utils },
+	{ "prio-queue", cmd__prio_queue },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 3b7ced01f5..900c96dc02 100644
@@ -19,6 +19,7 @@ int cmd__mergesort(int argc, const char **argv);
 int cmd__mktemp(int argc, const char **argv);
 int cmd__online_cpus(int argc, const char **argv);
 int cmd__path_utils(int argc, const char **argv);
+int cmd__prio_queue(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/t0009-prio-queue.sh +3 -3
index 94045c3fad..e56dfce668 100755
@@ -17,7 +17,7 @@ cat >expect <<'EOF'
 10
 EOF
 test_expect_success 'basic ordering' '
-	test-prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
+	test-tool prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
 	test_cmp expect actual
 '
 
@@ -30,7 +30,7 @@ cat >expect <<'EOF'
 6
 EOF
 test_expect_success 'mixed put and get' '
-	test-prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
+	test-tool prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
 	test_cmp expect actual
 '
 
@@ -43,7 +43,7 @@ NULL
 NULL
 EOF
 test_expect_success 'notice empty queue' '
-	test-prio-queue 1 2 get get get 1 2 get get get >actual &&
+	test-tool prio-queue 1 2 get get get 1 2 get get get >actual &&
 	test_cmp expect actual
 '
 
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#89 lore raw

PATCH v2 22/36 t/helper: merge test-read-cache into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                   | 2 +-
 t/helper/test-read-cache.c | 3 ++-
 t/helper/test-tool.c       | 1 +
 t/helper/test-tool.h       | 1 +
 t/perf/p0002-read-cache.sh | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -1
index 076c778494..393fb9aca4 100644
@@ -671,6 +671,7 @@ TEST_BUILTINS_OBJS += test-mktemp.o
 TEST_BUILTINS_OBJS += test-online-cpus.o
 TEST_BUILTINS_OBJS += test-path-utils.o
 TEST_BUILTINS_OBJS += test-prio-queue.o
+TEST_BUILTINS_OBJS += test-read-cache.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -678,7 +679,6 @@ TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 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-read-cache
 TEST_PROGRAMS_NEED_X += test-write-cache
 TEST_PROGRAMS_NEED_X += test-ref-store
 TEST_PROGRAMS_NEED_X += test-regex
t/helper/test-read-cache.c +2 -1
index 48255eef31..d674c88ba0 100644
@@ -1,6 +1,7 @@
+#include "test-tool.h"
 #include "cache.h"
 
-int cmd_main(int argc, const char **argv)
+int cmd__read_cache(int argc, const char **argv)
 {
 	int i, cnt = 1;
 	if (argc == 2)
t/helper/test-tool.c +1 -0
index be5f784865..f64355c25c 100644
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
 	{ "online-cpus", cmd__online_cpus },
 	{ "path-utils", cmd__path_utils },
 	{ "prio-queue", cmd__prio_queue },
+	{ "read-cache", cmd__read_cache },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 900c96dc02..4d51c17f5a 100644
@@ -20,6 +20,7 @@ int cmd__mktemp(int argc, const char **argv);
 int cmd__online_cpus(int argc, const char **argv);
 int cmd__path_utils(int argc, const char **argv);
 int cmd__prio_queue(int argc, const char **argv);
+int cmd__read_cache(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/perf/p0002-read-cache.sh +1 -1
index 9180ae9343..cdd105a594 100755
@@ -8,7 +8,7 @@ test_perf_default_repo
 
 count=1000
 test_perf "read_cache/discard_cache $count times" "
-	test-read-cache $count
+	test-tool read-cache $count
 "
 
 test_done
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#90 lore raw

PATCH v2 23/36 t/helper: merge test-ref-store into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                       | 2 +-
 t/helper/test-ref-store.c      | 3 ++-
 t/helper/test-tool.c           | 1 +
 t/helper/test-tool.h           | 1 +
 t/t1405-main-ref-store.sh      | 2 +-
 t/t1406-submodule-ref-store.sh | 2 +-
 t/t1407-worktree-ref-store.sh  | 4 ++--
 7 files changed, 9 insertions(+), 6 deletions(-)
Makefile +1 -1
index 393fb9aca4..20080fddb8 100644
@@ -672,6 +672,7 @@ TEST_BUILTINS_OBJS += test-online-cpus.o
 TEST_BUILTINS_OBJS += test-path-utils.o
 TEST_BUILTINS_OBJS += test-prio-queue.o
 TEST_BUILTINS_OBJS += test-read-cache.o
+TEST_BUILTINS_OBJS += test-ref-store.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -680,7 +681,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-ref-store
 TEST_PROGRAMS_NEED_X += test-regex
 TEST_PROGRAMS_NEED_X += test-revision-walking
 TEST_PROGRAMS_NEED_X += test-run-command
t/helper/test-ref-store.c +2 -1
index 7120634b04..cdefb66a87 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "refs.h"
 #include "worktree.h"
@@ -274,7 +275,7 @@ static struct command commands[] = {
 	{ NULL, NULL }
 };
 
-int cmd_main(int argc, const char **argv)
+int cmd__ref_store(int argc, const char **argv)
 {
 	struct ref_store *refs;
 	const char *func;
t/helper/test-tool.c +1 -0
index f64355c25c..777150e4ad 100644
@@ -27,6 +27,7 @@ static struct test_cmd cmds[] = {
 	{ "path-utils", cmd__path_utils },
 	{ "prio-queue", cmd__prio_queue },
 	{ "read-cache", cmd__read_cache },
+	{ "ref-store", cmd__ref_store },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 4d51c17f5a..2b5cc6e117 100644
@@ -21,6 +21,7 @@ int cmd__online_cpus(int argc, const char **argv);
 int cmd__path_utils(int argc, const char **argv);
 int cmd__prio_queue(int argc, const char **argv);
 int cmd__read_cache(int argc, const char **argv);
+int cmd__ref_store(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/t1405-main-ref-store.sh +1 -1
index e8115df5ba..a30a080b20 100755
@@ -4,7 +4,7 @@ test_description='test main ref store api'
 
 . ./test-lib.sh
 
-RUN="test-ref-store main"
+RUN="test-tool ref-store main"
 
 test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' '
 	test_commit one &&
t/t1406-submodule-ref-store.sh +1 -1
index c32d4cc465..e093782cc3 100755
@@ -4,7 +4,7 @@ test_description='test submodule ref store api'
 
 . ./test-lib.sh
 
-RUN="test-ref-store submodule:sub"
+RUN="test-tool ref-store submodule:sub"
 
 test_expect_success 'setup' '
 	git init sub &&
t/t1407-worktree-ref-store.sh +2 -2
index 8842d0329f..2211f9831f 100755
@@ -4,8 +4,8 @@ test_description='test worktree ref store api'
 
 . ./test-lib.sh
 
-RWT="test-ref-store worktree:wt"
-RMAIN="test-ref-store worktree:main"
+RWT="test-tool ref-store worktree:wt"
+RMAIN="test-tool ref-store worktree:main"
 
 test_expect_success 'setup' '
 	test_commit first &&
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#91 lore raw

PATCH v2 24/36 t/helper: merge test-regex into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                        | 2 +-
 t/helper/test-regex.c           | 7 ++++---
 t/helper/test-tool.c            | 1 +
 t/helper/test-tool.h            | 1 +
 t/t0070-fundamental.sh          | 2 +-
 t/t7812-grep-icase-non-ascii.sh | 2 +-
 6 files changed, 9 insertions(+), 6 deletions(-)
Makefile +1 -1
index 20080fddb8..7444c00bbb 100644
@@ -673,6 +673,7 @@ TEST_BUILTINS_OBJS += test-path-utils.o
 TEST_BUILTINS_OBJS += test-prio-queue.o
 TEST_BUILTINS_OBJS += test-read-cache.o
 TEST_BUILTINS_OBJS += test-ref-store.o
+TEST_BUILTINS_OBJS += test-regex.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -681,7 +682,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-regex
 TEST_PROGRAMS_NEED_X += test-revision-walking
 TEST_PROGRAMS_NEED_X += test-run-command
 TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
t/helper/test-regex.c +4 -3
index b5ea8a97c5..10284cc56f 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "git-compat-util.h"
 #include "gettext.h"
 
@@ -36,7 +37,7 @@ static int test_regex_bug(void)
 	return 0;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__regex(int argc, const char **argv)
 {
 	const char *pat;
 	const char *str;
@@ -47,8 +48,8 @@ int cmd_main(int argc, const char **argv)
 	if (argc == 2 && !strcmp(argv[1], "--bug"))
 		return test_regex_bug();
 	else if (argc < 3)
-		usage("test-regex --bug\n"
-		      "test-regex <pattern> <string> [<options>]");
+		usage("test-tool regex --bug\n"
+		      "test-tool regex <pattern> <string> [<options>]");
 
 	argv++;
 	pat = *argv++;
t/helper/test-tool.c +1 -0
index 777150e4ad..0dd3b879ad 100644
@@ -28,6 +28,7 @@ static struct test_cmd cmds[] = {
 	{ "prio-queue", cmd__prio_queue },
 	{ "read-cache", cmd__read_cache },
 	{ "ref-store", cmd__ref_store },
+	{ "regex", cmd__regex },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 2b5cc6e117..5f73c83ac0 100644
@@ -22,6 +22,7 @@ int cmd__path_utils(int argc, const char **argv);
 int cmd__prio_queue(int argc, const char **argv);
 int cmd__read_cache(int argc, const char **argv);
 int cmd__ref_store(int argc, const char **argv);
+int cmd__regex(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/t0070-fundamental.sh +1 -1
index ac007938ee..23fbe6434a 100755
@@ -31,7 +31,7 @@ test_expect_success 'git_mkstemps_mode does not fail if fd 0 is not open' '
 
 test_expect_success 'check for a bug in the regex routines' '
 	# if this test fails, re-build git with NO_REGEX=1
-	test-regex --bug
+	test-tool regex --bug
 '
 
 test_done
t/t7812-grep-icase-non-ascii.sh +1 -1
index 0059a1f837..0c685d3598 100755
@@ -12,7 +12,7 @@ test_expect_success GETTEXT_LOCALE 'setup' '
 '
 
 test_have_prereq GETTEXT_LOCALE &&
-test-regex "HALLÓ" "Halló" ICASE &&
+test-tool regex "HALLÓ" "Halló" ICASE &&
 test_set_prereq REGEX_LOCALE
 
 test_expect_success REGEX_LOCALE 'grep literal string, no -F' '
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#92 lore raw

PATCH v2 25/36 t/helper: merge test-revision-walking into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                         | 2 +-
 t/helper/test-revision-walking.c | 3 ++-
 t/helper/test-tool.c             | 1 +
 t/helper/test-tool.h             | 1 +
 t/t0062-revision-walking.sh      | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -1
index 7444c00bbb..3ed461cd55 100644
@@ -674,6 +674,7 @@ TEST_BUILTINS_OBJS += test-prio-queue.o
 TEST_BUILTINS_OBJS += test-read-cache.o
 TEST_BUILTINS_OBJS += test-ref-store.o
 TEST_BUILTINS_OBJS += test-regex.o
+TEST_BUILTINS_OBJS += test-revision-walking.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -682,7 +683,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-revision-walking
 TEST_PROGRAMS_NEED_X += test-run-command
 TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
 TEST_PROGRAMS_NEED_X += test-sha1-array
t/helper/test-revision-walking.c +2 -1
index b8e6fe1d00..4f8bc75821 100644
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include "test-tool.h"
 #include "cache.h"
 #include "commit.h"
 #include "diff.h"
@@ -45,7 +46,7 @@ static int run_revision_walk(void)
 	return got_revision;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__revision_walking(int argc, const char **argv)
 {
 	if (argc < 2)
 		return 1;
t/helper/test-tool.c +1 -0
index 0dd3b879ad..e43405bea9 100644
@@ -29,6 +29,7 @@ static struct test_cmd cmds[] = {
 	{ "read-cache", cmd__read_cache },
 	{ "ref-store", cmd__ref_store },
 	{ "regex", cmd__regex },
+	{ "revision-walking", cmd__revision_walking },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 5f73c83ac0..4dff220646 100644
@@ -23,6 +23,7 @@ int cmd__prio_queue(int argc, const char **argv);
 int cmd__read_cache(int argc, const char **argv);
 int cmd__ref_store(int argc, const char **argv);
 int cmd__regex(int argc, const char **argv);
+int cmd__revision_walking(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/t0062-revision-walking.sh +1 -1
index 113c728e67..8e215867b8 100755
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
 '
 
 test_expect_success 'revision walking can be done twice' '
-	test-revision-walking run-twice >run_twice_actual &&
+	test-tool revision-walking run-twice >run_twice_actual &&
 	test_cmp run_twice_expected run_twice_actual
 '
 
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#93 lore raw

PATCH v2 26/36 t/helper: merge test-run-command into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                    |  2 +-
 t/helper/test-run-command.c |  3 ++-
 t/helper/test-tool.c        |  1 +
 t/helper/test-tool.h        |  1 +
 t/t0061-run-command.sh      | 24 ++++++++++++------------
 5 files changed, 17 insertions(+), 14 deletions(-)
Makefile +1 -1
index 3ed461cd55..adece67b8e 100644
@@ -675,6 +675,7 @@ TEST_BUILTINS_OBJS += test-read-cache.o
 TEST_BUILTINS_OBJS += test-ref-store.o
 TEST_BUILTINS_OBJS += test-regex.o
 TEST_BUILTINS_OBJS += test-revision-walking.o
+TEST_BUILTINS_OBJS += test-run-command.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -683,7 +684,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-run-command
 TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
 TEST_PROGRAMS_NEED_X += test-sha1-array
 TEST_PROGRAMS_NEED_X += test-sigchain
t/helper/test-run-command.c +2 -1
index 153342e44d..2cc93bb69c 100644
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include "test-tool.h"
 #include "git-compat-util.h"
 #include "run-command.h"
 #include "argv-array.h"
@@ -49,7 +50,7 @@ static int task_finished(int result,
 	return 1;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__run_command(int argc, const char **argv)
 {
 	struct child_process proc = CHILD_PROCESS_INIT;
 	int jobs;
t/helper/test-tool.c +1 -0
index e43405bea9..94ceda66e7 100644
@@ -30,6 +30,7 @@ static struct test_cmd cmds[] = {
 	{ "ref-store", cmd__ref_store },
 	{ "regex", cmd__regex },
 	{ "revision-walking", cmd__revision_walking },
+	{ "run-command", cmd__run_command },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 4dff220646..0fe2dd640b 100644
@@ -24,6 +24,7 @@ int cmd__read_cache(int argc, const char **argv);
 int cmd__ref_store(int argc, const char **argv);
 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__sha1(int argc, const char **argv);
 
 #endif
t/t0061-run-command.sh +12 -12
index 24c92b6cd7..d03149be9f 100755
@@ -14,13 +14,13 @@ EOF
 >empty
 
 test_expect_success 'start_command reports ENOENT' '
-	test-run-command start-command-ENOENT ./does-not-exist
+	test-tool run-command start-command-ENOENT ./does-not-exist
 '
 
 test_expect_success 'run_command can run a command' '
 	cat hello-script >hello.sh &&
 	chmod +x hello.sh &&
-	test-run-command run-command ./hello.sh >actual 2>err &&
+	test-tool run-command run-command ./hello.sh >actual 2>err &&
 
 	test_cmp hello-script actual &&
 	test_cmp empty err
@@ -31,7 +31,7 @@ test_expect_success !MINGW 'run_command can run a script without a #! line' '
 	cat hello-script
 	EOF
 	chmod +x hello &&
-	test-run-command run-command ./hello >actual 2>err &&
+	test-tool run-command run-command ./hello >actual 2>err &&
 
 	test_cmp hello-script actual &&
 	test_cmp empty err
@@ -45,7 +45,7 @@ test_expect_success 'run_command does not try to execute a directory' '
 	EOF
 
 	PATH=$PWD/bin1:$PWD/bin2:$PATH \
-		test-run-command run-command greet >actual 2>err &&
+		test-tool run-command run-command greet >actual 2>err &&
 	test_cmp bin2/greet actual &&
 	test_cmp empty err
 '
@@ -62,7 +62,7 @@ test_expect_success POSIXPERM 'run_command passes over non-executable file' '
 	EOF
 
 	PATH=$PWD/bin1:$PWD/bin2:$PATH \
-		test-run-command run-command greet >actual 2>err &&
+		test-tool run-command run-command greet >actual 2>err &&
 	test_cmp bin2/greet actual &&
 	test_cmp empty err
 '
@@ -70,7 +70,7 @@ test_expect_success POSIXPERM 'run_command passes over non-executable file' '
 test_expect_success POSIXPERM 'run_command reports EACCES' '
 	cat hello-script >hello.sh &&
 	chmod -x hello.sh &&
-	test_must_fail test-run-command run-command ./hello.sh 2>err &&
+	test_must_fail test-tool run-command run-command ./hello.sh 2>err &&
 
 	grep "fatal: cannot exec.*hello.sh" err
 '
@@ -104,17 +104,17 @@ World
 EOF
 
 test_expect_success 'run_command runs in parallel with more jobs available than tasks' '
-	test-run-command run-command-parallel 5 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
+	test-tool run-command run-command-parallel 5 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
 	test_cmp expect actual
 '
 
 test_expect_success 'run_command runs in parallel with as many jobs as tasks' '
-	test-run-command run-command-parallel 4 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
+	test-tool run-command run-command-parallel 4 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
 	test_cmp expect actual
 '
 
 test_expect_success 'run_command runs in parallel with more tasks than jobs available' '
-	test-run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
+	test-tool run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
 	test_cmp expect actual
 '
 
@@ -128,7 +128,7 @@ asking for a quick stop
 EOF
 
 test_expect_success 'run_command is asked to abort gracefully' '
-	test-run-command run-command-abort 3 false 2>actual &&
+	test-tool run-command run-command-abort 3 false 2>actual &&
 	test_cmp expect actual
 '
 
@@ -137,14 +137,14 @@ no further jobs available
 EOF
 
 test_expect_success 'run_command outputs ' '
-	test-run-command run-command-no-jobs 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
+	test-tool run-command run-command-no-jobs 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
 	test_cmp expect actual
 '
 
 test_trace () {
 	expect="$1"
 	shift
-	GIT_TRACE=1 test-run-command "$@" run-command true 2>&1 >/dev/null | \
+	GIT_TRACE=1 test-tool run-command "$@" run-command true 2>&1 >/dev/null | \
 		sed 's/.* run_command: //' >actual &&
 	echo "$expect true" >expect &&
 	test_cmp expect actual
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#94 lore raw

PATCH v2 27/36 t/helper: merge test-scrap-cache-tree into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                         | 2 +-
 t/helper/test-scrap-cache-tree.c | 3 ++-
 t/helper/test-tool.c             | 1 +
 t/helper/test-tool.h             | 1 +
 t/t0090-cache-tree.sh            | 8 ++++----
 5 files changed, 9 insertions(+), 6 deletions(-)
Makefile +1 -1
index adece67b8e..ba7c7d8a79 100644
@@ -676,6 +676,7 @@ TEST_BUILTINS_OBJS += test-ref-store.o
 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
@@ -684,7 +685,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-scrap-cache-tree
 TEST_PROGRAMS_NEED_X += test-sha1-array
 TEST_PROGRAMS_NEED_X += test-sigchain
 TEST_PROGRAMS_NEED_X += test-strcmp-offset
t/helper/test-scrap-cache-tree.c +2 -1
index d2a63bea43..d26d3e7c8b 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "lockfile.h"
 #include "tree.h"
@@ -5,7 +6,7 @@
 
 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);
t/helper/test-tool.c +1 -0
index 94ceda66e7..96d8df69d4 100644
@@ -31,6 +31,7 @@ static struct test_cmd cmds[] = {
 	{ "regex", cmd__regex },
 	{ "revision-walking", cmd__revision_walking },
 	{ "run-command", cmd__run_command },
+	{ "scrap-cache-tree", cmd__scrap_cache_tree },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 0fe2dd640b..448119a44a 100644
@@ -25,6 +25,7 @@ int cmd__ref_store(int argc, const char **argv);
 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
t/t0090-cache-tree.sh +4 -4
index 3266209e41..4ae0995cd9 100755
@@ -115,14 +115,14 @@ test_expect_success 'update-index invalidates cache-tree' '
 '
 
 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
 '
 
@@ -170,7 +170,7 @@ test_expect_success 'commit in child dir has 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
 '
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#95 lore raw

PATCH v2 28/36 t/helper: merge test-sha1-array into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                   |  2 +-
 t/helper/test-sha1-array.c |  3 ++-
 t/helper/test-tool.c       |  1 +
 t/helper/test-tool.h       |  1 +
 t/t0064-sha1-array.sh      | 16 ++++++++--------
 5 files changed, 13 insertions(+), 10 deletions(-)
Makefile +1 -1
index ba7c7d8a79..b50a0818a9 100644
@@ -677,6 +677,7 @@ 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-array.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@ -685,7 +686,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-sha1-array
 TEST_PROGRAMS_NEED_X += test-sigchain
 TEST_PROGRAMS_NEED_X += test-strcmp-offset
 TEST_PROGRAMS_NEED_X += test-string-list
t/helper/test-sha1-array.c +2 -1
index edfd52d82a..ad5e69f9d3 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "sha1-array.h"
 
@@ -7,7 +8,7 @@ static int print_oid(const struct object_id *oid, void *data)
 	return 0;
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__sha1_array(int argc, const char **argv)
 {
 	struct oid_array array = OID_ARRAY_INIT;
 	struct strbuf line = STRBUF_INIT;
t/helper/test-tool.c +1 -0
index 96d8df69d4..27f7b6ff75 100644
@@ -32,6 +32,7 @@ static struct test_cmd cmds[] = {
 	{ "revision-walking", cmd__revision_walking },
 	{ "run-command", cmd__run_command },
 	{ "scrap-cache-tree", cmd__scrap_cache_tree },
+	{ "sha1-array", cmd__sha1_array },
 	{ "sha1", cmd__sha1 },
 };
 
t/helper/test-tool.h +1 -0
index 448119a44a..d8066e3f63 100644
@@ -26,6 +26,7 @@ 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_array(int argc, const char **argv);
 int cmd__sha1(int argc, const char **argv);
 
 #endif
t/t0064-sha1-array.sh +8 -8
index 50b31ffe75..67484502a0 100755
@@ -18,7 +18,7 @@ test_expect_success 'ordered enumeration' '
 	{
 		echo20 append 88 44 aa 55 &&
 		echo for_each_unique
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	test_cmp expect actual
 '
 
@@ -28,7 +28,7 @@ test_expect_success 'ordered enumeration with duplicate suppression' '
 		echo20 append 88 44 aa 55 &&
 		echo20 append 88 44 aa 55 &&
 		echo for_each_unique
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	test_cmp expect actual
 '
 
@@ -36,7 +36,7 @@ test_expect_success 'lookup' '
 	{
 		echo20 append 88 44 aa 55 &&
 		echo20 lookup 55
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -eq 1
 '
@@ -45,7 +45,7 @@ test_expect_success 'lookup non-existing entry' '
 	{
 		echo20 append 88 44 aa 55 &&
 		echo20 lookup 33
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -lt 0
 '
@@ -55,7 +55,7 @@ test_expect_success 'lookup with duplicates' '
 		echo20 append 88 44 aa 55 &&
 		echo20 append 88 44 aa 55 &&
 		echo20 lookup 55
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -ge 2 &&
 	test "$n" -le 3
@@ -66,7 +66,7 @@ test_expect_success 'lookup non-existing entry with duplicates' '
 		echo20 append 88 44 aa 55 &&
 		echo20 append 88 44 aa 55 &&
 		echo20 lookup 66
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -lt 0
 '
@@ -76,7 +76,7 @@ test_expect_success 'lookup with almost duplicate values' '
 		echo "append 5555555555555555555555555555555555555555" &&
 		echo "append 555555555555555555555555555555555555555f" &&
 		echo20 lookup 55
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -eq 0
 '
@@ -85,7 +85,7 @@ test_expect_success 'lookup with single duplicate value' '
 	{
 		echo20 append 55 55 &&
 		echo20 lookup 55
-	} | test-sha1-array >actual &&
+	} | test-tool sha1-array >actual &&
 	n=$(cat actual) &&
 	test "$n" -ge 0 &&
 	test "$n" -le 1
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#96 lore raw

PATCH v2 29/36 t/helper: merge test-sigchain into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                 | 2 +-
 t/helper/test-sigchain.c | 3 ++-
 t/helper/test-tool.c     | 1 +
 t/helper/test-tool.h     | 1 +
 t/t0005-signals.sh       | 4 ++--
 5 files changed, 7 insertions(+), 4 deletions(-)
Makefile +1 -1
index b50a0818a9..51de8882d0 100644
@@ -679,6 +679,7 @@ TEST_BUILTINS_OBJS += test-run-command.o
 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_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -686,7 +687,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-sigchain
 TEST_PROGRAMS_NEED_X += test-strcmp-offset
 TEST_PROGRAMS_NEED_X += test-string-list
 TEST_PROGRAMS_NEED_X += test-submodule-config
t/helper/test-sigchain.c +2 -1
index b71edbd442..77ac5bc33f 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "sigchain.h"
 
@@ -13,7 +14,7 @@ X(two)
 X(three)
 #undef X
 
-int cmd_main(int argc, const char **argv) {
+int cmd__sigchain(int argc, const char **argv) {
 	sigchain_push(SIGTERM, one);
 	sigchain_push(SIGTERM, two);
 	sigchain_push(SIGTERM, three);
t/helper/test-tool.c +1 -0
index 27f7b6ff75..c1de1a3397 100644
@@ -34,6 +34,7 @@ static struct test_cmd cmds[] = {
 	{ "scrap-cache-tree", cmd__scrap_cache_tree },
 	{ "sha1-array", cmd__sha1_array },
 	{ "sha1", cmd__sha1 },
+	{ "sigchain", cmd__sigchain },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index d8066e3f63..1d366846f3 100644
@@ -28,5 +28,6 @@ int cmd__run_command(int argc, const char **argv);
 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);
 
 #endif
t/t0005-signals.sh +2 -2
index c16947cf5d..4c214bd11c 100755
@@ -10,7 +10,7 @@ one
 EOF
 
 test_expect_success 'sigchain works' '
-	{ test-sigchain >actual; ret=$?; } &&
+	{ test-tool sigchain >actual; ret=$?; } &&
 	{
 		# Signal death by raise() on Windows acts like exit(3),
 		# regardless of the signal number. So we must allow that
@@ -24,7 +24,7 @@ test_expect_success 'sigchain works' '
 test_expect_success !MINGW 'signals are propagated using shell convention' '
 	# we use exec here to avoid any sub-shell interpretation
 	# of the exit code
-	git config alias.sigterm "!exec test-sigchain" &&
+	git config alias.sigterm "!exec test-tool sigchain" &&
 	test_expect_code 143 git sigterm
 '
 
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#97 lore raw

PATCH v2 30/36 t/helper: merge test-strcmp-offset into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                      | 2 +-
 t/helper/test-strcmp-offset.c | 3 ++-
 t/helper/test-tool.c          | 1 +
 t/helper/test-tool.h          | 1 +
 t/t0065-strcmp-offset.sh      | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -1
index 51de8882d0..528a80b6a6 100644
@@ -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-strcmp-offset.o
 
 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-strcmp-offset
 TEST_PROGRAMS_NEED_X += test-string-list
 TEST_PROGRAMS_NEED_X += test-submodule-config
 TEST_PROGRAMS_NEED_X += test-subprocess
t/helper/test-strcmp-offset.c +2 -1
index e159c9a127..44e4a6d143 100644
@@ -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;
t/helper/test-tool.c +1 -0
index c1de1a3397..41b8f869ae 100644
@@ -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)
t/helper/test-tool.h +1 -0
index 1d366846f3..035e82ec6a 100644
@@ -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
t/t0065-strcmp-offset.sh +1 -1
index 7d6d21425f..91fa639c4a 100755
@@ -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
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#98 lore raw

PATCH v2 31/36 t/helper: merge test-string-list into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                    |  2 +-
 t/helper/test-string-list.c |  3 ++-
 t/helper/test-tool.c        |  1 +
 t/helper/test-tool.h        |  1 +
 t/perf/p0071-sort.sh        |  2 +-
 t/t0063-string-list.sh      | 48 ++++++++++++++++++-------------------
 6 files changed, 30 insertions(+), 27 deletions(-)
Makefile +1 -1
index 528a80b6a6..6819792c2b 100644
@@ -681,6 +681,7 @@ 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_BUILTINS_OBJS += test-string-list.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -688,7 +689,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-string-list
 TEST_PROGRAMS_NEED_X += test-submodule-config
 TEST_PROGRAMS_NEED_X += test-subprocess
 TEST_PROGRAMS_NEED_X += test-svn-fe
t/helper/test-string-list.c +2 -1
index 829ec3d7d2..2123dda85b 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "string-list.h"
 
@@ -41,7 +42,7 @@ static int prefix_cb(struct string_list_item *item, void *cb_data)
 	return starts_with(item->string, prefix);
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__string_list(int argc, const char **argv)
 {
 	if (argc == 5 && !strcmp(argv[1], "split")) {
 		struct string_list list = STRING_LIST_INIT_DUP;
t/helper/test-tool.c +1 -0
index 41b8f869ae..90008533cd 100644
@@ -36,6 +36,7 @@ static struct test_cmd cmds[] = {
 	{ "sha1", cmd__sha1 },
 	{ "sigchain", cmd__sigchain },
 	{ "strcmp-offset", cmd__strcmp_offset },
+	{ "string-list", cmd__string_list },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index 035e82ec6a..19ad2b0df8 100644
@@ -30,5 +30,6 @@ 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);
+int cmd__string_list(int argc, const char **argv);
 
 #endif
t/perf/p0071-sort.sh +1 -1
index 7c9a35a646..6e924f5fa3 100755
@@ -16,7 +16,7 @@ test_perf 'sort(1)' '
 '
 
 test_perf 'string_list_sort()' '
-	test-string-list sort <unsorted >actual
+	test-tool string-list sort <unsorted >actual
 '
 
 test_expect_success 'string_list_sort() sorts like sort(1)' '
t/t0063-string-list.sh +24 -24

64 lines not on this page · raw message

Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#99 lore raw

PATCH v2 32/36 t/helper: merge test-submodule-config into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                         |  2 +-
 t/helper/test-submodule-config.c |  3 ++-
 t/helper/test-tool.c             |  1 +
 t/helper/test-tool.h             |  1 +
 t/t7411-submodule-config.sh      | 18 +++++++++---------
 5 files changed, 14 insertions(+), 11 deletions(-)
Makefile +1 -1
index 6819792c2b..c1dc9ff8d6 100644
@@ -682,6 +682,7 @@ TEST_BUILTINS_OBJS += test-sha1.o
 TEST_BUILTINS_OBJS += test-sigchain.o
 TEST_BUILTINS_OBJS += test-strcmp-offset.o
 TEST_BUILTINS_OBJS += test-string-list.o
+TEST_BUILTINS_OBJS += test-submodule-config.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -689,7 +690,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-submodule-config
 TEST_PROGRAMS_NEED_X += test-subprocess
 TEST_PROGRAMS_NEED_X += test-svn-fe
 TEST_PROGRAMS_NEED_X += test-tool
t/helper/test-submodule-config.c +2 -1
index f23db3b19a..5c6e4b010d 100644
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "config.h"
 #include "submodule-config.h"
@@ -10,7 +11,7 @@ static void die_usage(int argc, const char **argv, const char *msg)
 	exit(1);
 }
 
-int cmd_main(int argc, const char **argv)
+int cmd__submodule_config(int argc, const char **argv)
 {
 	const char **arg = argv;
 	int my_argc = argc;
t/helper/test-tool.c +1 -0
index 90008533cd..434fedc8d8 100644
@@ -37,6 +37,7 @@ static struct test_cmd cmds[] = {
 	{ "sigchain", cmd__sigchain },
 	{ "strcmp-offset", cmd__strcmp_offset },
 	{ "string-list", cmd__string_list },
+	{ "submodule-config", cmd__submodule_config },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index 19ad2b0df8..be7e79738f 100644
@@ -31,5 +31,6 @@ 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);
 int cmd__string_list(int argc, const char **argv);
+int cmd__submodule_config(int argc, const char **argv);
 
 #endif
t/t7411-submodule-config.sh +9 -9
index 46c09c7765..0bde5850ac 100755
@@ -41,7 +41,7 @@ test_expect_success 'configuration parsing with error' '
 	EOF
 	(
 		cd repo &&
-		test_must_fail test-submodule-config "" s 2>actual &&
+		test_must_fail test-tool submodule-config "" s 2>actual &&
 		test_i18ngrep "bad config" actual
 	)
 '
@@ -55,7 +55,7 @@ EOF
 
 test_expect_success 'test parsing and lookup of submodule config by path' '
 	(cd super &&
-		test-submodule-config \
+		test-tool submodule-config \
 			HEAD^ a \
 			HEAD b \
 			HEAD^ submodule \
@@ -67,7 +67,7 @@ test_expect_success 'test parsing and lookup of submodule config by path' '
 
 test_expect_success 'test parsing and lookup of submodule config by name' '
 	(cd super &&
-		test-submodule-config --name \
+		test-tool submodule-config --name \
 			HEAD^ a \
 			HEAD a \
 			HEAD^ submodule \
@@ -89,7 +89,7 @@ test_expect_success 'error in one submodule config lets continue' '
 		git add .gitmodules &&
 		mv .gitmodules.bak .gitmodules &&
 		git commit -m "add error" &&
-		test-submodule-config \
+		test-tool submodule-config \
 			HEAD b \
 			HEAD submodule \
 				>actual &&
@@ -100,7 +100,7 @@ test_expect_success 'error in one submodule config lets continue' '
 test_expect_success 'error message contains blob reference' '
 	(cd super &&
 		sha1=$(git rev-parse HEAD) &&
-		test-submodule-config \
+		test-tool submodule-config \
 			HEAD b \
 			HEAD submodule \
 				2>actual_err &&
@@ -114,9 +114,9 @@ test_expect_success 'using different treeishs works' '
 		git tag new_tag &&
 		tree=$(git rev-parse HEAD^{tree}) &&
 		commit=$(git rev-parse HEAD^{commit}) &&
-		test-submodule-config $commit b >expect &&
-		test-submodule-config $tree b >actual.1 &&
-		test-submodule-config new_tag b >actual.2 &&
+		test-tool submodule-config $commit b >expect &&
+		test-tool submodule-config $tree b >actual.1 &&
+		test-tool submodule-config new_tag b >actual.2 &&
 		test_cmp expect actual.1 &&
 		test_cmp expect actual.2
 	)
@@ -130,7 +130,7 @@ test_expect_success 'error in history in fetchrecursesubmodule lets continue' '
 		git config --unset -f .gitmodules \
 			submodule.submodule.fetchrecursesubmodules &&
 		git commit -m "add error in fetchrecursesubmodules" &&
-		test-submodule-config \
+		test-tool submodule-config \
 			HEAD b \
 			HEAD submodule \
 				>actual &&
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#100 lore raw

PATCH v2 33/36 t/helper: merge test-subprocess into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                   | 2 +-
 t/helper/test-subprocess.c | 3 ++-
 t/helper/test-tool.c       | 1 +
 t/helper/test-tool.h       | 1 +
 t/t1501-work-tree.sh       | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -1
index c1dc9ff8d6..893ea64ca2 100644
@@ -683,6 +683,7 @@ TEST_BUILTINS_OBJS += test-sigchain.o
 TEST_BUILTINS_OBJS += test-strcmp-offset.o
 TEST_BUILTINS_OBJS += test-string-list.o
 TEST_BUILTINS_OBJS += test-submodule-config.o
+TEST_BUILTINS_OBJS += test-subprocess.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -690,7 +691,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-subprocess
 TEST_PROGRAMS_NEED_X += test-svn-fe
 TEST_PROGRAMS_NEED_X += test-tool
 TEST_PROGRAMS_NEED_X += test-urlmatch-normalization
t/helper/test-subprocess.c +2 -1
index 30c5765bfc..92b69de635 100644
@@ -1,7 +1,8 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "run-command.h"
 
-int cmd_main(int argc, const char **argv)
+int cmd__subprocess(int argc, const char **argv)
 {
 	struct child_process cp = CHILD_PROCESS_INIT;
 	int nogit = 0;
t/helper/test-tool.c +1 -0
index 434fedc8d8..96180f0350 100644
@@ -38,6 +38,7 @@ static struct test_cmd cmds[] = {
 	{ "strcmp-offset", cmd__strcmp_offset },
 	{ "string-list", cmd__string_list },
 	{ "submodule-config", cmd__submodule_config },
+	{ "subprocess", cmd__subprocess },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index be7e79738f..a611801061 100644
@@ -32,5 +32,6 @@ int cmd__sigchain(int argc, const char **argv);
 int cmd__strcmp_offset(int argc, const char **argv);
 int cmd__string_list(int argc, const char **argv);
 int cmd__submodule_config(int argc, const char **argv);
+int cmd__subprocess(int argc, const char **argv);
 
 #endif
t/t1501-work-tree.sh +1 -1
index b07cb9140e..02cf2013fc 100755
@@ -341,7 +341,7 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
 
 test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
 	GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
-	test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
+	test-tool subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
 	echo "$(pwd)/repo.git/work" >expected &&
 	test_cmp expected actual
 '
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#101 lore raw

PATCH v2 34/36 t/helper: merge test-urlmatch-normalization into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                               |   2 +-
 t/helper/test-tool.c                   |   1 +
 t/helper/test-tool.h                   |   1 +
 t/helper/test-urlmatch-normalization.c |   5 +-
 t/t0110-urlmatch-normalization.sh      | 266 ++++++++++++-------------
 5 files changed, 139 insertions(+), 136 deletions(-)
Makefile +1 -1
index 893ea64ca2..7923ec3747 100644
@@ -684,6 +684,7 @@ TEST_BUILTINS_OBJS += test-strcmp-offset.o
 TEST_BUILTINS_OBJS += test-string-list.o
 TEST_BUILTINS_OBJS += test-submodule-config.o
 TEST_BUILTINS_OBJS += test-subprocess.o
+TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -693,7 +694,6 @@ TEST_PROGRAMS_NEED_X += test-parse-options
 TEST_PROGRAMS_NEED_X += test-write-cache
 TEST_PROGRAMS_NEED_X += test-svn-fe
 TEST_PROGRAMS_NEED_X += test-tool
-TEST_PROGRAMS_NEED_X += test-urlmatch-normalization
 TEST_PROGRAMS_NEED_X += test-wildmatch
 
 TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))
t/helper/test-tool.c +1 -0
index 96180f0350..b3d84fdac9 100644
@@ -39,6 +39,7 @@ static struct test_cmd cmds[] = {
 	{ "string-list", cmd__string_list },
 	{ "submodule-config", cmd__submodule_config },
 	{ "subprocess", cmd__subprocess },
+	{ "urlmatch-normalization", cmd__urlmatch_normalization },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index a611801061..fa53c82659 100644
@@ -33,5 +33,6 @@ int cmd__strcmp_offset(int argc, const char **argv);
 int cmd__string_list(int argc, const char **argv);
 int cmd__submodule_config(int argc, const char **argv);
 int cmd__subprocess(int argc, const char **argv);
+int cmd__urlmatch_normalization(int argc, const char **argv);
 
 #endif
t/helper/test-urlmatch-normalization.c +3 -2
index 49b6e836be..8f4d67e646 100644
@@ -1,9 +1,10 @@
+#include "test-tool.h"
 #include "git-compat-util.h"
 #include "urlmatch.h"
 
-int cmd_main(int argc, const char **argv)
+int cmd__urlmatch_normalization(int argc, const char **argv)
 {
-	const char usage[] = "test-urlmatch-normalization [-p | -l] <url1> | <url1> <url2>";
+	const char usage[] = "test-tool urlmatch-normalization [-p | -l] <url1> | <url1> <url2>";
 	char *url1, *url2;
 	int opt_p = 0, opt_l = 0;
 
t/t0110-urlmatch-normalization.sh +133 -133

305 lines not on this page · raw message

Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#102 lore raw

PATCH v2 35/36 t/helper: merge test-wildmatch into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                  |  2 +-
 t/helper/test-tool.c      |  1 +
 t/helper/test-tool.h      |  1 +
 t/helper/test-wildmatch.c |  3 ++-
 t/t3070-wildmatch.sh      | 14 +++++++-------
 5 files changed, 12 insertions(+), 9 deletions(-)
Makefile +1 -1
index 7923ec3747..2ab76c6838 100644
@@ -685,6 +685,7 @@ TEST_BUILTINS_OBJS += test-string-list.o
 TEST_BUILTINS_OBJS += test-submodule-config.o
 TEST_BUILTINS_OBJS += test-subprocess.o
 TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
+TEST_BUILTINS_OBJS += test-wildmatch.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -694,7 +695,6 @@ TEST_PROGRAMS_NEED_X += test-parse-options
 TEST_PROGRAMS_NEED_X += test-write-cache
 TEST_PROGRAMS_NEED_X += test-svn-fe
 TEST_PROGRAMS_NEED_X += test-tool
-TEST_PROGRAMS_NEED_X += test-wildmatch
 
 TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))
 
t/helper/test-tool.c +1 -0
index b3d84fdac9..a804e64048 100644
@@ -40,6 +40,7 @@ static struct test_cmd cmds[] = {
 	{ "submodule-config", cmd__submodule_config },
 	{ "subprocess", cmd__subprocess },
 	{ "urlmatch-normalization", cmd__urlmatch_normalization },
+	{ "wildmatch", cmd__wildmatch },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index fa53c82659..84c583e68f 100644
@@ -34,5 +34,6 @@ int cmd__string_list(int argc, const char **argv);
 int cmd__submodule_config(int argc, const char **argv);
 int cmd__subprocess(int argc, const char **argv);
 int cmd__urlmatch_normalization(int argc, const char **argv);
+int cmd__wildmatch(int argc, const char **argv);
 
 #endif
t/helper/test-wildmatch.c +2 -1
index 66d33dfcfd..2c103d1824 100644
@@ -1,6 +1,7 @@
+#include "test-tool.h"
 #include "cache.h"
 
-int cmd_main(int argc, const char **argv)
+int cmd__wildmatch(int argc, const char **argv)
 {
 	int i;
 	for (i = 2; i < argc; i++) {
t/t3070-wildmatch.sh +7 -7
index c1fc6ca730..dce102130f 100755
@@ -79,12 +79,12 @@ match_with_function() {
 	if test "$match_expect" = 1
 	then
 		test_expect_success "$match_function: match '$text' '$pattern'" "
-			test-wildmatch $match_function '$text' '$pattern'
+			test-tool wildmatch $match_function '$text' '$pattern'
 		"
 	elif test "$match_expect" = 0
 	then
 		test_expect_success "$match_function: no match '$text' '$pattern'" "
-			test_must_fail test-wildmatch $match_function '$text' '$pattern'
+			test_must_fail test-tool wildmatch $match_function '$text' '$pattern'
 		"
 	else
 		test_expect_success "PANIC: Test framework error. Unknown matches value $match_expect" 'false'
@@ -148,7 +148,7 @@ match_with_ls_files() {
 match() {
 	if test "$#" = 6
 	then
-		# When test-wildmatch and git ls-files produce the same
+		# When test-tool wildmatch and git ls-files produce the same
 		# result.
 		match_glob=$1
 		match_file_glob=$match_glob
@@ -204,19 +204,19 @@ match() {
 		fi
 	'
 
-	# $1: Case sensitive glob match: test-wildmatch & ls-files
+	# $1: Case sensitive glob match: test-tool wildmatch & ls-files
 	match_with_function "$text" "$pattern" $match_glob "wildmatch"
 	match_with_ls_files "$text" "$pattern" $match_file_glob "wildmatch" " --glob-pathspecs"
 
-	# $2: Case insensitive glob match: test-wildmatch & ls-files
+	# $2: Case insensitive glob match: test-tool wildmatch & ls-files
 	match_with_function "$text" "$pattern" $match_iglob "iwildmatch"
 	match_with_ls_files "$text" "$pattern" $match_file_iglob "iwildmatch" " --glob-pathspecs --icase-pathspecs"
 
-	# $3: Case sensitive path match: test-wildmatch & ls-files
+	# $3: Case sensitive path match: test-tool wildmatch & ls-files
 	match_with_function "$text" "$pattern" $match_pathmatch "pathmatch"
 	match_with_ls_files "$text" "$pattern" $match_file_pathmatch "pathmatch" ""
 
-	# $4: Case insensitive path match: test-wildmatch & ls-files
+	# $4: Case insensitive path match: test-tool wildmatch & ls-files
 	match_with_function "$text" "$pattern" $match_pathmatchi "ipathmatch"
 	match_with_ls_files "$text" "$pattern" $match_file_pathmatchi "ipathmatch" " --icase-pathspecs"
 }
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#103 lore raw

PATCH v2 36/36 t/helper: merge test-write-cache into test-tool

In reply to Nguyễn Thái Ngọc Duy
---
 Makefile                    | 2 +-
 t/helper/test-tool.c        | 1 +
 t/helper/test-tool.h        | 1 +
 t/helper/test-write-cache.c | 3 ++-
 t/perf/p0007-write-cache.sh | 2 +-
 5 files changed, 6 insertions(+), 3 deletions(-)
Makefile +1 -1
index 2ab76c6838..8ad9a2a1a9 100644
@@ -686,13 +686,13 @@ TEST_BUILTINS_OBJS += test-submodule-config.o
 TEST_BUILTINS_OBJS += test-subprocess.o
 TEST_BUILTINS_OBJS += test-urlmatch-normalization.o
 TEST_BUILTINS_OBJS += test-wildmatch.o
+TEST_BUILTINS_OBJS += test-write-cache.o
 
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 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-svn-fe
 TEST_PROGRAMS_NEED_X += test-tool
 
t/helper/test-tool.c +1 -0
index a804e64048..cd5e28b045 100644
@@ -41,6 +41,7 @@ static struct test_cmd cmds[] = {
 	{ "subprocess", cmd__subprocess },
 	{ "urlmatch-normalization", cmd__urlmatch_normalization },
 	{ "wildmatch", cmd__wildmatch },
+	{ "write-cache", cmd__write_cache },
 };
 
 int cmd_main(int argc, const char **argv)
t/helper/test-tool.h +1 -0
index 84c583e68f..7116ddfb94 100644
@@ -35,5 +35,6 @@ int cmd__submodule_config(int argc, const char **argv);
 int cmd__subprocess(int argc, const char **argv);
 int cmd__urlmatch_normalization(int argc, const char **argv);
 int cmd__wildmatch(int argc, const char **argv);
+int cmd__write_cache(int argc, const char **argv);
 
 #endif
t/helper/test-write-cache.c +2 -1
index b7ee039669..017dc30380 100644
@@ -1,9 +1,10 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "lockfile.h"
 
 static struct lock_file index_lock;
 
-int cmd_main(int argc, const char **argv)
+int cmd__write_cache(int argc, const char **argv)
 {
 	int i, cnt = 1, lockfd;
 	if (argc == 2)
t/perf/p0007-write-cache.sh +1 -1
index 261fe92fd9..09595264f0 100755
@@ -23,7 +23,7 @@ test_expect_success "setup repo" '
 
 count=3
 test_perf "write_locked_index $count times ($nr_files files)" "
-	test-write-cache $count
+	test-tool write-cache $count
 "
 
 test_done
Signature · 1 line
2.17.0.rc0.348.gd5a49e0b6f
#104 lore raw
In reply to Nguyễn Thái Ngọc Duy
Quoted 6 lines · Nguyễn Thái Ngọc Duy

v2 fixes a couple of typos in commit messages and use the cmd__ prefix for test commands instead of test_, which avoids a naming conflict with the existing function test_lazy_init_name_hash

[the previous v2 send out was aborted because I messed it up with some other patches]

This whole thing looks good to me, and I've applied it to my own build and run several modes (normal, split index etc.) of the test suite with it. Didn't get any problems.

Micronit: If you M-x sort-lines (and I assume similar in other editors that have a function to sort stuff in ASCII order) the test-tool.c list you get this diff on top:

    diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
    index cd5e28b045..c38939b93e 100644
    --- a/t/helper/test-tool.c
    +++ b/t/helper/test-tool.c
    @@ -32,8 +32,8 @@ static struct test_cmd cmds[] = {
            { "revision-walking", cmd__revision_walking },
            { "run-command", cmd__run_command },
            { "scrap-cache-tree", cmd__scrap_cache_tree },
    -       { "sha1-array", cmd__sha1_array },
            { "sha1", cmd__sha1 },
    +       { "sha1-array", cmd__sha1_array },
            { "sigchain", cmd__sigchain },
            { "strcmp-offset", cmd__strcmp_offset },
            { "string-list", cmd__string_list },

I think it makes sense to keep such lists in ASCII order (" before -) for subsequent edits where one or more things are added to the list and then sorted before submission.

author
#105 lore raw
Quoted 33 lines · Ævar Arnfjörð Bjarmason
Quoted 6 lines · Nguyễn Thái Ngọc Duy

v2 fixes a couple of typos in commit messages and use the cmd__ prefix for test commands instead of test_, which avoids a naming conflict with the existing function test_lazy_init_name_hash

[the previous v2 send out was aborted because I messed it up with some other patches]

This whole thing looks good to me, and I've applied it to my own build and run several modes (normal, split index etc.) of the test suite with it. Didn't get any problems.

Micronit: If you M-x sort-lines (and I assume similar in other editors that have a function to sort stuff in ASCII order) the test-tool.c list you get this diff on top:

    diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
    index cd5e28b045..c38939b93e 100644
    --- a/t/helper/test-tool.c
    +++ b/t/helper/test-tool.c
    @@ -32,8 +32,8 @@ static struct test_cmd cmds[] = {
            { "revision-walking", cmd__revision_walking },
            { "run-command", cmd__run_command },
            { "scrap-cache-tree", cmd__scrap_cache_tree },
    -       { "sha1-array", cmd__sha1_array },
            { "sha1", cmd__sha1 },
    +       { "sha1-array", cmd__sha1_array },
            { "sigchain", cmd__sigchain },
            { "strcmp-offset", cmd__strcmp_offset },
            { "string-list", cmd__string_list },
Quoted 3 lines

I think it makes sense to keep such lists in ASCII order (" before -) for subsequent edits where one or more things are added to the list and then sorted before submission.

Yeah, my brain just failed to see that sha1-array should be behind sha1. Bad brain!

Signature · 1 line
Duy
#106 lore raw
In reply to Nguyễn Thái Ngọc Duy
Quoted 6 lines · Nguyễn Thái Ngọc Duy

v2 fixes a couple of typos in commit messages and use the cmd__ prefix for test commands instead of test_, which avoids a naming conflict with the existing function test_lazy_init_name_hash

[the previous v2 send out was aborted because I messed it up with some other patches]

Yeah, I was wondering if the 7 v4 patches for --keep-pack should be picked up, or I should just wait for a proper resubmission under its own cover letter.

#107 lore raw
In reply to Nguyễn Thái Ngọc Duy

Hi Duy,

Quoted 6 lines · Nguyễn Thái Ngọc Duy

v2 fixes a couple of typos in commit messages and use the cmd__ prefix for test commands instead of test_, which avoids a naming conflict with the existing function test_lazy_init_name_hash

[the previous v2 send out was aborted because I messed it up with some other patches]

This iteration, with the SQUASH??? I proposed (and that Junio will hopefully pick up soon), works well on Windows.

Thank you,
Dscho

#108 lore raw
Quoted 2 lines · Johannes Schindelin

This iteration, with the SQUASH??? I proposed (and that Junio will hopefully pick up soon), works well on Windows.

Thanks; is that the "call it fn, as main is macro-ed away by us?" change?

#109 lore raw

Hi Junio,

Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Johannes Schindelin

This iteration, with the SQUASH??? I proposed (and that Junio will hopefully pick up soon), works well on Windows.

Thanks; is that the "call it fn, as main is macro-ed away by us?" change?

Precisely.

Thanks,
Dscho