mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 08:58:28 +01:00
4f2a57fce8
- Fix bug whereby `--all` flag would conflict with pager - Fix whitespace inconsistencies among view and search outputs
12 lines
278 B
Go
12 lines
278 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\n"
|
|
if got != want {
|
|
t.Errorf("failed to indent: want: %s, got: %s", want, got)
|
|
}
|
|
}
|