mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Added diff2html tests, which should have been in Git already.
This commit is contained in:
parent
8c6a3358bc
commit
3c06824e3d
1 changed files with 19 additions and 0 deletions
19
test/smeagol/test/diff2html.clj
Normal file
19
test/smeagol/test/diff2html.clj
Normal file
|
|
@ -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") "<p><ins>This is a test</ins></p>")
|
||||
"Insertions should be marked as such")
|
||||
(is
|
||||
(= (mung-line "-This is a test") "<p><del>This is a test</del></p>")
|
||||
"Insertions should be marked as such")
|
||||
(is
|
||||
(= (mung-line "\\This is a test") "<p class='warn'>This is a test</p>")
|
||||
"Lines starting with a backslash are suspect")
|
||||
(is
|
||||
(= (mung-line "") "<p></p>") "Blank lines should become empty paragraphs")))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue