diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-05-29 15:03:51 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2022-05-30 14:06:32 -0400 |
| commit | c0b93d7ebdfd27badbb41eb62ca0bd77b0252308 (patch) | |
| tree | 2f3b3e17023f4819cf69dee8953ea44463588bae /template_unix_test.go | |
| parent | 9ae9a6a5182342f775383646058807222947f483 (diff) | |
Support URLs for nested templates
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'template_unix_test.go')
| -rw-r--r-- | template_unix_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/template_unix_test.go b/template_unix_test.go index 2cfce793..94e3e206 100644 --- a/template_unix_test.go +++ b/template_unix_test.go @@ -14,20 +14,20 @@ import ( func TestWalkDir(t *testing.T) { ctx := context.Background() - origfs := fs - defer func() { fs = origfs }() - fs = afero.NewMemMapFs() + origfs := aferoFS + defer func() { aferoFS = origfs }() + aferoFS = afero.NewMemMapFs() cfg := &config.Config{} _, err := walkDir(ctx, cfg, "/indir", simpleNamer("/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"), 0664) - afero.WriteFile(fs, "/indir/two/baz", []byte("baz"), 0644) + _ = aferoFS.MkdirAll("/indir/one", 0777) + _ = aferoFS.MkdirAll("/indir/two", 0777) + afero.WriteFile(aferoFS, "/indir/one/foo", []byte("foo"), 0644) + afero.WriteFile(aferoFS, "/indir/one/bar", []byte("bar"), 0664) + afero.WriteFile(aferoFS, "/indir/two/baz", []byte("baz"), 0644) templates, err := walkDir(ctx, cfg, "/indir", simpleNamer("/outdir"), []string{"*/two"}, 0, false) |
