Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Check the commit page's parent row
The pattern also matched the commit row's link to itself, so the test
passed with no parent row at all.
Diffstat (limited to 'tests/t0106-commit.sh')
| -rwxr-xr-x | tests/t0106-commit.sh | 5 |
1 file changed, 4 insertions, 1 deletion
diff --git a/tests/t0106-commit.sh b/tests/t0106-commit.sh index 9a0a7e1..4cf361f 100755 --- a/tests/t0106-commit.sh +++ b/tests/t0106-commit.sh @@ -8,7 +8,10 @@ test_description='Check content on commit page' 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 parent link' ' + parent=$(git -C repos/foo rev-parse master~1) && + test_grep "<th scope=.row.>parent</th><td colspan=.2. class=.oid.><div class=.spanning.><a href=./foo/commit/?id=$parent.>$parent</a>" tmp +' test_expect_success 'find commit subject' ' grep "<div class=.commit-subject.>commit 5<" tmp |
