diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-08-10 18:34:20 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-08-10 18:34:20 +0900 |
commit | 766427de0c04c64085c5ed907e3fdcc6124fa2dd (patch) | |
tree | b131c9e5354b17c3ae976e3f3d05b7ac77cb2788 /src/tokenizer_test.go | |
parent | a7b75c99a5c2dd76163e229a4b6f9f49401272e0 (diff) |
Fix --with-nth performance; avoid regex if possible
Close #317
Diffstat (limited to 'src/tokenizer_test.go')
-rw-r--r-- | src/tokenizer_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer_test.go b/src/tokenizer_test.go index 06603ae9..61017b8c 100644 --- a/src/tokenizer_test.go +++ b/src/tokenizer_test.go @@ -43,7 +43,7 @@ func TestParseRange(t *testing.T) { func TestTokenize(t *testing.T) { // AWK-style input := " abc: def: ghi " - tokens := Tokenize([]rune(input), nil) + tokens := Tokenize([]rune(input), Delimiter{}) if string(tokens[0].text) != "abc: " || tokens[0].prefixLength != 2 { t.Errorf("%s", tokens) } @@ -58,7 +58,7 @@ func TestTokenize(t *testing.T) { func TestTransform(t *testing.T) { input := " abc: def: ghi: jkl" { - tokens := Tokenize([]rune(input), nil) + tokens := Tokenize([]rune(input), Delimiter{}) { ranges := splitNth("1,2,3") tx := Transform(tokens, ranges) |