aboutsummaryrefslogtreecommitdiffstats
path: root/util/text_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/text_test.go')
-rw-r--r--util/text_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/text_test.go b/util/text_test.go
index f7e1fabf..09b6b4d6 100644
--- a/util/text_test.go
+++ b/util/text_test.go
@@ -65,6 +65,12 @@ func TestTextWrap(t *testing.T) {
"\nfoo\nbar\n\n\nbaz\n",
4,
},
+ // Ignore complete words with terminal color sequence
+ {
+ "foo \x1b[31mbar\x1b[0m baz",
+ "foo\n\x1b[31mbar\x1b[0m\nbaz",
+ 4,
+ },
// Complete example:
{
" This is a list: \n\n\t* foo\n\t* bar\n\n\n\t* baz \nBAM ",