diff options
Diffstat (limited to '')
-rwxr-xr-xtests/t0502-syntax-highlight.sh11
1 file changed, 11 insertions, 0 deletions
diff --git a/tests/t0502-syntax-highlight.sh b/tests/t0502-syntax-highlight.sh
index 31ab7e7..ced9edd 100755
--- a/tests/t0502-syntax-highlight.sh
+++ b/tests/t0502-syntax-highlight.sh
@@ -70,4 +70,15 @@ test_expect_success CGIT_LUA 'bytes between tokens reach the page escaped' '
grep "<span class=.hl-number.>42</span> &amp; " tmp
'
+test_expect_success CGIT_LUA 'a lone carriage return reaches the page as an escape' '
+ (
+ cd repos/fake &&
+ printf "if\\rzz\\n" >cr.fake &&
+ git add cr.fake &&
+ git commit -m "add a lone carriage return"
+ ) &&
+ cgit_url "fake/tree/cr.fake" >tmp &&
+ grep "<span class=.hl-keyword.>if</span><span class=.escape.>\\\\r</span>" tmp
+'
+
test_done