summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures')
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl6
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl15
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl42
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl0
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hclbin0 -> 10 bytes
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl4
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl3
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl5
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl1
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl7
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl2
-rw-r--r--vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl6
28 files changed, 134 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
new file mode 100644
index 000000000..78c267582
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl
@@ -0,0 +1,4 @@
+foo = [
+ "1",
+ "2", # comment
+]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
new file mode 100644
index 000000000..f91667738
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl
@@ -0,0 +1,6 @@
+provisioner "remote-exec" {
+ scripts = [
+ "${path.module}/scripts/install-consul.sh" // missing comma
+ "${path.module}/scripts/install-haproxy.sh"
+ ]
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
new file mode 100644
index 000000000..eb5a99a69
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl
@@ -0,0 +1,6 @@
+resource = [{
+ "foo": {
+ "bar": {},
+ "baz": [1, 2, "foo"],
+ }
+}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
new file mode 100644
index 000000000..dd3151cb7
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl
@@ -0,0 +1,5 @@
+resource = [{
+ foo = [{
+ bar = {}
+ }]
+}]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
new file mode 100644
index 000000000..1ff7f29fd
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl
@@ -0,0 +1,15 @@
+// Foo
+
+/* Bar */
+
+/*
+/*
+Baz
+*/
+
+# Another
+
+# Multiple
+# Lines
+
+foo = "bar"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
new file mode 100644
index 000000000..5529b9b4c
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl
@@ -0,0 +1 @@
+#foo \ No newline at end of file
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
new file mode 100644
index 000000000..fec56017d
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl
@@ -0,0 +1 @@
+# Hello
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
new file mode 100644
index 000000000..13b3c2726
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl
@@ -0,0 +1,42 @@
+variable "foo" {
+ default = "bar"
+ description = "bar"
+}
+
+variable "groups" { }
+
+provider "aws" {
+ access_key = "foo"
+ secret_key = "bar"
+}
+
+provider "do" {
+ api_key = "${var.foo}"
+}
+
+resource "aws_security_group" "firewall" {
+ count = 5
+}
+
+resource aws_instance "web" {
+ ami = "${var.foo}"
+ security_groups = [
+ "foo",
+ "${aws_security_group.firewall.foo}",
+ "${element(split(\",\", var.groups)}",
+ ]
+ network_interface = {
+ device_index = 0
+ description = "Main network interface"
+ }
+}
+
+resource "aws_instance" "db" {
+ security_groups = "${aws_security_group.firewall.*.id}"
+ VPC = "foo"
+ depends_on = ["aws_instance.web"]
+}
+
+output "web_ip" {
+ value = "${aws_instance.web.private_ip}"
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
new file mode 100644
index 000000000..0007aaf5f
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl
@@ -0,0 +1 @@
+foo.bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
new file mode 100644
index 000000000..f691948e1
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl
Binary files differ
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
new file mode 100644
index 000000000..257cc5642
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl
@@ -0,0 +1 @@
+foo
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
new file mode 100644
index 000000000..059d4ce65
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl
@@ -0,0 +1 @@
+foo = [1, 2, "foo"]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
new file mode 100644
index 000000000..50f4218ac
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl
@@ -0,0 +1 @@
+foo = [1, 2, "foo",]
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
new file mode 100644
index 000000000..68e7274e6
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl
@@ -0,0 +1,4 @@
+# should error, but not crash
+resource "template_file" "cloud_config" {
+ template = "$file("${path.module}/some/path")"
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
new file mode 100644
index 000000000..029c54b0c
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl
@@ -0,0 +1,2 @@
+foo = "bar"
+key = 7
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
new file mode 100644
index 000000000..37a2c7a06
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl
@@ -0,0 +1,3 @@
+foo {
+ bar =
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
new file mode 100644
index 000000000..83ec5e66e
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl
@@ -0,0 +1,4 @@
+foo {
+ baz = 7
+ bar =
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
new file mode 100644
index 000000000..21136d1d5
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl
@@ -0,0 +1,4 @@
+foo {
+ bar =
+ baz = 7
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
new file mode 100644
index 000000000..a9987318c
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl
@@ -0,0 +1,3 @@
+foo {
+ bar
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
new file mode 100644
index 000000000..1921ec8f2
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl
@@ -0,0 +1 @@
+foo = {one = 1, two = 2}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
new file mode 100644
index 000000000..e9f77cae9
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl
@@ -0,0 +1,3 @@
+default = {
+ "eu-west-1": "ami-b1cf19c6",
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
new file mode 100644
index 000000000..92592fbb3
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl
@@ -0,0 +1,5 @@
+// This is a test structure for the lexer
+foo bar "baz" {
+ key = 7
+ foo = "bar"
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
new file mode 100644
index 000000000..7229a1f01
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl
@@ -0,0 +1,5 @@
+foo {
+ value = 7
+ "value" = 8
+ "complex::value" = 9
+}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
new file mode 100644
index 000000000..4d156ddea
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl
@@ -0,0 +1 @@
+resource "foo" "bar" {}
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
new file mode 100644
index 000000000..cf2747ea1
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl
@@ -0,0 +1,7 @@
+foo = "bar"
+bar = 7
+baz = [1,2,3]
+foo = -12
+bar = 3.14159
+foo = true
+bar = false
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
new file mode 100644
index 000000000..31b37c4f9
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl
@@ -0,0 +1,2 @@
+foo "baz" {
+ bar = "baz"
diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
new file mode 100644
index 000000000..294e36d65
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl
@@ -0,0 +1,6 @@
+resource "aws_eip" "EIP1" { a { a { a { a { a {
+ count = "1"
+
+resource "aws_eip" "EIP2" {
+ count = "1"
+}