diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:41:43 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:41:43 +0300 |
| commit | 6bf7c5ce92ff6237c0b17c332873805018812b40 (patch) | |
| tree | 18905aaed6af4be08f686f18aac1660f9606628d /cgit/tests/t0105-commit.sh | |
| parent | c93af47179aad2d3fae3bc756d058f3ff1a14ccf (diff) | |
| parent | e94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f (diff) | |
| download | Project-Tick-6bf7c5ce92ff6237c0b17c332873805018812b40.tar.gz Project-Tick-6bf7c5ce92ff6237c0b17c332873805018812b40.zip | |
Add 'cgit/' from commit 'e94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f'
git-subtree-dir: cgit
git-subtree-mainline: c93af47179aad2d3fae3bc756d058f3ff1a14ccf
git-subtree-split: e94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f
Diffstat (limited to 'cgit/tests/t0105-commit.sh')
| -rwxr-xr-x | cgit/tests/t0105-commit.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cgit/tests/t0105-commit.sh b/cgit/tests/t0105-commit.sh new file mode 100755 index 0000000000..1a12ee39a9 --- /dev/null +++ b/cgit/tests/t0105-commit.sh @@ -0,0 +1,36 @@ +#!/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 "<a href=./foo/tree/.>" tmp' +test_expect_success 'find parent link' 'grep -E "<a href=./foo/commit/\?id=.+>" tmp' + +test_expect_success 'find commit subject' ' + grep "<div class=.commit-subject.>commit 5<" tmp +' + +test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp' +test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" 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 "</html>" tmp +' + +test_expect_success 'root commit contains diffstat' ' + grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40,64\}.>file-1</a>" tmp +' + +test_expect_success 'root commit contains diff' ' + grep ">diff --git a/file-1 b/file-1<" tmp && + grep "<div class=.add.>+1</div>" tmp +' + +test_done |
