Skip to content

Commit

Permalink
Add tests for SublimeText#18 - nested string interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickrgaffney committed Oct 15, 2019
1 parent 305e582 commit ed107fa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions syntax_test_terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,27 @@
# ^ punctuation.section.brackets.end.terraform
# ^ -meta -string -variable -punctuation

/////
// Handles nested interpolation.
/////

"${file("${path.module}/text_files/ecs_app")}"
# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform
# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform
# ^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform
# ^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform
# ^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.terraform
# ^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform
# ^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform
# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform
# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform

/////////////////////////////////////////////////////////////////////
// Template If Directives
/////////////////////////////////////////////////////////////////////
Expand Down
21 changes: 21 additions & 0 deletions syntax_test_terraform_tm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,27 @@
# ^ punctuation.section.brackets.end.terraform
# ^ -meta -string -variable -punctuation

/////
// Handles nested interpolation.
/////

"${file("${path.module}/text_files/ecs_app")}"
# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform
# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform
# ^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform
# ^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform
# ^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.terraform
# ^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform
# ^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform
# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform
# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform
# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform

/////////////////////////////////////////////////////////////////////
// Template If Directives
/////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit ed107fa

Please sign in to comment.