1
1
mirror of https://github.com/walles/moar.git synced 2024-11-25 19:56:20 +03:00
moar/twin/styles_test.go
2024-08-12 18:36:49 +02:00

18 lines
314 B
Go
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package twin
import (
"strings"
"testing"
"gotest.tools/v3/assert"
)
func TestHyperlinkToNormal(t *testing.T) {
url := "http://example.com"
style := StyleDefault.WithHyperlink(&url)
assert.Equal(t,
strings.ReplaceAll(StyleDefault.RenderUpdateFrom(style, ColorCount16), "", "ESC"),
"ESC]8;;ESC\\")
}