From b03960fd93e5a1039754321a3562d48483801191 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 10 Aug 2024 21:02:25 -0300 Subject: Build with "go tool" and remove uneeded dependencies --- tests/glaze.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/glaze.go (limited to 'tests/glaze.go') 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() +} -- cgit v1.2.3