github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/not-internal/logging/indent_test.go (about)

     1  package logging
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestIndent(t *testing.T) {
     8  	s := "hello\n  world\ngoodbye\n  moon"
     9  	got := Indent(s)
    10  	want := "  hello\n    world\n  goodbye\n    moon"
    11  
    12  	if got != want {
    13  		t.Errorf("wrong result\ngot:\n%s\n\nwant:\n%s", got, want)
    14  	}
    15  }