Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add tests for a few more basic features

  • Loading branch information...
commit 5ff6a80cc577558dda51cdbe4b4ec75534913627 1 parent 252925e
Alan Malloy authored
14 modules/prxml/src/test/clojure/clojure/contrib/test_prxml.clj
@@ -2,9 +2,19 @@
2 2 (:use clojure.test clojure.contrib.prxml))
3 3
4 4 (deftest prxml-basic
5   - (is (= "<p>Hello, World!</p>"
6   - (with-out-str (prxml [:p "Hello, World!"])))))
  5 + (is (= "<p id=\"test\">Hello, World!</p>"
  6 + (with-out-str (prxml [:p {:id "test"} "Hello, World!"])))))
7 7
8 8 (deftest prxml-escaping
9 9 (is (= "<a href=\"foo&amp;bar\">foo&lt;bar</a>"
10 10 (with-out-str (prxml [:a {:href "foo&bar"} "foo<bar"])))))
  11 +
  12 +(deftest prxml-pprint
  13 + (is (= "
  14 +<ol>
  15 + <li>1
  16 + </li>
  17 +</ol>"
  18 + (binding [*prxml-indent* 4]
  19 + (with-out-str
  20 + (prxml [:ol [:li 1]]))))))

0 comments on commit 5ff6a80

Please sign in to comment.
Something went wrong with that request. Please try again.