Skip to content

Commit

Permalink
Add block label curly brace test
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed May 3, 2024
1 parent a9c365d commit 5a72a12
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
11 changes: 10 additions & 1 deletion tests/snapshot/hcl/block_labels.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,13 @@ block-single-char-indentifier a {}
block-single-char-indentifier-newline a {
}

byte_match_statement_rules = local.enabled && var.byte_match_statement_rules != null ? {
byte_match_statement_rules = local.enabled && var.byte_match_statement_rules != null ? {
}

path "secrets/data/users/{{identity.entity.name}}/*" {
capabilities = ["create", "update", "patch", "read", "delete", "list"]
}

path "secrets/data/users/*" {
capabilities = ["create", "update", "patch", "read", "delete", "list"]
}
32 changes: 31 additions & 1 deletion tests/snapshot/hcl/block_labels.hcl.snap
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,34 @@
# ^ source.hcl
# ^ source.hcl keyword.operator.hcl
# ^ source.hcl
# ^ source.hcl meta.braces.hcl punctuation.section.braces.begin.hcl
# ^ source.hcl meta.braces.hcl punctuation.section.braces.begin.hcl
>}
#^ source.hcl meta.braces.hcl punctuation.section.braces.end.hcl
>
>path "secrets/data/users/{{identity.entity.name}}/*" {
#^^^^ source.hcl meta.block.hcl entity.name.type.hcl
# ^^ source.hcl meta.block.hcl
# ^^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl
# ^ source.hcl meta.block.hcl
# ^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl
# ^ source.hcl meta.block.hcl
# ^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl
# ^ source.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl punctuation.section.block.begin.hcl
# ^ source.hcl meta.block.hcl meta.braces.hcl punctuation.section.braces.begin.hcl
# ^^^^^^^^^^^^^^^^^^^^ source.hcl meta.block.hcl meta.braces.hcl
# ^ source.hcl meta.block.hcl meta.braces.hcl punctuation.section.braces.end.hcl
# ^ source.hcl meta.block.hcl punctuation.section.block.end.hcl
# ^^ source.hcl comment.block.hcl punctuation.definition.comment.hcl
# ^^^^ source.hcl comment.block.hcl
> capabilities = ["create", "update", "patch", "read", "delete", "list"]
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.block.hcl
>}
#^^ source.hcl comment.block.hcl
>
>path "secrets/data/users/*" {
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.block.hcl
> capabilities = ["create", "update", "patch", "read", "delete", "list"]
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.block.hcl
>}
#^^ source.hcl comment.block.hcl

0 comments on commit 5a72a12

Please sign in to comment.