about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorAlan Pearce2014-09-15 21:14:09 +0100
committerAlan Pearce2014-09-15 21:14:09 +0100
commitad7798bf10d8cc64f28a6bcdd1e83e1ae77cc14e (patch)
tree7a323e0c52672b6f783e51a4a51fb970d0f48ee2 /test
parentc2d85f7328e7d08de1405638748d3c78ce833cc3 (diff)
downloadmicroformats-ad7798bf10d8cc64f28a6bcdd1e83e1ae77cc14e.tar.lz
microformats-ad7798bf10d8cc64f28a6bcdd1e83e1ae77cc14e.tar.zst
microformats-ad7798bf10d8cc64f28a6bcdd1e83e1ae77cc14e.zip
Implement some basic value-class parsing
Diffstat (limited to 'test')
-rw-r--r--test/microformats/parser_expectations.clj6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj
index 0602119..9c8ce1d 100644
--- a/test/microformats/parser_expectations.clj
+++ b/test/microformats/parser_expectations.clj
@@ -12,6 +12,12 @@
 (expect "Foo <strong>bar</strong>"
         (apply str (#'microformats.parser/node-to-html '("Foo " {:tag :strong, :attrs nil, :content ("bar")}))))
 
+(expect {:name "Name"}
+        (parse-p (first (html-snippet "<p class=\"p-name\"><span class=\"value\">Name</span></p>"))))
+
+(expect {:name "Name Endname"}
+        (parse-p (first (html-snippet "<p class=\"p-name\"><span class=\"value\">Name</span> (this should not be included) <span class=\"value\">Endname</span></p>"))))
+
 (expect {:name "Example User"}
         (parse-p (first (html-snippet "<p class=\"p-name\">Example User</p>"))))