diff options
author | Alan Pearce | 2014-10-10 15:53:30 +0100 |
---|---|---|
committer | Alan Pearce | 2014-10-10 16:10:09 +0100 |
commit | 062fcf6126c71601fa677bfab13bacdab78ec857 (patch) | |
tree | f6e03079d392a3c00650a7453705104aa1d38d28 /test | |
parent | bd5a901a5081d01df16ab3a750fdfa403391b3d2 (diff) | |
download | microformats-062fcf6126c71601fa677bfab13bacdab78ec857.tar.lz microformats-062fcf6126c71601fa677bfab13bacdab78ec857.tar.zst microformats-062fcf6126c71601fa677bfab13bacdab78ec857.zip |
Add function to normalise a URL
Diffstat (limited to 'test')
-rw-r--r-- | test/microformats/parser_expectations.clj | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj index 7344fde..0e72e10 100644 --- a/test/microformats/parser_expectations.clj +++ b/test/microformats/parser_expectations.clj @@ -54,6 +54,12 @@ (expect "http://example.com" (get-base-url (snippet "<head><base href=\"http://example.com\"></head>"))) +(expect "/" + (normalise-url (snippet "<head></head>") "/")) + +(expect "http://example.com/" + (normalise-url (snippet "<head><base href=\"http://example.com\"></head>") "/")) + (expect {:name '("Name")} (parse-p (snippet "<p class=\"p-name\"><span class=\"value\">Name</span></p>"))) |