diff options
Diffstat (limited to 'tests/t0106-commit.sh')
-rwxr-xr-xtests/t0106-commit.sh6
1 file changed, 6 insertions, 0 deletions
diff --git a/tests/t0106-commit.sh b/tests/t0106-commit.sh
index 2b924a0..3b50c2b 100755
--- a/tests/t0106-commit.sh
+++ b/tests/t0106-commit.sh
@@ -22,6 +22,12 @@ test_expect_success 'find diff summary' '
grep "1 file changed, 1 insertion, 0 deletions" tmp
'
+# A strict CSP refuses an inline style, so the bar takes its widths from SVG
+# attributes, which also leave the page valid.
+test_expect_success 'the diffstat bar is an SVG sized by its attributes' '
+ grep "<td class=.graph.><svg viewBox=.0 0 1000 1. preserveAspectRatio=.none. aria-hidden=.true.><rect class=.add. width=.1000. height=.1./></svg></td>" 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 &&