github.com/openshift/installer@v1.4.17/pkg/lineprinter/trimmer_test.go (about) 1 package lineprinter 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestTrimmer(t *testing.T) { 10 print := &printer{} 11 trimmer := &Trimmer{WrappedPrint: print.print} 12 trimmer.Print("Hello\n", "World\n") 13 trimmer.Print(123) 14 assert.Equal( 15 t, 16 [][]interface{}{ 17 {"Hello\n", "World"}, 18 {123}, 19 }, 20 print.data, 21 ) 22 }