File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -927,6 +927,22 @@ 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-escaped-double-quote-character-literal ()
931
+ (rust-test-font-lock
932
+ " fn main() { let ch = '\\ \" '; }"
933
+ '(" fn" font-lock-keyword-face
934
+ " main" font-lock-function-name-face
935
+ " let" font-lock-keyword-face
936
+ " '\\ \" '" font-lock-string-face )))
937
+
938
+ (ert-deftest font-lock-escaped-backslash-character-literal ()
939
+ (rust-test-font-lock
940
+ " fn main() { let ch = '\\\\ '; }"
941
+ '(" fn" font-lock-keyword-face
942
+ " main" font-lock-function-name-face
943
+ " let" font-lock-keyword-face
944
+ " '\\\\ '" font-lock-string-face )))
945
+
930
946
(ert-deftest font-lock-raw-strings-no-hashes ()
931
947
(rust-test-font-lock
932
948
" r\" No hashes\" ;"
Original file line number Diff line number Diff line change 423
423
; ; Handle single quoted character literals:
424
424
(mapcar (lambda (re ) (list re '(1 " \" " ) '(2 " \" " )))
425
425
'(" \\ ('\\ )[^']\\ ('\\ )"
426
- " \\ ('\\ )\\\\ ['nrt]\\ ('\\ )"
426
+ " \\ ('\\ )\\\\ ['nrt\" \\ ]\\ ('\\ )"
427
427
" \\ ('\\ )\\\\ x[[:xdigit:]]\\ {2\\ }\\ ('\\ )"
428
428
" \\ ('\\ )\\\\ u[[:xdigit:]]\\ {4\\ }\\ ('\\ )"
429
429
" \\ ('\\ )\\\\ U[[:xdigit:]]\\ {8\\ }\\ ('\\ )" ))
You can’t perform that action at this time.
0 commit comments