gtx


Branch: develop

Author
thewhodidthis <thewhodidthis@fastmail.com>
Date
Nov. 24 '22 18:55:50
Commit
04552d55214d5a028616d333bb656ec4ad8015f2
Parent
185f1a5e1f7c8d1091bfb379ec840e1843a580c7
Changes
diff --git a/helper_test.go b/helper_test.go
new file mode 100644
index 0000000..f62d053
--- /dev/null
+++ b/helper_test.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+	"strings"
+	"testing"
+)
+
+func TestContains(t *testing.T) {
+	words := strings.Fields("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")
+
+	for _, w := range words {
+		match := contains(words, w)
+
+		if !match {
+			t.Errorf("failed to match %v", w)
+			t.Fail()
+		}
+	}
+}