Merge pull request #7201 from hashicorp/b-update-hcl-jun16
vendor: Update hashicorp/hcl to latest version
This commit is contained in:
commit
cf39fb22c2
|
@ -132,22 +132,13 @@ func TestLoadFileHeredoc(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadFileEscapedQuotes(t *testing.T) {
|
||||
c, err := LoadFile(filepath.Join(fixtureDir, "escapedquotes.tf"))
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
_, err := LoadFile(filepath.Join(fixtureDir, "escapedquotes.tf"))
|
||||
if err == nil {
|
||||
t.Fatalf("expected syntax error as escaped quotes are no longer supported")
|
||||
}
|
||||
|
||||
if c == nil {
|
||||
t.Fatal("config should not be nil")
|
||||
}
|
||||
|
||||
if c.Dir != "" {
|
||||
t.Fatalf("bad: %#v", c.Dir)
|
||||
}
|
||||
|
||||
actual := resourcesStr(c.Resources)
|
||||
if actual != strings.TrimSpace(escapedquotesResourcesStr) {
|
||||
t.Fatalf("bad:\n%s", actual)
|
||||
if !strings.Contains(err.Error(), "syntax error") {
|
||||
t.Fatalf("expected \"syntax error\", got: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -787,13 +778,6 @@ aws_instance.test (x1)
|
|||
inline
|
||||
`
|
||||
|
||||
const escapedquotesResourcesStr = `
|
||||
aws_instance.quotes (x1)
|
||||
ami
|
||||
vars
|
||||
user: var.ami
|
||||
`
|
||||
|
||||
const basicOutputsStr = `
|
||||
web_ip
|
||||
vars
|
||||
|
|
|
@ -49,8 +49,7 @@ func Unquote(s string) (t string, err error) {
|
|||
for len(s) > 0 {
|
||||
// If we're starting a '${}' then let it through un-unquoted.
|
||||
// Specifically: we don't unquote any characters within the `${}`
|
||||
// section, except for escaped quotes and escaped backslashes, which we
|
||||
// handle specifically.
|
||||
// section, except for escaped backslashes, which we handle specifically.
|
||||
if s[0] == '$' && len(s) > 1 && s[1] == '{' {
|
||||
buf = append(buf, '$', '{')
|
||||
s = s[2:]
|
||||
|
@ -65,12 +64,12 @@ func Unquote(s string) (t string, err error) {
|
|||
|
||||
s = s[size:]
|
||||
|
||||
// We special case escaped double quotes and escaped backslashes in
|
||||
// interpolations, converting them to their unescaped equivalents.
|
||||
// We special case escaped backslashes in interpolations, converting
|
||||
// them to their unescaped equivalents.
|
||||
if r == '\\' {
|
||||
q, _ := utf8.DecodeRuneInString(s)
|
||||
switch q {
|
||||
case '"', '\\':
|
||||
case '\\':
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
@ -772,68 +772,68 @@
|
|||
{
|
||||
"checksumSHA1": "5LrCq/ydlbL6pq1cdmuxiw7QV98=",
|
||||
"path": "github.com/hashicorp/hcl",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "WP5ODRo9+USuAsKYPu5RW3q8Epg=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/ast",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "z03dif8bqgQ3Zk/1RGbvfgBXMXo=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/fmtcmd",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "SVw0qm83Anf5T2GkYabn+f7Ibv0=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/parser",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "CSmwxPOTz7GSpnWPF9aGkbVeR64=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/printer",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "WZM0q7Sya8PcGj607x1npgcEPa4=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/scanner",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "ETy6J7OZ7zjBNq0V0Lm8E/7Xafw=",
|
||||
"checksumSHA1": "riN5acfVDm4j6LhWXauqiWH5n84=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/strconv",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "VGNVyGYDGTTCTRqGH5R+CL0u6xw=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/token",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "uEaK2zagnGctsUmjWt8ZYmK1Yvs=",
|
||||
"path": "github.com/hashicorp/hcl/json/parser",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "S1e0F9ZKSnqgOLfjDTYazRL28tA=",
|
||||
"path": "github.com/hashicorp/hcl/json/scanner",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
|
||||
"path": "github.com/hashicorp/hcl/json/token",
|
||||
"revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
|
||||
"revisionTime": "2016-06-07T00:19:40Z"
|
||||
"revision": "aa7699b7b62c5f410f4cf7b58f3f9b17a71fb4ad",
|
||||
"revisionTime": "2016-06-16T21:00:17Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "vWW3HXm7OTOMISuZPcCSJODRYkU=",
|
||||
|
|
Loading…
Reference in New Issue