diff options
author | Alan Pearce | 2014-09-09 21:30:27 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-09 21:30:27 +0100 |
commit | fc18e6363dcb0befca0088a66284b05979ee3036 (patch) | |
tree | ee6fd5ce02fd7cfd7c3ca80fdb9534925909c924 | |
parent | 811dd1cb92a7248f16c66659c11ffd78fea3e2f6 (diff) | |
download | microformats-fc18e6363dcb0befca0088a66284b05979ee3036.tar.lz microformats-fc18e6363dcb0befca0088a66284b05979ee3036.tar.zst microformats-fc18e6363dcb0befca0088a66284b05979ee3036.zip |
Create initial test and implementation
-rw-r--r-- | src/microformats/core.clj | 6 | ||||
-rw-r--r-- | src/microformats/parser.clj | 6 | ||||
-rw-r--r-- | test/microformats/core_test.clj | 7 | ||||
-rw-r--r-- | test/microformats/parser_test.clj | 8 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/microformats/core.clj b/src/microformats/core.clj deleted file mode 100644 index 512e790..0000000 --- a/src/microformats/core.clj +++ /dev/null @@ -1,6 +0,0 @@ -(ns microformats.core) - -(defn foo - "I don't do a whole lot." - [x] - (println x "Hello, World!")) diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj new file mode 100644 index 0000000..c741549 --- /dev/null +++ b/src/microformats/parser.clj @@ -0,0 +1,6 @@ +(ns microformats.parser) + +(defn parse + "Parse a HTML string with microformats" + [html] + {:items [] :rels {}}) diff --git a/test/microformats/core_test.clj b/test/microformats/core_test.clj deleted file mode 100644 index ff74349..0000000 --- a/test/microformats/core_test.clj +++ /dev/null @@ -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)))) diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj new file mode 100644 index 0000000..5bdf9ad --- /dev/null +++ b/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 ""))))) |