[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 393ac6db0f 081/222: add tests for regexp f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 393ac6db0f 081/222: add tests for regexp font locking |
Date: |
Sun, 6 Feb 2022 16:59:19 -0500 (EST) |
branch: elpa/typescript-mode
commit 393ac6db0fdd399bb12beb9e66ee0e3823d50675
Author: Bartłomiej Kruczyk <bartlomiej.kruczyk@gmail.com>
Commit: Bartłomiej Kruczyk <bartlomiej.kruczyk@gmail.com>
add tests for regexp font locking
---
typescript-mode-tests.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/typescript-mode-tests.el b/typescript-mode-tests.el
index 6933d4fb6b..4a9e4f0f4c 100644
--- a/typescript-mode-tests.el
+++ b/typescript-mode-tests.el
@@ -277,6 +277,29 @@ declare function declareFunctionDefn(x3: xty3, y3: yty3):
ret3;"
(("y0" "y1" "y2" "y3") . font-lock-variable-name-face)
(("ret0" "ret1" "ret2" "ret3") . nil))))
+(ert-deftest font-lock/regexp ()
+ "Regular expresssions should be fontified as string constant."
+ (let ((content "=/foo/ (/bar/ ,/baz/ :/buzz/"))
+ (font-lock-test content
+ '(("=" . nil) ("/foo/" . font-lock-string-face)
+ ("(" . nil) ("/bar/" . font-lock-string-face)
+ ("," . nil) ("/baz/" . font-lock-string-face)
+ (":" . nil) ("/buzz/" . font-lock-string-face)))))
+
+(ert-deftest
font-lock/text-after-trailing-regexp-delim-should-not-be-fontified ()
+ "Text after trailing regular expression delimiter should not be fontified."
+ (test-with-temp-buffer
+ "=/foo/g something // comment"
+ (should (eq (get-face-at "g something") nil)))
+ (test-with-temp-buffer
+ "=/foo\\bar/g something // comment"
+ (should (eq (get-face-at "g something") nil)))
+ (test-with-temp-buffer
+ "=/foo\\\\bar/g something // comment"
+ (should (eq (get-face-at "g something") nil)))
+ (test-with-temp-buffer
+ "=/foo\\\\/g something // comment"
+ (should (eq (get-face-at "g something") nil))))
(defun flyspell-predicate-test (search-for)
"This function runs a test on
- [nongnu] elpa/typescript-mode c0f11efdfd 143/222: Fixing typescript--forward-expression for multiline indented string, (continued)
- [nongnu] elpa/typescript-mode c0f11efdfd 143/222: Fixing typescript--forward-expression for multiline indented string, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a0f2c3ebd4 164/222: Reimplement template auto conversion as a post-self-insert-hook, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode b44b75dbe1 172/222: Add test case for infinite loop, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 5bf30fe8d6 175/222: Add member expressions tests involving type parameters., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1c27fb09ed 220/222: Fix cl deprecation warning, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode dd832751ab 217/222: Merge pull request #156 from zkry/fix-dot-after-exclamation-indentation, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 4249a20d6d 187/222: Added file for indent test case, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c5e7788ce9 044/222: Merge pull request #28 from ananthakumaran/testing, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 99c2b74ac3 059/222: Make current-column function internal., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 89d22c4e18 051/222: Don't interpret forward slash in list as operator., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 393ac6db0f 081/222: add tests for regexp font locking,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 361564c4a9 057/222: typescript-current-column: Dont cause side-effects., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d155a4b623 063/222: Revert indent of complex parameters., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e0b4a6cb31 055/222: Merge pull request #36 from lddubeau/feature/improved-tslint-regex, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode bce2e73cf2 107/222: Remove unused dependencies, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7172a23d86 072/222: Add a custom predicate for flyspell-prog-mode., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d8501770f6 103/222: Fix indentation of multiple curly braces in sequence., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a09e9c78f9 108/222: Highlight class names., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7c6fd0f4a8 115/222: Document how to handle ANSI codes in error messages., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 9796425fdb 113/222: Add support for new type "unknown"., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 39b7ba9e54 117/222: Distinguish type arguments from lesser/greater than. (Fixes #81), ELPA Syncer, 2022/02/06