@@ -290,7 +290,7 @@ very very very long string
290
290
deindented
291
291
1
292
292
(lambda ()
293
- ; ; The indentation will fial in some cases if the syntax properties are
293
+ ; ; The indentation will fail in some cases if the syntax properties are
294
294
; ; not set. This only happens when font-lock fontifies the buffer.
295
295
(font-lock-fontify-buffer )
296
296
(indent-region 1 (buffer-size )))
@@ -927,6 +927,42 @@ list of substrings of `STR' each followed by its face."
927
927
" let" font-lock-keyword-face
928
928
" '\\ ''" font-lock-string-face )))
929
929
930
+ (ert-deftest font-lock-raw-strings-no-hashes ()
931
+ (rust-test-font-lock
932
+ " r\" No hashes\" ;"
933
+ '(" r\" No hashes\" " font-lock-string-face )))
934
+
935
+ (ert-deftest font-lock-raw-strings-double-quote ()
936
+ (rust-test-font-lock
937
+ " fn main() {
938
+ r#\" With a double quote (\" )\" #;
939
+ }
940
+ "
941
+ '(" fn" font-lock-keyword-face
942
+ " main" font-lock-function-name-face
943
+ " r#\" With a double quote (\" )\" #" font-lock-string-face )))
944
+
945
+ (ert-deftest font-lock-raw-strings-two-hashes ()
946
+ (rust-test-font-lock
947
+ " r##\" With two hashes\" ##;"
948
+ '(" r##\" With two hashes\" ##" font-lock-string-face )))
949
+
950
+ (ert-deftest font-lock-raw-strings-backslash-at-end ()
951
+ (rust-test-font-lock
952
+ " r\" With a backslash at the end\\ \" ;"
953
+ '(" r\" With a backslash at the end\\ \" " font-lock-string-face )))
954
+
955
+ (ert-deftest font-lock-two-raw-strings ()
956
+ (rust-test-font-lock
957
+ " fn main() {
958
+ r\" With a backslash at the end\\ \" ;
959
+ r##\" With two hashes\" ##;
960
+ }"
961
+ '(" fn" font-lock-keyword-face
962
+ " main" font-lock-function-name-face
963
+ " r\" With a backslash at the end\\ \" " font-lock-string-face
964
+ " r##\" With two hashes\" ##" font-lock-string-face )))
965
+
930
966
(ert-deftest indent-method-chains-no-align ()
931
967
(let ((rust-indent-method-chain nil )) (test-indent
932
968
"
0 commit comments