diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index 3341fb799..c9aad096d 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -61,13 +61,13 @@ func TestCompiler(t *testing.T) { require.NoError(t, err) err = os.MkdirAll(exampleSavePath, os.ModePerm) require.NoError(t, err) - outfile := exampleSavePath + "/test.nef" - _, err = compiler.CompileAndSave(exampleCompilePath+"/"+infos[0].Name(), &compiler.Options{Outfile: outfile}) - require.NoError(t, err) defer func() { err := os.RemoveAll(exampleSavePath) require.NoError(t, err) }() + outfile := exampleSavePath + "/test.nef" + _, err = compiler.CompileAndSave(exampleCompilePath+"/"+infos[0].Name(), &compiler.Options{Outfile: outfile}) + require.NoError(t, err) }, }, }