Skip to content

Commit

Permalink
FIX b9cf97b: silence expected error in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Nov 17, 2024
1 parent 61a007a commit 7bddfc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bcl_test

import (
"bytes"
"io"
"testing"

diff "github.com/akedrou/textdiff"
Expand Down Expand Up @@ -62,7 +63,8 @@ func TestTokenLeftover(t *testing.T) {

func TestEarlyParseErr(t *testing.T) {
r := reader{bytes.NewReader(badbig1)}
_, err := bcl.ParseFile(r)
// note: triggered error is printed, so silence it:
_, err := bcl.ParseFile(r, bcl.OptLogger(io.Discard))
if err == nil {
t.Errorf("expected error")
}
Expand Down

0 comments on commit 7bddfc9

Please sign in to comment.