config: make empty js= omit script tag
[cgit.git] / tests / t0105-commit.sh
blob1a12ee39a9e7ba579c10f16f8e619033bd14cdf4
1 #!/bin/sh
3 test_description='Check content on commit page'
4 . ./setup.sh
6 test_expect_success 'generate foo/commit' 'cgit_url "foo/commit" >tmp'
7 test_expect_success 'find tree link' 'grep "<a href=./foo/tree/.>" tmp'
8 test_expect_success 'find parent link' 'grep -E "<a href=./foo/commit/\?id=.+>" tmp'
10 test_expect_success 'find commit subject' '
11 grep "<div class=.commit-subject.>commit 5<" tmp
14 test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp'
15 test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" tmp'
17 test_expect_success 'find diff summary' '
18 grep "1 files changed, 1 insertions, 0 deletions" tmp
21 test_expect_success 'get root commit' '
22 root=$(cd repos/foo && git rev-list --reverse HEAD | head -1) &&
23 cgit_url "foo/commit&id=$root" >tmp &&
24 grep "</html>" tmp
27 test_expect_success 'root commit contains diffstat' '
28 grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40,64\}.>file-1</a>" tmp
31 test_expect_success 'root commit contains diff' '
32 grep ">diff --git a/file-1 b/file-1<" tmp &&
33 grep "<div class=.add.>+1</div>" tmp
36 test_done