diff options
author | Alan Pearce | 2014-09-12 20:52:00 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-12 20:52:00 +0100 |
commit | f42e0bc7576bf3a4ddca02579f98b9fa19952ae0 (patch) | |
tree | 601d41ce937865b58e488a6a35055a2b5168cd91 /test | |
parent | 90d4ef777d61af7ad1990e9b3a65e42f591ed1ce (diff) | |
download | microformats-f42e0bc7576bf3a4ddca02579f98b9fa19952ae0.tar.lz microformats-f42e0bc7576bf3a4ddca02579f98b9fa19952ae0.tar.zst microformats-f42e0bc7576bf3a4ddca02579f98b9fa19952ae0.zip |
Add support for parsing empty br/hr tags
Diffstat (limited to 'test')
-rw-r--r-- | test/microformats/parser_test.clj | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj index d9942f4..1de377c 100644 --- a/test/microformats/parser_test.clj +++ b/test/microformats/parser_test.clj @@ -29,3 +29,13 @@ {:items [{:properties {:name "Example User"}}] :rels {}} "<div class=\"h-card\"><data class=\"p-name\" value=\"Example User\"></data></div>" ))) + +(deftest parse-p-empty-br-hr + (testing "br and hr tags should return empty strings" + (are [ex in] (= ex (parse in)) + {:items [{:properties {:name ""}}] :rels {}} + "<div class=\"h-card\"><br class=\"p-name\"/></div>" + + {:items [{:properties {:name ""}}] :rels {}} + "<div class=\"h-card\"><hr class=\"p-name\"/></div>") + )) |