Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-24 10:44:50 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-27 18:45:47 +0300
commit15b75817765be6d641590c69b6d42324147b293d (patch)
tree175ebb35c3774f1cf4c8def884d581beb045f82f /t
parentb8d5cf4f96f6e57ddc91dfcc530e47c878aff598 (diff)
t/helper: merge test-prio-queue 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>
Diffstat (limited to 't')
-rw-r--r--t/helper/test-prio-queue.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rwxr-xr-xt/t0009-prio-queue.sh6
4 files changed, 7 insertions, 4 deletions
diff --git a/t/helper/test-prio-queue.c b/t/helper/test-prio-queue.c
index ae58fff359..9807b649b1 100644
--- a/t/helper/test-prio-queue.c
+++ b/t/helper/test-prio-queue.c
@@ -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 };
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index baec861cc2..64af0bbe94 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -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 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 3b7ced01f5..900c96dc02 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -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
diff --git a/t/t0009-prio-queue.sh b/t/t0009-prio-queue.sh
index 94045c3fad..e56dfce668 100755
--- a/t/t0009-prio-queue.sh
+++ b/t/t0009-prio-queue.sh
@@ -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
'