From c0b93d7ebdfd27badbb41eb62ca0bd77b0252308 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 29 May 2022 15:03:51 -0400 Subject: Support URLs for nested templates Signed-off-by: Dave Henderson --- template_windows_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'template_windows_test.go') 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) -- cgit v1.2.3