cgitsb/tests/t0102-summary.sh
John Keeping c95cc5ec56 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>
2013-04-08 22:27:11 +02:00

26 lines
920 B
Bash
Executable File

#!/bin/sh
test_description='Check content on summary page'
. ./setup.sh
test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp'
test_expect_success 'find commit 1' 'grep "commit 1" tmp'
test_expect_success 'find commit 5' 'grep "commit 5" tmp'
test_expect_success 'find branch master' 'grep "master" tmp'
test_expect_success 'no tags' '! grep "tags" tmp'
test_expect_success 'clone-url expanded correctly' '
grep "git://example.org/foo.git" tmp
'
test_expect_success 'generate bar summary' 'cgit_url "bar" >tmp'
test_expect_success 'no commit 45' '! grep "commit 45" tmp'
test_expect_success 'find commit 46' 'grep "commit 46" tmp'
test_expect_success 'find commit 50' 'grep "commit 50" tmp'
test_expect_success 'find branch master' 'grep "master" tmp'
test_expect_success 'no tags' '! grep "tags" tmp'
test_expect_success 'clone-url expanded correctly' '
grep "git://example.org/bar.git" tmp
'
test_done