summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFrédéric Mangano-Tarumi <fmang@mg0.fr>2020-02-02 20:25:33 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2020-02-02 20:49:16 +0100
commit81faab9978a80e1608b99b5d45456548eaf01a62 (patch)
treece9238b0ab5ec64dadf124bdd00c287757c91f78 /test
parent127bb4c84cf8584dd4ee9f544333782d386224ac (diff)
downloadaur-81faab9978a80e1608b99b5d45456548eaf01a62.tar.gz
aur-81faab9978a80e1608b99b5d45456548eaf01a62.tar.xz
rendercomment: test headings lowering
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/t2600-rendercomment.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/t2600-rendercomment.sh b/test/t2600-rendercomment.sh
index 1da422d3..1ba560af 100755
--- a/test/t2600-rendercomment.sh
+++ b/test/t2600-rendercomment.sh
@@ -129,4 +129,30 @@ test_expect_success 'Test Flyspray issue linkification.' '
test_cmp actual expected
'
+test_expect_success 'Test headings lowering.' '
+ sqlite3 aur.db <<-EOD &&
+ INSERT INTO PackageComments (ID, PackageBaseID, Comments, RenderedComment) VALUES (7, 1, "
+ # One
+ ## Two
+ ### Three
+ #### Four
+ ##### Five
+ ###### Six
+ ", "");
+ EOD
+ "$RENDERCOMMENT" 7 &&
+ cat <<-EOD >expected &&
+ <h5>One</h5>
+ <h6>Two</h6>
+ <h6>Three</h6>
+ <h6>Four</h6>
+ <h6>Five</h6>
+ <h6>Six</h6>
+ EOD
+ sqlite3 aur.db <<-EOD >actual &&
+ SELECT RenderedComment FROM PackageComments WHERE ID = 7;
+ EOD
+ test_cmp actual expected
+'
+
test_done