summaryrefslogtreecommitdiff
path: root/src/ansi_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-11-14 02:13:16 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-11-14 02:15:23 +0900
commitdc557c0d4ca3b4770757078308f966e8a90eb3c3 (patch)
tree1bd3aca717c35d8210b79939697ed4ee4bdad0b7 /src/ansi_test.go
parenta2beb159f1757961f1314b2739b5707ea2af2ea0 (diff)
downloadfzf-dc557c0d4ca3b4770757078308f966e8a90eb3c3.tar.gz
Update ANSI processor to handle more VT-100 escape sequences
The updated regular expression should include not all but most of the frequently used ANSI sequences. Close #735.
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 3afcc6c5..a5366770 100644
--- a/src/ansi_test.go
+++ b/src/ansi_test.go
@@ -26,7 +26,7 @@ func TestExtractColor(t *testing.T) {
output, ansiOffsets, newState := extractColor(src, state, nil)
state = newState
if output != "hello world" {
- t.Errorf("Invalid output: {}", output)
+ t.Errorf("Invalid output: %s %s", output, []rune(output))
}
fmt.Println(src, ansiOffsets, clean)
assertion(ansiOffsets, state)
@@ -56,7 +56,7 @@ func TestExtractColor(t *testing.T) {
})
state = nil
- src = "\x1b[1mhello \x1b[mworld"
+ src = "\x1b[1mhello \x1b[mw\x1b7o\x1b8r\x1b(Bl\x1b[2@d"
check(func(offsets *[]ansiOffset, state *ansiState) {
if len(*offsets) != 1 {
t.Fail()