summaryrefslogtreecommitdiff
path: root/gomplate_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'gomplate_test.go')
-rw-r--r--gomplate_test.go26
1 files changed, 1 insertions, 25 deletions
diff --git a/gomplate_test.go b/gomplate_test.go
index 3121aa55..5bb7c69d 100644
--- a/gomplate_test.go
+++ b/gomplate_test.go
@@ -165,7 +165,7 @@ func TestRunTemplates(t *testing.T) {
defer func() { Stdout = os.Stdout }()
buf := &bytes.Buffer{}
Stdout = &nopWCloser{buf}
- config := &Config{Input: "foo"}
+ config := &Config{Input: "foo", OutputFiles: []string{"-"}}
err := RunTemplates(config)
assert.NoError(t, err)
assert.Equal(t, "foo", buf.String())
@@ -174,30 +174,6 @@ func TestRunTemplates(t *testing.T) {
assert.Equal(t, 0, Metrics.Errors)
}
-func TestConfigString(t *testing.T) {
- c := &Config{}
-
- expected := `input:
-output:
-left_delim:
-right_delim: `
-
- assert.Equal(t, expected, c.String())
-
- c = &Config{
- LDelim: "{{",
- RDelim: "}}",
- Input: "{{ foo }}",
- OutputFiles: []string{"-"},
- Templates: []string{"foo=foo.t", "bar=bar.t"},
- }
- expected = `input: <arg>
-output: -
-templates: foo=foo.t, bar=bar.t`
-
- assert.Equal(t, expected, c.String())
-}
-
func TestParseTemplateArg(t *testing.T) {
fs = afero.NewMemMapFs()
afero.WriteFile(fs, "foo.t", []byte("hi"), 0600)