hclsyntax: Fix incorrect positions in tests
This commit is contained in:
parent
864f97c8ab
commit
def7e926c9
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
deep.MaxDepth = 999
|
||||||
|
}
|
||||||
|
|
||||||
func TestParseConfig(t *testing.T) {
|
func TestParseConfig(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
input string
|
input string
|
||||||
@ -1393,8 +1397,8 @@ block "valid" {}
|
|||||||
Val: cty.StringVal("Hello\n"),
|
Val: cty.StringVal("Hello\n"),
|
||||||
|
|
||||||
SrcRange: hcl.Range{
|
SrcRange: hcl.Range{
|
||||||
Start: hcl.Pos{Line: 1, Column: 6, Byte: 5},
|
Start: hcl.Pos{Line: 2, Column: 1, Byte: 10},
|
||||||
End: hcl.Pos{Line: 1, Column: 12, Byte: 11},
|
End: hcl.Pos{Line: 3, Column: 1, Byte: 16},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -1426,8 +1430,8 @@ block "valid" {}
|
|||||||
Val: cty.StringVal("Hi"),
|
Val: cty.StringVal("Hi"),
|
||||||
|
|
||||||
SrcRange: hcl.Range{
|
SrcRange: hcl.Range{
|
||||||
Start: hcl.Pos{Line: 4, Column: 24, Byte: 5},
|
Start: hcl.Pos{Line: 4, Column: 6, Byte: 25},
|
||||||
End: hcl.Pos{Line: 4, Column: 9, Byte: 28},
|
End: hcl.Pos{Line: 4, Column: 8, Byte: 27},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -1550,8 +1554,8 @@ block "valid" {}
|
|||||||
Name: "baz",
|
Name: "baz",
|
||||||
|
|
||||||
SrcRange: hcl.Range{
|
SrcRange: hcl.Range{
|
||||||
Start: hcl.Pos{Line: 1, Column: 8, Byte: 7},
|
Start: hcl.Pos{Line: 1, Column: 12, Byte: 11},
|
||||||
End: hcl.Pos{Line: 1, Column: 12, Byte: 11},
|
End: hcl.Pos{Line: 1, Column: 16, Byte: 15},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/hashicorp/hcl2/hcl"
|
"github.com/hashicorp/hcl2/hcl"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
deep.MaxDepth = 999
|
||||||
|
}
|
||||||
|
|
||||||
func TestParse(t *testing.T) {
|
func TestParse(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
Input string
|
Input string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user