summaryrefslogtreecommitdiff
path: root/tests/glaze.go
diff options
context:
space:
mode:
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()
+}