diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Cut text between characters, never inside one
The index description was cut at a byte count, which could split a
multibyte character and leave an invalid sequence on the page. Commit
subjects already backed up to the start of the character, so html_ntxt
now does that for every caller.
Diffstat (limited to 'tests/t0103-log.sh')
| -rwxr-xr-x | tests/t0103-log.sh | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index ed92a76..f9612e6 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -91,4 +91,14 @@ test_expect_success 'the pager of a followed log keeps the name followed' ' grep "href=./fol/log/b.txt?ofs=6&follow=1.>\[next\]" tmp ' +test_expect_success 'a cut subject keeps whole characters' ' + git -C repos/foo commit --allow-empty -m "日本語の説明文です日本語の説明文です" && + { + echo "max-message-length=20" && + sed "s/^cache-size=.*/cache-size=0/" cgitrc + } >subjectrc && + CGIT_CONFIG="$PWD/subjectrc" QUERY_STRING="url=foo/log/" cgit >tmp && + grep ">日本語の説\.\.\.</a>" tmp +' + test_done |
