big tings
This commit is contained in:
16
parser/utils/read_test_data.go
Normal file
16
parser/utils/read_test_data.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func ReadTestDataFile(t *testing.T, fileName string) string {
|
||||
path := filepath.Join("../testdata", fileName)
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read test data file: %v", err)
|
||||
}
|
||||
return string(data)
|
||||
}
|
Reference in New Issue
Block a user