mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
13 lines
276 B
Go
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)
|
||
|
}
|
||
|
}
|