summaryrefslogtreecommitdiffstats
path: root/src/pattern_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-01-09 09:52:17 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-01-09 09:52:17 +0900
commita16d8f66a99ae365a57d114d5ee7d0a7ebc4cf5f (patch)
treea03c5b7bd5582695a7b02c828117c44e4a771e26 /src/pattern_test.go
parent45793d75c2d168d51be3578b8d785159ec81ff92 (diff)
Normalize pattern string before passing it to Algo function
Diffstat (limited to 'src/pattern_test.go')
-rw-r--r--src/pattern_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pattern_test.go b/src/pattern_test.go
index 66c0041d..ea0082f3 100644
--- a/src/pattern_test.go
+++ b/src/pattern_test.go
@@ -15,7 +15,7 @@ func init() {
}
func TestParseTermsExtended(t *testing.T) {
- terms := parseTerms(true, CaseSmart,
+ terms := parseTerms(true, CaseSmart, false,
"| aaa 'bbb ^ccc ddd$ !eee !'fff !^ggg !hhh$ | ^iii$ ^xxx | 'yyy | | zzz$ | !ZZZ |")
if len(terms) != 9 ||
terms[0][0].typ != termFuzzy || terms[0][0].inv ||
@@ -50,7 +50,7 @@ func TestParseTermsExtended(t *testing.T) {
}
func TestParseTermsExtendedExact(t *testing.T) {
- terms := parseTerms(false, CaseSmart,
+ terms := parseTerms(false, CaseSmart, false,
"aaa 'bbb ^ccc ddd$ !eee !'fff !^ggg !hhh$")
if len(terms) != 8 ||
terms[0][0].typ != termExact || terms[0][0].inv || len(terms[0][0].text) != 3 ||
@@ -66,7 +66,7 @@ func TestParseTermsExtendedExact(t *testing.T) {
}
func TestParseTermsEmpty(t *testing.T) {
- terms := parseTerms(true, CaseSmart, "' $ ^ !' !^ !$")
+ terms := parseTerms(true, CaseSmart, false, "' $ ^ !' !^ !$")
if len(terms) != 0 {
t.Errorf("%s", terms)
}