[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 52c08d0628 091/222: Add more fontification
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 52c08d0628 091/222: Add more fontification tests for regular expressions. |
Date: |
Sun, 6 Feb 2022 16:59:21 -0500 (EST) |
branch: elpa/typescript-mode
commit 52c08d0628544e22b0f0816ba6185a8571d080f8
Author: Louis-Dominique Dubeau <ldd@lddubeau.com>
Commit: Louis-Dominique Dubeau <ldd@lddubeau.com>
Add more fontification tests for regular expressions.
The first catches a current error. The 2nd one catches a problem that
currently happens in js.el. We incorporate a test for that case here
to make sure we don't eventually fall into the same trap.
---
typescript-mode-tests.el | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/typescript-mode-tests.el b/typescript-mode-tests.el
index 4974819416..45c43a0a83 100644
--- a/typescript-mode-tests.el
+++ b/typescript-mode-tests.el
@@ -197,6 +197,9 @@ LOCATION can be either a single location, or list of
locations,
that are all expected to have the same face."
(test-with-temp-buffer
contents
+ ;; Make sure our propertize function has been applied to the whole
+ ;; buffer.
+ (syntax-propertize (point-max))
(dolist (spec expected)
(if (listp (car spec))
(dolist (source (car spec))
@@ -290,6 +293,18 @@ declare function declareFunctionDefn(x3: xty3, y3: yty3):
ret3;"
'(("=" . nil)
(("/flip" "\\\\" "/" "flop/") . font-lock-string-face)
(";" . nil)))
+ ;; Make sure a forward slash in a character class is handled fine.
+ ;; It must not terminate the regular expression.
+ (font-lock-test "var a = /[/]/;"
+ '(("=" . nil)
+ (("/" "\\[/" "\\]/") . font-lock-string-face)
+ (";" . nil)))
+ ;; Make sure an open bracket in a character class does not
+ ;; throw off fontification.
+ (font-lock-test "var a = /[[]/;"
+ '(("=" . nil)
+ (("/" "\\[\\[\\]" "/") . font-lock-string-face)
+ (";" . nil)))
;; A sequence of two forward slashes is never a regex, so there is
;; no such thing as an \"empty regex\" when we use the forward slash
;; notation.
- [nongnu] elpa/typescript-mode 54e0c562d4 020/222: removed keyword "bool" which is deprecated since TypeScript 0.9, (continued)
- [nongnu] elpa/typescript-mode 54e0c562d4 020/222: removed keyword "bool" which is deprecated since TypeScript 0.9, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d81cc72782 013/222: Merge pull request #7 from paulkoerbitz/patch-1, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a532ef57cf 046/222: Merge pull request #29 from lddubeau/fix/method-generator, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c1a7d40dd8 005/222: highlight template string, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 8fe879a96d 028/222: Support 'of' keyword., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode ca510ab853 048/222: Merge pull request #30 from lddubeau/fix/keyword-members, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a2c2ff03e7 024/222: Add support for compilation-mode., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7526f138a0 032/222: Avoid capturing things we dont need for compilation-mode., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 666052f09f 033/222: Update readme., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 4235b47a38 060/222: Fix indent for lines which starts with tabs., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 52c08d0628 091/222: Add more fontification tests for regular expressions.,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode e25c7ddb8a 062/222: Fix indentation of funcs with return annotations., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 536e4da380 087/222: Fix bug with hanling array shorthand in return value types., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 70acbf9c3d 078/222: Change font-lock-test to also accept a list of locations, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a2167a133d 056/222: Fix errors with indentation when line has wide unicode chars., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 09bdb97c32 065/222: Fix an indentation bug., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 8b2815514d 088/222: Simplify typescript--backward-to-parameter-list, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f9cd0dd539 112/222: Try parse new error-format introduced in tsc 2.7+, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a1cdb7a1ec 121/222: Remove redundant regexp groups for jsdoc tags, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode fd1c9daa4d 094/222: Add failing cases., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode bd046e0fae 120/222: Add tags in usejsdoc.org, ELPA Syncer, 2022/02/06