Skip to content

Commit

Permalink
Fix tests for older Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Feb 11, 2022
1 parent 4272474 commit 87b9f05
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// For example invalid syntax, duplicate keys, etc.
//
// In addition to the error message itself, you can also print detailed location
// information with context by using ErrorWithLocation():
// information with context by using ErrorWithPosition():
//
// toml: error: Key 'fruit' was already created and cannot be used as an array.
//
Expand Down
2 changes: 1 addition & 1 deletion error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestParseError(t *testing.T) {
fmt.Println("\x1b[1m━━━", path, strings.Repeat("━", 65-len(path)), "\x1b[0m")
fmt.Print(pErr.Error())
fmt.Println()
fmt.Println("─── ErrorWithLocation()", strings.Repeat("–", 47))
fmt.Println("─── ErrorWithPosition()", strings.Repeat("–", 47))
fmt.Print(pErr.ErrorWithPosition())
fmt.Println("─── ErrorWithUsage()", strings.Repeat("–", 50))
fmt.Print(pErr.ErrorWithUsage())
Expand Down
3 changes: 3 additions & 0 deletions internal/toml-test/json.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.16
// +build go1.16

package tomltest

import (
Expand Down
3 changes: 3 additions & 0 deletions internal/toml-test/runner.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//go:generate ./gen-multi.py

//go:build go1.16
// +build go1.16

package tomltest

import (
Expand Down
3 changes: 3 additions & 0 deletions internal/toml-test/toml.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.16
// +build go1.16

package tomltest

import (
Expand Down

0 comments on commit 87b9f05

Please sign in to comment.