From 3c06824e3d4c9e42eab0e7c002ecc4701009da4b Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 21 Aug 2016 10:44:56 +0100 Subject: [PATCH] Added diff2html tests, which should have been in Git already. --- test/smeagol/test/diff2html.clj | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/smeagol/test/diff2html.clj diff --git a/test/smeagol/test/diff2html.clj b/test/smeagol/test/diff2html.clj new file mode 100644 index 0000000..bd77216 --- /dev/null +++ b/test/smeagol/test/diff2html.clj @@ -0,0 +1,19 @@ +(ns smeagol.test.diff2html + (:use clojure.test + ring.mock.request + smeagol.diff2html)) + +(deftest test-mung-line + (testing "conversion of individual lines" + (is + (= (mung-line "+This is a test") "

This is a test

") + "Insertions should be marked as such") + (is + (= (mung-line "-This is a test") "

This is a test

") + "Insertions should be marked as such") + (is + (= (mung-line "\\This is a test") "

This is a test

") + "Lines starting with a backslash are suspect") + (is + (= (mung-line "") "

") "Blank lines should become empty paragraphs"))) +