We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28ee2cd commit 0faad8aCopy full SHA for 0faad8a
1 file changed
src/test/clojure/clojure/data/xml/test_emit.clj
@@ -153,9 +153,11 @@
153
(deftest test-indent-str-with-doctype
154
(let [nested-xml (lazy-parse* (str "<a><b><c><d>foo</d></c></b></a>"))
155
doctype "<!DOCTYPE html>"
156
- expect (str doctype "\n<a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n")
157
- result (indent-str nested-xml :doctype doctype)]
158
- (is (= expect (subs result (.indexOf result doctype))))))
+ expect "\n<a>\n <b>\n <c>\n <d>foo</d>\n </c>\n </b>\n</a>\n"
+ result (indent-str nested-xml :doctype doctype)
+ offset-dt (.indexOf result "<!DOCTYPE")
159
+ offset-res (inc (.indexOf result ">" offset-dt))]
160
+ (is (= expect (subs result offset-res)))))
161
162
(defmacro are-serializable [group-description extra-attrs & {:as data-strings}]
163
`(testing ~group-description
0 commit comments