diff options
| author | ben dewan <bdewan@us.ibm.com> | 2018-04-23 13:19:38 -0400 |
|---|---|---|
| committer | ben dewan <bdewan@us.ibm.com> | 2018-04-23 13:19:38 -0400 |
| commit | aedc3c841feab0b679327074f5fdb5b63061f58b (patch) | |
| tree | 12293151141d035e6118aa8813d8cb24940f3daf /template_test.go | |
| parent | 13cef445dde00407938fb8e963a56bb7c4434f7e (diff) | |
Writing output files from a stdin template requires permissions
This fixes #304
Diffstat (limited to 'template_test.go')
| -rw-r--r-- | template_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/template_test.go b/template_test.go index a58b0e22..721ba4a5 100644 --- a/template_test.go +++ b/template_test.go @@ -160,6 +160,15 @@ func TestGatherTemplates(t *testing.T) { assert.Equal(t, Stdout, templates[0].target) templates, err = gatherTemplates(&Config{ + Input: "foo", + OutputFiles: []string{"out"}, + }) + assert.NoError(t, err) + assert.Len(t, templates, 1) + assert.Equal(t, "out", templates[0].targetPath) + assert.Equal(t, os.FileMode(0644), templates[0].mode) + + templates, err = gatherTemplates(&Config{ InputFiles: []string{"foo"}, OutputFiles: []string{"out"}, }) |
