From 9a7112784ea22b6c5595bb9879205d073b1c4253 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 13:46:38 -0800 Subject: [PATCH] Add test to catch common errors in pronouns.tab --- test/pronouns/resource_test.clj | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/pronouns/resource_test.clj diff --git a/test/pronouns/resource_test.clj b/test/pronouns/resource_test.clj new file mode 100644 index 0000000..38ee4e3 --- /dev/null +++ b/test/pronouns/resource_test.clj @@ -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"))))