summaryrefslogtreecommitdiff
path: root/tests/glaze.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-10 21:02:25 -0300
committerEuAndreh <eu@euandre.org>2024-08-10 21:02:25 -0300
commitb03960fd93e5a1039754321a3562d48483801191 (patch)
tree65a8a41ebd07f3a46d8939863bfd4850ae4ae403 /tests/glaze.go
parentInitial implementation (diff)
downloadglaze-b03960fd93e5a1039754321a3562d48483801191.tar.gz
glaze-b03960fd93e5a1039754321a3562d48483801191.tar.xz
Build with "go tool" and remove uneeded dependencies
Diffstat (limited to 'tests/glaze.go')
-rw-r--r--tests/glaze.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/glaze.go b/tests/glaze.go
new file mode 100644
index 0000000..366efa0
--- /dev/null
+++ b/tests/glaze.go
@@ -0,0 +1,36 @@
+package glaze
+
+import (
+ g "gobang"
+)
+
+
+func test_adjustPattern() {
+ inputs := []string {
+ "",
+ "/",
+ "/*",
+ "/abc*",
+ "/abc/",
+ "/abc/*",
+ "abc/*",
+ }
+ expected := []string {
+ "{$}",
+ "/{$}",
+ "/",
+ "/abc",
+ "/abc/{$}",
+ "/abc/",
+ "abc/",
+ }
+
+ for i, input := range inputs {
+ g.AssertEqual(adjustPattern(input), expected[i])
+ }
+}
+
+
+func MainTest() {
+ test_adjustPattern()
+}