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
261 B
Go
14 lines
261 B
Go
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)
|
|
}
|
|
}
|