t/helper: merge test-prio-queue into test-tool
[git/git.git] / t / t0009-prio-queue.sh
CommitLineData
b4b594a3
JH
1#!/bin/sh
2
3test_description='basic tests for priority queue implementation'
4. ./test-lib.sh
5
6cat >expect <<'EOF'
71
82
93
104
115
125
136
147
158
169
1710
18EOF
19test_expect_success 'basic ordering' '
15b75817 20 test-tool prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
b4b594a3
JH
21 test_cmp expect actual
22'
23
24cat >expect <<'EOF'
252
263
274
281
295
306
31EOF
32test_expect_success 'mixed put and get' '
15b75817 33 test-tool prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
b4b594a3
JH
34 test_cmp expect actual
35'
36
37cat >expect <<'EOF'
381
392
40NULL
411
422
43NULL
44EOF
45test_expect_success 'notice empty queue' '
15b75817 46 test-tool prio-queue 1 2 get get get 1 2 get get get >actual &&
b4b594a3
JH
47 test_cmp expect actual
48'
49
50test_done