From 3213c0c46a152e709772f0818a9281f5ce0e1988 Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Fri, 10 Oct 2014 16:23:32 +0100
Subject: Normalise parsed URLs
---
test/microformats/parser_expectations.clj | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
(limited to 'test')
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj
index 6ce942e..92e4448 100644
--- a/test/microformats/parser_expectations.clj
+++ b/test/microformats/parser_expectations.clj
@@ -157,6 +157,11 @@
(expect {:author '("http://example.com/a")}
(parse-rels (snippets "author a")))
+(expect {:author '("http://example.com/a")}
+ (parse-rels (snippets "
+
+author a")))
+
(expect {:author '("http://example.com/a" "http://example.com/b")}
(parse-rels (snippets "author a
author b")))
@@ -276,3 +281,23 @@
John Doe
Example
"))
+
+(expect {:items '({:type ("h-card") :properties {:name ("Example User") :url ("http://example.com/")}}) :rels {}}
+ (parse "
+"))
+
+(expect {:items '({:type ("h-card") :properties {:name ("Example User") :url ("http://example.com/")}}) :rels {}}
+ (parse "
+"))
+
+(expect {:items '({:type ("h-card") :properties {:name ("Example User")
+ :photo ("http://example.com/me.png")}}) :rels {}}
+ (parse "
+
+"))
+
+(expect {:items '({:type ("h-card") :properties {:name ("Example User")
+ :photo ("http://example.com/me.png")}}) :rels {}}
+ (parse "
+
+"))
--
cgit 1.4.1