#!/bin/sh test_description='Check content on commit page' . ./setup.sh test_expect_success 'generate foo/commit' 'cgit_url "foo/commit" >tmp' test_expect_success 'find tree link' 'grep "" tmp' test_expect_success 'find parent link' 'grep -E "" tmp' test_expect_success 'find commit subject' ' grep "
commit 5<" tmp ' test_expect_success 'find commit msg' 'grep "
" tmp' test_expect_success 'find diffstat' 'grep "" tmp' test_expect_success 'find diff summary' ' grep "1 files changed, 1 insertions, 0 deletions" tmp ' test_expect_success 'get root commit' ' root=$(cd repos/foo && git rev-list --reverse HEAD | head -1) && cgit_url "foo/commit&id=$root" >tmp && grep "" tmp ' test_expect_success 'root commit contains diffstat' ' grep "file-1" tmp ' test_expect_success 'root commit contains diff' ' grep ">diff --git a/file-1 b/file-1<" tmp && grep "
+1
" tmp ' test_done