all repos — archive/microformats @ fc18e6363dcb0befca0088a66284b05979ee3036

Incomplete Clojure microformats library

Create initial test and implementation

Alan Pearce
commit

fc18e6363dcb0befca0088a66284b05979ee3036

parent

811dd1cb92a7248f16c66659c11ffd78fea3e2f6

4 files changed, 14 insertions(+), 13 deletions(-)

jump to
D src/microformats/core.clj
@@ -1,6 +0,0 @@
-(ns microformats.core) - -(defn foo - "I don't do a whole lot." - [x] - (println x "Hello, World!"))
A src/microformats/parser.clj
@@ -0,0 +1,6 @@
+(ns microformats.parser) + +(defn parse + "Parse a HTML string with microformats" + [html] + {:items [] :rels {}})
D test/microformats/core_test.clj
@@ -1,7 +0,0 @@
-(ns microformats.core-test - (:require [clojure.test :refer :all] - [microformats.core :refer :all])) - -(deftest a-test - (testing "FIXME, I fail." - (is (= 0 1))))
A test/microformats/parser_test.clj
@@ -0,0 +1,8 @@
+(ns microformats.parser-test + (:require [clojure.test :refer :all] + [microformats.core :refer :all])) + +(deftest empty-document + (testing "Empty HTML document should return an empty 'items' array and 'rels' hash." + (is (= {:items [] :rels {}} + (parse "")))))