Permalink
Browse files

Removed tests for unsupported features

  • Loading branch information...
1 parent c69b06d commit d52518ab792caf6a701e2212b54f2858d38d1720 @senior senior committed Jan 19, 2012
@@ -44,41 +44,6 @@
{:single "'single'quotes'here"
:double "\"double\"quotes\"here\""}))))))
-;; Commenting because it doesn't look to be supported by the XMLStreamWriter
-#_(deftest without-decl
- (let [expect (str "<a h=\"1\" i=\"2\" j=\"3\">"
- " t1<b k=\"4\">t2</b>"
- " t3<c>t4</c>"
- " t5<d>t6</d>"
- " t7<e l=\"5\" m=\"6\">"
- " t8<f>t10</f>t11</e>"
- " t12<g>t13</g>t14"
- "</a>")]
- (is (= expect (with-out-str (xml/emit deep-tree
- :xml-declaration false))))))
-
-;; Commenting for now because the new data.xml doesn't support
-;; indentation yet
-#_(deftest indent
- (let [input-tree
- (lazy-parse* (str "<a h=\"1\" i=\"2\" j=\"3\">"
- "<b k=\"4\">t2</b>"
- "<c>t4</c>t5<d>t6</d>"
- "<e l=\"5\" m=\"6\">"
- " <f>t10</f>t11</e>"
- "<g>t13</g>t14"
- "</a>"))
- expect (str "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<a h=\"1\" i=\"2\" j=\"3\">\n"
- " <b k=\"4\">t2</b>\n"
- " <c>t4</c>t5<d>t6</d>\n"
- " <e l=\"5\" m=\"6\">\n"
- " <f>t10</f>t11</e>\n"
- " <g>t13</g>t14</a>\n")]
- (is (= expect (with-out-str
- (xml/emit input-tree :indent 3))))))
-
-
(defn emit-char-seq [xml-tree encoding]
(with-open [bos (java.io.ByteArrayOutputStream.)
stream (java.io.OutputStreamWriter. bos encoding)]
@@ -56,18 +56,4 @@
expected (element :comment {} (element :is {}
(element :here {}
"there")))]
- (is (= expected (lazy-parse* input)))) )
-
-#_(deftest source-seq-release-head
- (doseq [func [xml/source-seq xml/lazy-source-seq]]
- (let [event1 (atom (xml/event :start-element :foo))
- weak (java.lang.ref.WeakReference. @event1)]
- (with-redefs [xml/fill-from-sax
- (fn [src strt fill]
- (fill @event1)
- (fill (xml/event :end-element :foo)))]
- (let [more (rest (func nil nil))]
- (reset! event1 nil)
- (System/gc)
- (is (= nil (.get weak))))))))
-
+ (is (= expected (lazy-parse* input)))))

0 comments on commit d52518a

Please sign in to comment.