aboutsummaryrefslogtreecommitdiffstats
path: root/tests/t0102-summary.sh
diff options
context:
space:
mode:
authorGravatar John Keeping <john@keeping.me.uk>2013-04-01 23:09:05 (JST)
committerGravatar Jason A. Donenfeld <Jason@zx2c4.com>2013-04-09 05:27:11 (JST)
commitc95cc5ec56dbb7394015eb18201403be6d80f69b (patch)
tree7014b96a1a1408b5291532c0c442082aba693a80 /tests/t0102-summary.sh
parent8a92df033e974af6338b530a0d78d1bdb0b0f918 (diff)
downloadcgit-c95cc5ec56dbb7394015eb18201403be6d80f69b.zip
cgit-c95cc5ec56dbb7394015eb18201403be6d80f69b.tar.gz
tests: use Git's test framework
This allows tests to run in parallel as well as letting us use "prove" or another TAP harness to run the tests. Git's test framework requires Git to be fully built before letting any tests run, so add a new target to the top-level Makefile which builds all of Git instead of just libgit.a and make the "test" target depend on that. Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests/t0102-summary.sh')
-rwxr-xr-xtests/t0102-summary.sh35
1 files changed, 17 insertions, 18 deletions
diff --git a/tests/t0102-summary.sh b/tests/t0102-summary.sh
index f778cb4..b8864cb 100755
--- a/tests/t0102-summary.sh
+++ b/tests/t0102-summary.sh
@@ -1,26 +1,25 @@
1#!/bin/sh 1#!/bin/sh
2 2
3test_description='Check content on summary page'
3. ./setup.sh 4. ./setup.sh
4 5
5prepare_tests "Check content on summary page" 6test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp'
6 7test_expect_success 'find commit 1' 'grep "commit 1" tmp'
7run_test 'generate foo summary' 'cgit_url "foo" >trash/tmp' 8test_expect_success 'find commit 5' 'grep "commit 5" tmp'
8run_test 'find commit 1' 'grep "commit 1" trash/tmp' 9test_expect_success 'find branch master' 'grep "master" tmp'
9run_test 'find commit 5' 'grep "commit 5" trash/tmp' 10test_expect_success 'no tags' '! grep "tags" tmp'
10run_test 'find branch master' 'grep "master" trash/tmp' 11test_expect_success 'clone-url expanded correctly' '
11run_test 'no tags' '! grep "tags" trash/tmp' 12 grep "git://example.org/foo.git" tmp
12run_test 'clone-url expanded correctly' '
13 grep "git://example.org/foo.git" trash/tmp
14' 13'
15 14
16run_test 'generate bar summary' 'cgit_url "bar" >trash/tmp' 15test_expect_success 'generate bar summary' 'cgit_url "bar" >tmp'
17run_test 'no commit 45' '! grep "commit 45" trash/tmp' 16test_expect_success 'no commit 45' '! grep "commit 45" tmp'
18run_test 'find commit 46' 'grep "commit 46" trash/tmp' 17test_expect_success 'find commit 46' 'grep "commit 46" tmp'
19run_test 'find commit 50' 'grep "commit 50" trash/tmp' 18test_expect_success 'find commit 50' 'grep "commit 50" tmp'
20run_test 'find branch master' 'grep "master" trash/tmp' 19test_expect_success 'find branch master' 'grep "master" tmp'
21run_test 'no tags' '! grep "tags" trash/tmp' 20test_expect_success 'no tags' '! grep "tags" tmp'
22run_test 'clone-url expanded correctly' ' 21test_expect_success 'clone-url expanded correctly' '
23 grep "git://example.org/bar.git" trash/tmp 22 grep "git://example.org/bar.git" tmp
24' 23'
25 24
26tests_done 25test_done