Skip to content

Commit

Permalink
Make FilePath full path in parser_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
apstndb committed Oct 16, 2024
1 parent 9667380 commit 4910422
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ func testParser(t *testing.T, inputPath, resultPath string, parse func(p *memefi
t.Run(in.Name(), func(t *testing.T) {
t.Parallel()

b, err := os.ReadFile(filepath.Join(inputPath, in.Name()))
inputFilePath := filepath.Join(inputPath, in.Name())
b, err := os.ReadFile(inputFilePath)
if err != nil {
t.Fatalf("error on reading input file: %v", err)
}

p := &memefish.Parser{
Lexer: &memefish.Lexer{
File: &token.File{FilePath: in.Name(), Buffer: string(b)},
File: &token.File{FilePath: inputFilePath, Buffer: string(b)},
},
}

Expand Down

0 comments on commit 4910422

Please sign in to comment.