diff options
author | John Keeping | 2013-04-01 15:09:05 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2013-04-08 22:27:11 +0200 |
commit | c95cc5ec56dbb7394015eb18201403be6d80f69b (patch) | |
tree | 7014b96a1a1408b5291532c0c442082aba693a80 /tests/t0102-summary.sh | |
parent | 8a92df033e974af6338b530a0d78d1bdb0b0f918 (diff) | |
download | cgit-c95cc5ec56dbb7394015eb18201403be6d80f69b.tar.gz cgit-c95cc5ec56dbb7394015eb18201403be6d80f69b.tar.bz2 cgit-c95cc5ec56dbb7394015eb18201403be6d80f69b.zip |
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-x | tests/t0102-summary.sh | 35 |
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 | ||
3 | test_description='Check content on summary page' | ||
3 | . ./setup.sh | 4 | . ./setup.sh |
4 | 5 | ||
5 | prepare_tests "Check content on summary page" | 6 | test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp' |
6 | 7 | test_expect_success 'find commit 1' 'grep "commit 1" tmp' | |
7 | run_test 'generate foo summary' 'cgit_url "foo" >trash/tmp' | 8 | test_expect_success 'find commit 5' 'grep "commit 5" tmp' |
8 | run_test 'find commit 1' 'grep "commit 1" trash/tmp' | 9 | test_expect_success 'find branch master' 'grep "master" tmp' |
9 | run_test 'find commit 5' 'grep "commit 5" trash/tmp' | 10 | test_expect_success 'no tags' '! grep "tags" tmp' |
10 | run_test 'find branch master' 'grep "master" trash/tmp' | 11 | test_expect_success 'clone-url expanded correctly' ' |
11 | run_test 'no tags' '! grep "tags" trash/tmp' | 12 | grep "git://example.org/foo.git" tmp |
12 | run_test 'clone-url expanded correctly' ' | ||
13 | grep "git://example.org/foo.git" trash/tmp | ||
14 | ' | 13 | ' |
15 | 14 | ||
16 | run_test 'generate bar summary' 'cgit_url "bar" >trash/tmp' | 15 | test_expect_success 'generate bar summary' 'cgit_url "bar" >tmp' |
17 | run_test 'no commit 45' '! grep "commit 45" trash/tmp' | 16 | test_expect_success 'no commit 45' '! grep "commit 45" tmp' |
18 | run_test 'find commit 46' 'grep "commit 46" trash/tmp' | 17 | test_expect_success 'find commit 46' 'grep "commit 46" tmp' |
19 | run_test 'find commit 50' 'grep "commit 50" trash/tmp' | 18 | test_expect_success 'find commit 50' 'grep "commit 50" tmp' |
20 | run_test 'find branch master' 'grep "master" trash/tmp' | 19 | test_expect_success 'find branch master' 'grep "master" tmp' |
21 | run_test 'no tags' '! grep "tags" trash/tmp' | 20 | test_expect_success 'no tags' '! grep "tags" tmp' |
22 | run_test 'clone-url expanded correctly' ' | 21 | test_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 | ||
26 | tests_done | 25 | test_done |