diff --git a/specsuite/tests/structure/attributes/unexpected.hcl b/specsuite/tests/structure/attributes/unexpected.hcl new file mode 100644 index 0000000..79419e5 --- /dev/null +++ b/specsuite/tests/structure/attributes/unexpected.hcl @@ -0,0 +1,4 @@ +a = "a value" +b = "b value" +c = "c value" +d = "d value" diff --git a/specsuite/tests/structure/attributes/unexpected.hcldec b/specsuite/tests/structure/attributes/unexpected.hcldec new file mode 100644 index 0000000..a533e7a --- /dev/null +++ b/specsuite/tests/structure/attributes/unexpected.hcldec @@ -0,0 +1,11 @@ +object { + attr "a" { + type = string + } + attr "b" { + type = string + } + attr "d" { + type = string + } +} diff --git a/specsuite/tests/structure/attributes/unexpected.t b/specsuite/tests/structure/attributes/unexpected.t new file mode 100644 index 0000000..2e5a57c --- /dev/null +++ b/specsuite/tests/structure/attributes/unexpected.t @@ -0,0 +1,15 @@ +diagnostics { + error { + # An argument named "c" is not expected here. + from { + line = 3 + column = 1 + byte = 28 + } + to { + line = 3 + column = 2 + byte = 29 + } + } +} diff --git a/specsuite/tests/structure/blocks/single_empty_oneline.hcl b/specsuite/tests/structure/blocks/single_empty_oneline.hcl new file mode 100644 index 0000000..077f6dd --- /dev/null +++ b/specsuite/tests/structure/blocks/single_empty_oneline.hcl @@ -0,0 +1 @@ +a {} diff --git a/specsuite/tests/structure/blocks/single_empty_oneline.hcldec b/specsuite/tests/structure/blocks/single_empty_oneline.hcldec new file mode 100644 index 0000000..18d812b --- /dev/null +++ b/specsuite/tests/structure/blocks/single_empty_oneline.hcldec @@ -0,0 +1,4 @@ +block { + block_type = "a" + object {} +} diff --git a/specsuite/tests/structure/blocks/single_empty_oneline.t b/specsuite/tests/structure/blocks/single_empty_oneline.t new file mode 100644 index 0000000..bc56110 --- /dev/null +++ b/specsuite/tests/structure/blocks/single_empty_oneline.t @@ -0,0 +1 @@ +result_type = object({}) diff --git a/specsuite/tests/structure/blocks/single_expected.hcl b/specsuite/tests/structure/blocks/single_expected.hcl new file mode 100644 index 0000000..957390a --- /dev/null +++ b/specsuite/tests/structure/blocks/single_expected.hcl @@ -0,0 +1,3 @@ +a { + +} diff --git a/specsuite/tests/structure/blocks/single_expected.hcldec b/specsuite/tests/structure/blocks/single_expected.hcldec new file mode 100644 index 0000000..18d812b --- /dev/null +++ b/specsuite/tests/structure/blocks/single_expected.hcldec @@ -0,0 +1,4 @@ +block { + block_type = "a" + object {} +} diff --git a/specsuite/tests/structure/blocks/single_expected.t b/specsuite/tests/structure/blocks/single_expected.t new file mode 100644 index 0000000..bc56110 --- /dev/null +++ b/specsuite/tests/structure/blocks/single_expected.t @@ -0,0 +1 @@ +result_type = object({}) diff --git a/specsuite/tests/structure/blocks/single_unclosed.hcl b/specsuite/tests/structure/blocks/single_unclosed.hcl new file mode 100644 index 0000000..af4a964 --- /dev/null +++ b/specsuite/tests/structure/blocks/single_unclosed.hcl @@ -0,0 +1 @@ +a { diff --git a/specsuite/tests/structure/blocks/single_unclosed.hcldec b/specsuite/tests/structure/blocks/single_unclosed.hcldec new file mode 100644 index 0000000..18d812b --- /dev/null +++ b/specsuite/tests/structure/blocks/single_unclosed.hcldec @@ -0,0 +1,4 @@ +block { + block_type = "a" + object {} +} diff --git a/specsuite/tests/structure/blocks/single_unclosed.t b/specsuite/tests/structure/blocks/single_unclosed.t new file mode 100644 index 0000000..2792e2c --- /dev/null +++ b/specsuite/tests/structure/blocks/single_unclosed.t @@ -0,0 +1,14 @@ +diagnostics { + error { + from { + line = 2 + column = 1 + byte = 4 + } + to { + line = 2 + column = 1 + byte = 4 + } + } +}