Preprocessor first version. Unit test covered. Nothing tested yet with real code.

This commit is contained in:
Mattias Hansson 2025-10-12 17:46:28 +02:00
parent 3e0422bf24
commit b9ec630026

View file

@ -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()