summaryrefslogtreecommitdiff
path: root/src/ansi_test.go
diff options
context:
space:
mode:
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 {