mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 00:31:02 -04:00
3834c605e5
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
18 lines
328 B
Go
18 lines
328 B
Go
package templates
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewParse(t *testing.T) {
|
|
tm, err := NewParse("foo", "this is a {{ . }}")
|
|
assert.NoError(t, err)
|
|
|
|
var b bytes.Buffer
|
|
assert.NoError(t, tm.Execute(&b, "string"))
|
|
want := "this is a string"
|
|
assert.Equal(t, want, b.String())
|
|
}
|