summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorJonas Westlund <jonaswestlund101@gmail.com>2017-12-08 19:24:51 +0100
committerJonas Westlund <jonaswestlund101@gmail.com>2017-12-08 19:24:51 +0100
commit705f3e40a818d6b293c2460a7e6e2985c400a654 (patch)
tree93d99d9e2f494fbf672c1a2f516aeb93a8f53bca /rust-mode-tests.el
parent6bcb82b4c2dca4fbbc6585635163bcc5020f6096 (diff)
downloadrust-mode-705f3e40a818d6b293c2460a7e6e2985c400a654.tar.gz
Improved font-locking for print macros
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index b2e8338..762c5f8 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2186,6 +2186,19 @@ fn main() {
"\"\"" font-lock-string-face
"/* " font-lock-comment-delimiter-face
"print!(\"\"); */" font-lock-comment-face))
+ ;; with newline directly following delimiter
+ (rust-test-font-lock
+ "print!(\n\"\"\n); { /* print!(\"\"); */ }"
+ '("print!" rust-builtin-formatting-macro-face
+ "\"\"" font-lock-string-face
+ "/* " font-lock-comment-delimiter-face
+ "print!(\"\"); */" font-lock-comment-face))
+ ;; with empty println!()
+ (rust-test-font-lock
+ "println!(); { /* println!(); */ }"
+ '("println!" rust-builtin-formatting-macro-face
+ "/* " font-lock-comment-delimiter-face
+ "println!(); */" font-lock-comment-face))
;; other delimiters
(rust-test-font-lock
"print!{\"\"}; { /* no-op */ }"