Add test to catch common errors in pronouns.tab
This commit is contained in:
parent
52a5a3f6ab
commit
9a7112784e
12
test/pronouns/resource_test.clj
Normal file
12
test/pronouns/resource_test.clj
Normal file
@ -0,0 +1,12 @@
|
||||
(ns pronouns.resource-test
|
||||
(:require [pronouns.util :as util]
|
||||
[clojure.test :refer [deftest testing is]]))
|
||||
|
||||
(deftest valid-pronouns-table
|
||||
(let [table (util/slurp-tabfile "resources/pronouns.tab")]
|
||||
(is table "pronouns.tab exists and is non-empty")
|
||||
(doseq [row table]
|
||||
(is (= (count row) 5)
|
||||
"row has five elements")
|
||||
(is (re-matches #".*sel(f|ves)$" (last row))
|
||||
"final element is reflexive"))))
|
Loading…
Reference in New Issue
Block a user