cheat/internal/display/indent_test.go
Chris Lane aa16f68620 feat(display): add methods to display
- Add `indent`, `faint`, and `underline` methods to `display`
- Add tests for the above
2020-11-27 16:14:33 -05:00

13 lines
276 B
Go

package display
import "testing"
// TestIndent asserts that Indent prepends a tab to each line
func TestIndent(t *testing.T) {
got := Indent("foo\nbar\nbaz")
want := "\tfoo\n\tbar\n\tbaz"
if got != want {
t.Errorf("failed to indent: want: %s, got: %s", want, got)
}
}