Skip to content

Commit

Permalink
snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jpogran committed Mar 2, 2022
1 parent affa46f commit ddf59f5
Show file tree
Hide file tree
Showing 22 changed files with 1,533 additions and 1,525 deletions.
22 changes: 22 additions & 0 deletions tests/snapshot/hcl/basic.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
io_mode = "async"

service "http" "web_proxy" {
listen_addr = "127.0.0.1:8080"

process "main" {
command = ["/usr/local/bin/awesome-app", "server"]
}

process "mgmt" {
command = ["/usr/local/bin/awesome-app", "mgmt"]
}
}

# Arithmetic with literals and application-provided variables
sum = 1 + addend

# String interpolation and templates
message = "Hello, ${name}!"

# Application-provided functions
shouty_message = upper(message)
134 changes: 134 additions & 0 deletions tests/snapshot/hcl/basic.hcl.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
>io_mode = "async"
#^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^ source.hcl string.quoted.double.hcl
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
>
>service "http" "web_proxy" {
#^^^^^^^ source.hcl meta.block.hcl entity.name.type.hcl
# ^ source.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.begin.hcl
# ^^^^ source.hcl meta.block.hcl entity.name.tag.hcl
# ^ source.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.end.hcl
# ^ source.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.begin.hcl
# ^^^^^^^^^ source.hcl meta.block.hcl entity.name.tag.hcl
# ^ source.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.end.hcl
# ^ source.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl punctuation.section.block.begin.hcl
> listen_addr = "127.0.0.1:8080"
#^^ source.hcl meta.block.hcl
# ^^^^^^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^^^^^^^^^^ source.hcl meta.block.hcl string.quoted.double.hcl
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
>
> process "main" {
#^^ source.hcl meta.block.hcl
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.type.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.begin.hcl
# ^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.begin.hcl
> command = ["/usr/local/bin/awesome-app", "server"]
#^^^^ source.hcl meta.block.hcl meta.block.hcl
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.begin.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.separator.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.end.hcl
> }
#^^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.end.hcl
>
> process "mgmt" {
#^^ source.hcl meta.block.hcl
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.type.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.begin.hcl
# ^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl entity.name.tag.hcl entity.name.tag.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.begin.hcl
> command = ["/usr/local/bin/awesome-app", "mgmt"]
#^^^^ source.hcl meta.block.hcl meta.block.hcl
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.begin.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.separator.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.end.hcl
> }
#^^ source.hcl meta.block.hcl meta.block.hcl
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.end.hcl
>}
#^ source.hcl meta.block.hcl punctuation.section.block.end.hcl
>
># Arithmetic with literals and application-provided variables
#^ source.hcl comment.line.number-sign.hcl punctuation.definition.comment.hcl
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.line.number-sign.hcl
>sum = 1 + addend
#^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl constant.numeric.integer.hcl
# ^ source.hcl
# ^ source.hcl keyword.operator.arithmetic.hcl
# ^^^^^^^^ source.hcl
>
># String interpolation and templates
#^ source.hcl comment.line.number-sign.hcl punctuation.definition.comment.hcl
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.line.number-sign.hcl
>message = "Hello, ${name}!"
#^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^^^^ source.hcl string.quoted.double.hcl
# ^ source.hcl string.quoted.double.hcl meta.interpolation.hcl
# ^^ source.hcl string.quoted.double.hcl meta.interpolation.hcl keyword.other.interpolation.begin.hcl
# ^^^^ source.hcl string.quoted.double.hcl meta.interpolation.hcl variable.other.readwrite.hcl
# ^ source.hcl string.quoted.double.hcl meta.interpolation.hcl keyword.other.interpolation.end.hcl
# ^ source.hcl string.quoted.double.hcl
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
>
># Application-provided functions
#^ source.hcl comment.line.number-sign.hcl punctuation.definition.comment.hcl
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl comment.line.number-sign.hcl
>shouty_message = upper(message)
#^^^^^^^^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl
# ^ source.hcl variable.declaration.hcl
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl
# ^ source.hcl variable.declaration.hcl
# ^^^^^ source.hcl meta.function-call.hcl variable.function.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl
# ^^^^^^^ source.hcl meta.function-call.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl
>
Loading

0 comments on commit ddf59f5

Please sign in to comment.