From b9ec63002658d82c1fd477445b5e77f7a0c344b7 Mon Sep 17 00:00:00 2001 From: Mattias Hansson Date: Sun, 12 Oct 2025 17:46:28 +0200 Subject: [PATCH] Preprocessor first version. Unit test covered. Nothing tested yet with real code. --- internal/preproc/filereader_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/preproc/filereader_test.go b/internal/preproc/filereader_test.go index bd0f472..76c4e60 100644 --- a/internal/preproc/filereader_test.go +++ b/internal/preproc/filereader_test.go @@ -8,10 +8,10 @@ import ( func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) { origPath := os.Getenv("C65LIBPATH") - defer os.Setenv("C65LIBPATH", origPath) + defer func() { _ = os.Setenv("C65LIBPATH", origPath) }() libPath, _ := filepath.Abs("filereader_mocks/lib") - os.Setenv("C65LIBPATH", libPath) + _ = os.Setenv("C65LIBPATH", libPath) // Now create reader reader := NewDiskFileReader() @@ -54,9 +54,9 @@ func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) { func TestDiskFileReader_ReadLines_LibraryWithoutEnv(t *testing.T) { origPath := os.Getenv("C65LIBPATH") - defer os.Setenv("C65LIBPATH", origPath) + defer func() { _ = os.Setenv("C65LIBPATH", origPath) }() - os.Setenv("C65LIBPATH", "") + _ = os.Setenv("C65LIBPATH", "") // Now create reader reader := NewDiskFileReader()