Skip to content

Commit

Permalink
Add HCL namespaced functions test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Mar 12, 2024
1 parent f477149 commit aa2c94b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/snapshot/hcl/expressions_functions.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ upper("hello")
# known

foo("bar")

prefix::namespace::func("bar")
prefix::namespace::func()

namespace::short("bar")
namespace::short_name()
25 changes: 24 additions & 1 deletion tests/snapshot/hcl/expressions_functions.hcl.snap
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,27 @@
# ^^^ source.hcl meta.function-call.hcl string.quoted.double.hcl
# ^ source.hcl meta.function-call.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl
>
>
>prefix::namespace::func("bar")
#^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.function-call.hcl support.function.namespaced.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl
# ^ source.hcl meta.function-call.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^ source.hcl meta.function-call.hcl string.quoted.double.hcl
# ^ source.hcl meta.function-call.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl
>prefix::namespace::func()
#^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.function-call.hcl support.function.namespaced.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl
>
>namespace::short("bar")
#^^^^^^^^^^^^^^^^ source.hcl meta.function-call.hcl support.function.namespaced.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl
# ^ source.hcl meta.function-call.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl
# ^^^ source.hcl meta.function-call.hcl string.quoted.double.hcl
# ^ source.hcl meta.function-call.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl
>namespace::short_name()
#^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.function-call.hcl support.function.namespaced.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl

0 comments on commit aa2c94b

Please sign in to comment.