diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2019-03-30 11:57:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-30 11:57:04 -0700 |
| commit | e991f3ec7d502702e176aa57247826881ea031ab (patch) | |
| tree | 4785a66663b553060b7ab7a7913c00f8755a7283 /template_test.go | |
| parent | b4315861efc65bf4bec58b518179c055af325393 (diff) | |
Some more Windows fixes (#527)
* Some more Windows fixes
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* Upgrading xignore
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'template_test.go')
| -rw-r--r-- | template_test.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/template_test.go b/template_test.go index 24436589..10fbc417 100644 --- a/template_test.go +++ b/template_test.go @@ -1,5 +1,3 @@ -// +build !windows - package gomplate import ( @@ -60,30 +58,6 @@ func TestOpenOutFile(t *testing.T) { assert.Equal(t, Stdout, f) } -func TestWalkDir(t *testing.T) { - origfs := fs - defer func() { fs = origfs }() - fs = afero.NewMemMapFs() - - _, err := walkDir("/indir", "/outdir", nil, 0, false) - assert.Error(t, err) - - _ = fs.MkdirAll("/indir/one", 0777) - _ = fs.MkdirAll("/indir/two", 0777) - afero.WriteFile(fs, "/indir/one/foo", []byte("foo"), 0644) - afero.WriteFile(fs, "/indir/one/bar", []byte("bar"), 0644) - afero.WriteFile(fs, "/indir/two/baz", []byte("baz"), 0644) - - templates, err := walkDir("/indir", "/outdir", []string{"*/two"}, 0, false) - - assert.NoError(t, err) - assert.Equal(t, 2, len(templates)) - assert.Equal(t, "/indir/one/bar", templates[0].name) - assert.Equal(t, "/outdir/one/bar", templates[0].targetPath) - assert.Equal(t, "/indir/one/foo", templates[1].name) - assert.Equal(t, "/outdir/one/foo", templates[1].targetPath) -} - func TestLoadContents(t *testing.T) { origfs := fs defer func() { fs = origfs }() |
