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_windows_test.go | |
| parent | 9ae9a6a5182342f775383646058807222947f483 (diff) | |
Support URLs for nested templates
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'template_windows_test.go')
| -rw-r--r-- | template_windows_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/template_windows_test.go b/template_windows_test.go index 3990aa9f..00374e2c 100644 --- a/template_windows_test.go +++ b/template_windows_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, `C:\indir`, simpleNamer(`C:\outdir`), nil, 0, false) assert.Error(t, err) - _ = fs.MkdirAll(`C:\indir\one`, 0777) - _ = fs.MkdirAll(`C:\indir\two`, 0777) - afero.WriteFile(fs, `C:\indir\one\foo`, []byte("foo"), 0644) - afero.WriteFile(fs, `C:\indir\one\bar`, []byte("bar"), 0644) - afero.WriteFile(fs, `C:\indir\two\baz`, []byte("baz"), 0644) + _ = aferoFS.MkdirAll(`C:\indir\one`, 0777) + _ = aferoFS.MkdirAll(`C:\indir\two`, 0777) + afero.WriteFile(aferoFS, `C:\indir\one\foo`, []byte("foo"), 0644) + afero.WriteFile(aferoFS, `C:\indir\one\bar`, []byte("bar"), 0644) + afero.WriteFile(aferoFS, `C:\indir\two\baz`, []byte("baz"), 0644) templates, err := walkDir(ctx, cfg, `C:\indir`, simpleNamer(`C:\outdir`), []string{`*\two`}, 0, false) |
