summaryrefslogtreecommitdiff
path: root/internal/plural/plural_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/plural/plural_test.go')
-rw-r--r--internal/plural/plural_test.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/internal/plural/plural_test.go b/internal/plural/plural_test.go
new file mode 100644
index 0000000..15939f7
--- /dev/null
+++ b/internal/plural/plural_test.go
@@ -0,0 +1,34 @@
+package plural
+
+import "testing"
+
+func TestPlural(t *testing.T) {
+ testCases := map[string]string{
+ "funny": "funnies",
+ "musmus": "musmi",
+ "much": "muches",
+ "mux": "muxes",
+ "fif": "fives",
+ "heman": "hemen",
+ "Wo Man": "Wo Men",
+ "else": "elses",
+ "usas": "usases",
+ "nismus": "nismi",
+ }
+ for k, v := range testCases {
+ if r := Plural(k); r != v {
+ t.Errorf("got %v, want %v", r, v)
+ }
+ }
+}
+
+func TestIndefinite(t *testing.T) {
+ testCases := map[string]string{
+ "abachus": "an abachi",
+ }
+ for k, v := range testCases {
+ if r := Indefinite(k, 2); r != v {
+ t.Errorf("got %v, want %v", r, v)
+ }
+ }
+}