Skip to content

Commit

Permalink
test(font): add tests for commented variable assignment
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
Fuco1 committed Mar 1, 2023
1 parent 7a223ee commit dc61049
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test-highlighting.el
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,24 @@ bar = \"${foo}\"
(forward-cursor-on "foo")
(should (face-at-cursor-p 'font-lock-comment-face))))

(ert-deftest font-lock--no-variable-assignment-in-comment--single-line ()
(with-terraform-temp-buffer
"# foo = \"bar\""

(forward-cursor-on "foo")
(should (face-at-cursor-p 'font-lock-comment-face))))

(ert-deftest font-lock--no-variable-assignment-in-comment--backend-s3 ()
(with-terraform-temp-buffer
"# backend \"s3\" {
# bucket = \"somestate\"
# key = \"tfstates/terraform.tfstate\"
# region = \"us-east-1\"
# }
"
(forward-cursor-on "bucket")
(should (face-at-cursor-p 'font-lock-comment-face))))

(ert-deftest font-lock--map-statement ()
"Syntax highlight of map"
(with-terraform-temp-buffer
Expand Down

0 comments on commit dc61049

Please sign in to comment.