Skip to content

Commit

Permalink
test: add one more test case to StyleRanges
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jan 14, 2025
1 parent ecc1bd0 commit 4f08a91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ranges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ func TestStyleRanges(t *testing.T) {
},
expected: "\x1b[1mHello\x1b[0m \x1b[3m你好\x1b[0m \x1b[1m世界\x1b[0m",
},
{
name: "ansi and emoji",
input: "\x1b[90m\ue615\x1b[39m \x1b[3mDownloads",
ranges: []Range{
NewRange(2, 5, NewStyle().Foreground(Color("2"))),
},
expected: "\x1b[90m\ue615\x1b[39m \x1b[3m\x1b[32mDow\x1b[0m\x1b[90m\x1b[39m\x1b[3wnloads",
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 4f08a91

Please sign in to comment.