summaryrefslogtreecommitdiffstats
path: root/src/tokenizer_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-08-10 18:34:20 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-08-10 18:34:20 +0900
commit766427de0c04c64085c5ed907e3fdcc6124fa2dd (patch)
treeb131c9e5354b17c3ae976e3f3d05b7ac77cb2788 /src/tokenizer_test.go
parenta7b75c99a5c2dd76163e229a4b6f9f49401272e0 (diff)
Fix --with-nth performance; avoid regex if possible
Close #317
Diffstat (limited to 'src/tokenizer_test.go')
-rw-r--r--src/tokenizer_test.go4
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)