Diff options
Diffstat (limited to 'tests/t0106-commit.sh')
| -rwxr-xr-x | tests/t0106-commit.sh | 10 |
1 file changed, 9 insertions, 1 deletion
diff --git a/tests/t0106-commit.sh b/tests/t0106-commit.sh index 26ce38f..0cfc5d3 100755 --- a/tests/t0106-commit.sh +++ b/tests/t0106-commit.sh @@ -63,11 +63,19 @@ test_expect_success 'a message that is not UTF-8 has its stray bytes replaced' ' printf "committer A U Thor <author@example.com> 1735689600 +0000\n" >>raw && printf "encoding no-such-charset\n\ncaf\351 subject\n\nbody \377 end\n" >>raw && cid=$(git hash-object --literally -t commit -w raw) && - git update-ref refs/heads/latin "$cid" + git update-ref refs/heads/latin "$cid" && + printf "tree %s\nauthor A U Thor <author@example.com> 1735689600 +0000\n" "$tree" >raw && + printf "committer A U Thor <author@example.com> 1735689600 +0000\n" >>raw && + printf "\nbare caf\351 subject\n" >>raw && + cid=$(git hash-object --literally -t commit -w raw) && + git update-ref refs/heads/bare "$cid" ) && cgit_ok_url "foo/commit&h=latin" >tmp && grep "<div class=.commit-subject.>caf? subject<" tmp && grep "body ? end" tmp && + test_grep ! "caf$(printf "\351")" tmp && + cgit_ok_url "foo/commit&h=bare" >tmp && + test_grep "<div class=.commit-subject.>bare caf? subject<" tmp && test_grep ! "caf$(printf "\351")" tmp ' |
