From b4649fc90597910c89c3f37a6aec9af54d9f416b Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 11 Nov 2007 00:40:58 +0100 Subject: Create initial testsuite This creates a simple testsuite, heavily inspired by the testsuite in git. Signed-off-by: Lars Hjemli --- tests/t0105-commit.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tests/t0105-commit.sh (limited to 'tests/t0105-commit.sh') diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh new file mode 100755 index 0000000..7137751 --- /dev/null +++ b/tests/t0105-commit.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +. ./setup.sh + +prepare_tests "Check content on commit page" + +run_test 'generate foo/commit' 'cgit_url "foo/commit" >trash/tmp' +run_test 'find tree link' 'grep -e "" trash/tmp' +run_test 'find parent link' 'grep -E "" trash/tmp' + +run_test 'find commit subject' ' + grep -e "
commit 5
" trash/tmp +' + +run_test 'find commit msg' 'grep -e "
" trash/tmp' +run_test 'find diffstat' 'grep -e "" trash/tmp' + +run_test 'find diff summary' ' + grep -e "1 files changed, 1 insertions, 0 deletions" trash/tmp +' + +tests_done -- cgit v1.2.3 From 2915483ef6c9c29ac1493e6945688bb62f7825b4 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 11 Nov 2007 13:04:28 +0100 Subject: Fix html error detected by test-suite Signed-off-by: Lars Hjemli --- tests/t0105-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/t0105-commit.sh') diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh index 7137751..aa2bf33 100755 --- a/tests/t0105-commit.sh +++ b/tests/t0105-commit.sh @@ -13,7 +13,7 @@ run_test 'find commit subject' ' ' run_test 'find commit msg' 'grep -e "
" trash/tmp' -run_test 'find diffstat' 'grep -e "
" trash/tmp' +run_test 'find diffstat' 'grep -e "
" trash/tmp' run_test 'find diff summary' ' grep -e "1 files changed, 1 insertions, 0 deletions" trash/tmp -- cgit v1.2.3