From c95cc5ec56dbb7394015eb18201403be6d80f69b Mon Sep 17 00:00:00 2001 From: John Keeping Date: Mon, 1 Apr 2013 15:09:05 +0100 Subject: 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 --- tests/t0101-index.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'tests/t0101-index.sh') diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index ab63aca..82ef9b0 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -1,18 +1,17 @@ #!/bin/sh +test_description='Check content on index page' . ./setup.sh -prepare_tests "Check content on index page" +test_expect_success 'generate index page' 'cgit_url "" >tmp' +test_expect_success 'find foo repo' 'grep "foo" tmp' +test_expect_success 'find foo description' 'grep "\[no description\]" tmp' +test_expect_success 'find bar repo' 'grep "bar" tmp' +test_expect_success 'find bar description' 'grep "the bar repo" tmp' +test_expect_success 'find foo+bar repo' 'grep ">foo+bar<" tmp' +test_expect_success 'verify foo+bar link' 'grep "/foo+bar/" tmp' +test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" tmp' +test_expect_success 'no tree-link' '! grep "foo/tree" tmp' +test_expect_success 'no log-link' '! grep "foo/log" tmp' -run_test 'generate index page' 'cgit_url "" >trash/tmp' -run_test 'find foo repo' 'grep "foo" trash/tmp' -run_test 'find foo description' 'grep "\[no description\]" trash/tmp' -run_test 'find bar repo' 'grep "bar" trash/tmp' -run_test 'find bar description' 'grep "the bar repo" trash/tmp' -run_test 'find foo+bar repo' 'grep ">foo+bar<" trash/tmp' -run_test 'verify foo+bar link' 'grep "/foo+bar/" trash/tmp' -run_test 'verify "with%20space" link' 'grep "/with%20space/" trash/tmp' -run_test 'no tree-link' '! grep "foo/tree" trash/tmp' -run_test 'no log-link' '! grep "foo/log" trash/tmp' - -tests_done +test_done -- cgit v1.2.3-59-g8ed1b