summaryrefslogtreecommitdiff
path: root/ext/userfunc/decode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'ext/userfunc/decode_test.go')
-rw-r--r--ext/userfunc/decode_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/userfunc/decode_test.go b/ext/userfunc/decode_test.go
index 09d1d07..039beba 100644
--- a/ext/userfunc/decode_test.go
+++ b/ext/userfunc/decode_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"testing"
- "github.com/hashicorp/hcl2/hcl/hclsyntax"
"github.com/hashicorp/hcl2/hcl"
+ "github.com/hashicorp/hcl2/hcl/hclsyntax"
"github.com/zclconf/go-cty/cty"
)
@@ -20,7 +20,7 @@ func TestDecodeUserFunctions(t *testing.T) {
{
`
function "greet" {
- params = ["name"]
+ params = [name]
result = "Hello, ${name}."
}
`,
@@ -32,7 +32,7 @@ function "greet" {
{
`
function "greet" {
- params = ["name"]
+ params = [name]
result = "Hello, ${name}."
}
`,
@@ -44,7 +44,7 @@ function "greet" {
{
`
function "greet" {
- params = ["name"]
+ params = [name]
result = "Hello, ${name}."
}
`,
@@ -56,7 +56,7 @@ function "greet" {
{
`
function "add" {
- params = ["a", "b"]
+ params = [a, b]
result = a + b
}
`,
@@ -69,7 +69,7 @@ function "add" {
`
function "argstuple" {
params = []
- variadic_param = "args"
+ variadic_param = args
result = args
}
`,
@@ -109,11 +109,11 @@ function "closure" {
{
`
function "neg" {
- params = ["val"]
+ params = [val]
result = -val
}
function "add" {
- params = ["a", "b"]
+ params = [a, b]
result = a + b
}
`,
@@ -125,7 +125,7 @@ function "add" {
{
`
function "neg" {
- parrams = ["val"]
+ parrams = [val]
result = -val
}
`,