summaryrefslogtreecommitdiff
path: root/src/ansi_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-03-23 01:24:31 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-03-23 01:24:31 +0900
commit9d138173be9845fc7f2cbeab58b41f27a1f8043f (patch)
tree4d0961ba630cd49f7e5fffa89a58cb76f39407f9 /src/ansi_test.go
parenteae53576bd31b6583bb13efc80418d4129e1b813 (diff)
downloadfzf-9d138173be9845fc7f2cbeab58b41f27a1f8043f.tar.gz
Fix #155 - Empty ANSI color code to reset color state
Diffstat (limited to 'src/ansi_test.go')
-rw-r--r--src/ansi_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ansi_test.go b/src/ansi_test.go
index d5e0e432..be982eb4 100644
--- a/src/ansi_test.go
+++ b/src/ansi_test.go
@@ -45,6 +45,14 @@ func TestExtractColor(t *testing.T) {
assert(offsets[0], 0, 11, -1, -1, true)
})
+ src = "\x1b[1mhello \x1b[mworld"
+ check(func(offsets []ansiOffset) {
+ if len(offsets) != 1 {
+ t.Fail()
+ }
+ assert(offsets[0], 0, 6, -1, -1, true)
+ })
+
src = "hello \x1b[34;45;1mworld"
check(func(offsets []ansiOffset) {
if len(offsets) != 1 {