summaryrefslogtreecommitdiff
path: root/tests/glaze.go
blob: 98bbc1ab92190c212c7650ce8f2446e9db7fc5f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.TAssertEqual(adjustPattern(input), expected[i])
	}
}


func MainTest() {
	test_adjustPattern()
}