mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 08:58:28 +01:00
aa16f68620
- Add `indent`, `faint`, and `underline` methods to `display` - Add tests for the above
14 lines
285 B
Go
14 lines
285 B
Go
package display
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// TestUnderline asserts that Underline applies underline formatting
|
|
func TestUnderline(t *testing.T) {
|
|
want := "\033[4mfoo\033[0m"
|
|
got := Underline("foo")
|
|
if want != got {
|
|
t.Errorf("failed to underline: want: %s, got: %s", want, got)
|
|
}
|
|
}
|