summaryrefslogtreecommitdiffstats
path: root/test/t2600-rendercomment.t
diff options
context:
space:
mode:
authorKevin Morris <kevr@0cost.org>2020-12-21 09:49:15 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2021-02-20 17:52:41 +0100
commitcc0784391b5ec3f56ef51f7cb1c5c6285d673287 (patch)
tree36a105805b9b660d9bb8ae5ab51e47c8eebfcc1d /test/t2600-rendercomment.t
parent6f395d06091d98e1fe38b8cf1e343aa81775007f (diff)
downloadaur-cc0784391b5ec3f56ef51f7cb1c5c6285d673287.tar.gz
aur-cc0784391b5ec3f56ef51f7cb1c5c6285d673287.tar.xz
Makefile: run pytest units
Important note: Python tests will repeatedly clear out tables that they test against; for this reason, one should always run the shell tests first. The __init__.py file is necessary for coverage to collect data from the tests being run. At this point in FastAPI development, I'd like to encourage a few things going forward: 1. Any time you contribute to the FastAPI codebase, you **must** maintain equal or increased coverage on the overall source. Developers are highly appreciated for adding tests in your specific domain of addition or modification that may be missing coverage. Our goal is 100% coverage, and all newly added files **must** have 100% coverage through tests. 2. All source should be formatted with the autopep8 tool and kept within an 80 column width, with the exception of HTML templates. Signed-off-by: Kevin Morris <kevr@0cost.org>
Diffstat (limited to 'test/t2600-rendercomment.t')
-rwxr-xr-xtest/t2600-rendercomment.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/t2600-rendercomment.t b/test/t2600-rendercomment.t
index e01904c6..bb84fcfe 100755
--- a/test/t2600-rendercomment.t
+++ b/test/t2600-rendercomment.t
@@ -10,7 +10,7 @@ test_expect_success 'Test comment rendering.' '
INSERT INTO PackageComments (ID, PackageBaseID, Comments, RenderedComment) VALUES (1, 1, "Hello world!
This is a comment.", "");
EOD
- "$RENDERCOMMENT" 1 &&
+ cover "$RENDERCOMMENT" 1 &&
cat <<-EOD >expected &&
<p>Hello world!
This is a comment.</p>
@@ -25,7 +25,7 @@ test_expect_success 'Test Markdown conversion.' '
cat <<-EOD | sqlite3 aur.db &&
INSERT INTO PackageComments (ID, PackageBaseID, Comments, RenderedComment) VALUES (2, 1, "*Hello* [world](https://www.archlinux.org/)!", "");
EOD
- "$RENDERCOMMENT" 2 &&
+ cover "$RENDERCOMMENT" 2 &&
cat <<-EOD >expected &&
<p><em>Hello</em> <a href="https://www.archlinux.org/">world</a>!</p>
EOD
@@ -39,7 +39,7 @@ test_expect_success 'Test HTML sanitizing.' '
cat <<-EOD | sqlite3 aur.db &&
INSERT INTO PackageComments (ID, PackageBaseID, Comments, RenderedComment) VALUES (3, 1, "<script>alert(""XSS!"");</script>", "");
EOD
- "$RENDERCOMMENT" 3 &&
+ cover "$RENDERCOMMENT" 3 &&
cat <<-EOD >expected &&
&lt;script&gt;alert("XSS!");&lt;/script&gt;
EOD
@@ -61,7 +61,7 @@ test_expect_success 'Test link conversion.' '
[arch]: https://www.archlinux.org/
", "");
EOD
- "$RENDERCOMMENT" 4 &&
+ cover "$RENDERCOMMENT" 4 &&
cat <<-EOD >expected &&
<p>Visit <a href="https://www.archlinux.org/#_test_">https://www.archlinux.org/#_test_</a>.
Visit <em><a href="https://www.archlinux.org/">https://www.archlinux.org/</a></em>.
@@ -89,7 +89,7 @@ test_expect_success 'Test Git commit linkification.' '
http://example.com/$oid
", "");
EOD
- "$RENDERCOMMENT" 5 &&
+ cover "$RENDERCOMMENT" 5 &&
cat <<-EOD >expected &&
<p><a href="https://aur.archlinux.org/cgit/aur.git/log/?h=foobar&amp;id=${oid:0:12}">${oid:0:12}</a>
<a href="https://aur.archlinux.org/cgit/aur.git/log/?h=foobar&amp;id=${oid:0:7}">${oid:0:7}</a>
@@ -116,7 +116,7 @@ test_expect_success 'Test Flyspray issue linkification.' '
https://archlinux.org/?test=FS#1234
", "");
EOD
- "$RENDERCOMMENT" 6 &&
+ cover "$RENDERCOMMENT" 6 &&
cat <<-EOD >expected &&
<p><a href="https://bugs.archlinux.org/task/1234567">FS#1234567</a>.
<em><a href="https://bugs.archlinux.org/task/1234">FS#1234</a></em>
@@ -142,7 +142,7 @@ test_expect_success 'Test headings lowering.' '
###### Six
", "");
EOD
- "$RENDERCOMMENT" 7 &&
+ cover "$RENDERCOMMENT" 7 &&
cat <<-EOD >expected &&
<h5>One</h5>
<h6>Two</h6>