specsuite: a few additional tests for structure
This is still not fully comprehensive, but tests some basic functionality.
This commit is contained in:
parent
74466f4d35
commit
12f0f2dbc5
4
specsuite/tests/structure/attributes/unexpected.hcl
Normal file
4
specsuite/tests/structure/attributes/unexpected.hcl
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
a = "a value"
|
||||||
|
b = "b value"
|
||||||
|
c = "c value"
|
||||||
|
d = "d value"
|
11
specsuite/tests/structure/attributes/unexpected.hcldec
Normal file
11
specsuite/tests/structure/attributes/unexpected.hcldec
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
object {
|
||||||
|
attr "a" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
attr "b" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
attr "d" {
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
}
|
15
specsuite/tests/structure/attributes/unexpected.t
Normal file
15
specsuite/tests/structure/attributes/unexpected.t
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
a {}
|
@ -0,0 +1,4 @@
|
|||||||
|
block {
|
||||||
|
block_type = "a"
|
||||||
|
object {}
|
||||||
|
}
|
1
specsuite/tests/structure/blocks/single_empty_oneline.t
Normal file
1
specsuite/tests/structure/blocks/single_empty_oneline.t
Normal file
@ -0,0 +1 @@
|
|||||||
|
result_type = object({})
|
3
specsuite/tests/structure/blocks/single_expected.hcl
Normal file
3
specsuite/tests/structure/blocks/single_expected.hcl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a {
|
||||||
|
|
||||||
|
}
|
4
specsuite/tests/structure/blocks/single_expected.hcldec
Normal file
4
specsuite/tests/structure/blocks/single_expected.hcldec
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
block {
|
||||||
|
block_type = "a"
|
||||||
|
object {}
|
||||||
|
}
|
1
specsuite/tests/structure/blocks/single_expected.t
Normal file
1
specsuite/tests/structure/blocks/single_expected.t
Normal file
@ -0,0 +1 @@
|
|||||||
|
result_type = object({})
|
1
specsuite/tests/structure/blocks/single_unclosed.hcl
Normal file
1
specsuite/tests/structure/blocks/single_unclosed.hcl
Normal file
@ -0,0 +1 @@
|
|||||||
|
a {
|
4
specsuite/tests/structure/blocks/single_unclosed.hcldec
Normal file
4
specsuite/tests/structure/blocks/single_unclosed.hcldec
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
block {
|
||||||
|
block_type = "a"
|
||||||
|
object {}
|
||||||
|
}
|
14
specsuite/tests/structure/blocks/single_unclosed.t
Normal file
14
specsuite/tests/structure/blocks/single_unclosed.t
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diagnostics {
|
||||||
|
error {
|
||||||
|
from {
|
||||||
|
line = 2
|
||||||
|
column = 1
|
||||||
|
byte = 4
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
line = 2
|
||||||
|
column = 1
|
||||||
|
byte = 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user