mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 03:03:32 +01:00
feat(display): add methods to display
- Add `indent`, `faint`, and `underline` methods to `display` - Add tests for the above
This commit is contained in:
14
internal/display/faint_test.go
Normal file
14
internal/display/faint_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package display
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestFaint asserts that Faint applies faint formatting
|
||||
func TestFaint(t *testing.T) {
|
||||
want := "\033[2mfoo\033[0m"
|
||||
got := Faint("foo")
|
||||
if want != got {
|
||||
t.Errorf("failed to faint: want: %s, got: %s", want, got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user