Preprocessor first version. Unit test covered. Nothing tested yet with real code.
This commit is contained in:
parent
3e0422bf24
commit
b9ec630026
1 changed files with 4 additions and 4 deletions
|
|
@ -8,10 +8,10 @@ import (
|
||||||
|
|
||||||
func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) {
|
func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) {
|
||||||
origPath := os.Getenv("C65LIBPATH")
|
origPath := os.Getenv("C65LIBPATH")
|
||||||
defer os.Setenv("C65LIBPATH", origPath)
|
defer func() { _ = os.Setenv("C65LIBPATH", origPath) }()
|
||||||
|
|
||||||
libPath, _ := filepath.Abs("filereader_mocks/lib")
|
libPath, _ := filepath.Abs("filereader_mocks/lib")
|
||||||
os.Setenv("C65LIBPATH", libPath)
|
_ = os.Setenv("C65LIBPATH", libPath)
|
||||||
|
|
||||||
// Now create reader
|
// Now create reader
|
||||||
reader := NewDiskFileReader()
|
reader := NewDiskFileReader()
|
||||||
|
|
@ -54,9 +54,9 @@ func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) {
|
||||||
|
|
||||||
func TestDiskFileReader_ReadLines_LibraryWithoutEnv(t *testing.T) {
|
func TestDiskFileReader_ReadLines_LibraryWithoutEnv(t *testing.T) {
|
||||||
origPath := os.Getenv("C65LIBPATH")
|
origPath := os.Getenv("C65LIBPATH")
|
||||||
defer os.Setenv("C65LIBPATH", origPath)
|
defer func() { _ = os.Setenv("C65LIBPATH", origPath) }()
|
||||||
|
|
||||||
os.Setenv("C65LIBPATH", "")
|
_ = os.Setenv("C65LIBPATH", "")
|
||||||
|
|
||||||
// Now create reader
|
// Now create reader
|
||||||
reader := NewDiskFileReader()
|
reader := NewDiskFileReader()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue