diff options
author | Alan Pearce | 2014-09-22 21:02:04 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-22 21:02:04 +0100 |
commit | 58552fe2b3d5953b8bcc6a97fb87dc44bda4f180 (patch) | |
tree | f5003aff037ae2b923477e5ef9f22450a2d1d953 /test | |
parent | 13937a5afe64e093072b90f4fea2b99f43bf05ed (diff) | |
download | microformats-58552fe2b3d5953b8bcc6a97fb87dc44bda4f180.tar.lz microformats-58552fe2b3d5953b8bcc6a97fb87dc44bda4f180.tar.zst microformats-58552fe2b3d5953b8bcc6a97fb87dc44bda4f180.zip |
Test + implement multi-child property parsing
Diffstat (limited to 'test')
-rw-r--r-- | test/microformats/parser_expectations.clj | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj index 93a21b0..2fc8a19 100644 --- a/test/microformats/parser_expectations.clj +++ b/test/microformats/parser_expectations.clj @@ -129,3 +129,22 @@ (expect {:items [{:type ["h-card"] :properties {:name '("Example User")}}] :rels {}} (parse "<p class=\"h-card\">Example User</p>")) + +(expect + {:items [{:type ["h-adr"], + :properties {:street-address '("665 3rd St."), + :extended-address '("Suite 207"), + :locality '("San Francisco"), + :region '("CA"), + :postal-code '("94107"), + :country-name '("U.S.A."), + :name '("665 3rd St. Suite 207 San Francisco, CA 94107 U.S.A.")}}] + :rels {}} + (parse "<p class=\"h-adr\"> +<span class=\"p-street-address\">665 3rd St.</span> +<span class=\"p-extended-address\">Suite 207</span> +<span class=\"p-locality\">San Francisco</span>, +<span class=\"p-region\">CA</span> +<span class=\"p-postal-code\">94107</span> +<span class=\"p-country-name\">U.S.A.</span> +</p>")) |