From 9fae4b6dfabc7485a8a2debf108d8190761590f5 Mon Sep 17 00:00:00 2001 From: Asko Nomm Date: Sat, 9 Apr 2022 19:32:05 +0200 Subject: Fix #8: Links break textual checkboxes --- test/clarktown/parsers/link_and_image_test.clj | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/clarktown/parsers/link_and_image_test.clj (limited to 'test/clarktown') diff --git a/test/clarktown/parsers/link_and_image_test.clj b/test/clarktown/parsers/link_and_image_test.clj new file mode 100644 index 0000000..eadfc58 --- /dev/null +++ b/test/clarktown/parsers/link_and_image_test.clj @@ -0,0 +1,20 @@ +(ns clarktown.parsers.link-and-image-test + (:require + [clojure.test :refer [deftest testing is]] + [clarktown.parsers.link-and-image :as link-and-image])) + + +(deftest link-test + (testing "Creating a link" + (is (= (link-and-image/render "[This is a link.](https://example.com)" nil) + "This is a link.")) + + (is (= (link-and-image/render "[x] [label](link)" nil) + "[x] label")) + + (is (= (link-and-image/render "[ ] [label](link)" nil) + "[ ] label"))) + + (testing "Creating an image" + (is (= (link-and-image/render "![This is an image](https://example.com)" nil) + "\"This")))) \ No newline at end of file -- cgit v1.2.3