about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorMorgan Astra <givengravity@gmail.com>2018-11-15 22:33:16 -0800
committerGitHub <noreply@github.com>2018-11-15 22:33:16 -0800
commit26148e3c239defebfbb077d036095f737c620d95 (patch)
treee6fbd334133affe5ddbc4f5d0e74a54df0c50282 /test
parent79d239309664a8f56095289a8a3f6c377fca355f (diff)
parentd7e94fe2263bde6c4b50eda0850f4f0042e3d4c7 (diff)
Merge pull request #94 from witch-house/slash-or
Support `:or` in path, in addition to parameter
Diffstat (limited to 'test')
-rw-r--r--test/pronouns/pages_test.clj25
1 files changed, 18 insertions, 7 deletions
diff --git a/test/pronouns/pages_test.clj b/test/pronouns/pages_test.clj
index e32a2ee..7563be1 100644
--- a/test/pronouns/pages_test.clj
+++ b/test/pronouns/pages_test.clj
@@ -3,10 +3,21 @@
             [clojure.test :refer [deftest testing is are]]))
 
 (deftest prose-comma-list
-  (testing "prose-comma-list turns a list of strings into a prose list"
-    (are [call result] (= call result)
-      (pages/prose-comma-list ["foo"]) "foo"
-      (pages/prose-comma-list ["foo" "bar"]) "foo and bar"
-      (pages/prose-comma-list ["foo" "bar" "baz"]) "foo, bar, and baz"
-      (pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) "foo, bar, baz, and bobble"
-      (pages/prose-comma-list []) "")))
+  (testing "`prose-comma-list` turns a list of strings into a prose list"
+    (are [v s] (= (pages/prose-comma-list v) s)
+      ["foo" "bar" "baz" "bobble"] "foo, bar, baz, and bobble"
+      ["foo" "bar" "baz"]          "foo, bar, and baz"
+      ["foo" "bar"]                "foo and bar"
+      ["foo"]                      "foo"
+      []                           "")))
+
+(deftest lookup-pronouns
+  (are [pronoun-strs pronouns]
+      (= (pages/lookup-pronouns pronoun-strs)
+         pronouns)
+    ["she/her"]           '(["she" "her" "her" "hers" "herself"])
+    ["she" "they"]        '(["she" "her" "her" "hers" "herself"]
+                            ["they" "them" "their" "theirs" "themselves"])
+    ["she/her" "foo/bar"] '(["she" "her" "her" "hers" "herself"])
+    ["foo/bar"]           '()
+    ["a/b/c/d/e"]         '(("a" "b" "c" "d" "e"))))