summaryrefslogtreecommitdiffstats
path: root/src/ansi_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-08-02 14:00:18 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-08-02 14:00:18 +0900
commit0ea66329b84cc6e4f8ff61ee99c00bb238070247 (patch)
tree72c3bc62ec491246390b56b2aac5b33645839503 /src/ansi_test.go
parent634670e3ea51a2fa1498a3de0c074b819828e2d8 (diff)
Performance tuning - eager rune array conversion
> wc -l /tmp/list2 2594098 /tmp/list2 > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null real 0m5.418s user 0m10.990s sys 0m1.302s > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null real 0m4.862s user 0m6.619s sys 0m0.982s
Diffstat (limited to 'src/ansi_test.go')
-rw-r--r--src/ansi_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ansi_test.go b/src/ansi_test.go
index d4d3ca1e..e278fe98 100644
--- a/src/ansi_test.go
+++ b/src/ansi_test.go
@@ -17,9 +17,9 @@ func TestExtractColor(t *testing.T) {
var state *ansiState
clean := "\x1b[0m"
check := func(assertion func(ansiOffsets []ansiOffset, state *ansiState)) {
- output, ansiOffsets, newState := extractColor(&src, state)
+ output, ansiOffsets, newState := extractColor(src, state)
state = newState
- if *output != "hello world" {
+ if output != "hello world" {
t.Errorf("Invalid output: {}", output)
}
fmt.Println(src, ansiOffsets, clean)