[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 9616fd0 192/459: Fix method-name fontificat
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 9616fd0 192/459: Fix method-name fontification tests. |
Date: |
Sun, 22 Aug 2021 13:59:25 -0400 (EDT) |
branch: externals/csharp-mode
commit 9616fd00058df1aada146cfd6104d2c4461c9988
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix method-name fontification tests.
Restore incorrectly removed utility function.
---
csharp-mode-tests.el | 17 ++++++++++++++---
csharp-mode.el | 14 ++++++++++++++
test-files/fontification-test-compiler-directives.cs | 8 ++++----
3 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 5c7fbf8..da233b5 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -70,6 +70,12 @@
;; this replaces the manual test of
;; test-files/fontification-test-compiler-directives.cs, but file
;; has been kept around to assist manual testing/verification.
+ (assess-face-in-file= "test-files/fontification-test-compiler-directives.cs"
+ "strReference" 'font-lock-string-face
+ "strVerification" 'font-lock-string-face
+ "singleQuote" 'font-lock-string-face
+ "doubleQuote" 'font-lock-string-face)
+
(assess-face-in-text=
"#region test\nbool bar = true;"
;; should not be interpreted as string because of trailing \!
@@ -91,13 +97,18 @@
)))
(ert-deftest fontification-of-compiler-directives-after-comments ()
- ;; this replaces the manual test of
- ;; test-files/fontification-test-compiler-directives-with-comments.cs, but
file
- ;; has been kept around to assist manual testing/verification.
(assess-face-in-file=
"./test-files/fontification-test-compiler-directives-with-comments.cs"
"case1" 'font-lock-comment-face
"case2" 'font-lock-comment-face))
+(ert-deftest fontification-of-method-names ()
+ (assess-face-in-file= "./test-files/imenu-method-test.cs"
+ "OpenWebServicesAsync" 'font-lock-function-name-face
+ "ToString" 'font-lock-function-name-face
+ "Equals" 'font-lock-function-name-face
+ "AbstractMethod" 'font-lock-function-name-face
+ "UnsafeCopy" 'font-lock-function-name-face))
+
(defun list-repeat-once (mylist)
(append mylist mylist))
diff --git a/csharp-mode.el b/csharp-mode.el
index dc169c2..617ec12 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -511,6 +511,20 @@ to work properly with code that includes attributes.
)))
+(defun csharp-is-square-parentasis-block-p ()
+ "Attempts to safely assess if the current point is at the opening of
+a square parentasis block [ ... ]."
+ (let* ((start (point)) ;; variables used to hold our position, so that we
know that
+ (end)) ;; our code isn't stuck trying to look for a
non-existant sexp.
+ (and (eq (char-after) 91) ;; open square
+ (while (and (eq (char-after) 91)
+ (not (eq start end)))
+ (c-safe (c-forward-sexp 1))
+ (setq end (point)))
+ (eq (char-before) 93))) ;; close square
+ )
+
+
;; ==================================================================
;; end of csharp-mode utility and feature defuns
;; ==================================================================
diff --git a/test-files/fontification-test-compiler-directives.cs
b/test-files/fontification-test-compiler-directives.cs
index ffbaba8..dad1549 100644
--- a/test-files/fontification-test-compiler-directives.cs
+++ b/test-files/fontification-test-compiler-directives.cs
@@ -7,17 +7,17 @@ public class Test
string x;
// reference
- x += "foo";
+ x += "strReference";
#region v1 verification
- x += "foo";
+ x += "strVerification";
#endregion
#region t1 test'
- x += "foo";
+ x += "singleQuote";
#endregion
#region t2 - test"
- x += "foo";
+ x += "doubleQuote";
#endregion
}
}
- [elpa] externals/csharp-mode 7943738 182/459: Add volatile keyword, (continued)
- [elpa] externals/csharp-mode 7943738 182/459: Add volatile keyword, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b4b9d61 183/459: Add volatile to imenu, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9a1ddba 185/459: Merge branch 'jtbm37/master', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a8def67 186/459: Add missing test-file. Fix build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b609f42 187/459: New imenu test-file for method-indexing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b448614 190/459: Fix fontification of methods found in test-file., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4a396e3 189/459: Add tests for imenu method-indexing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9c42dac 193/459: Move all defcustoms to the top., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 717bf76 194/459: Fix compilation errors and warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7baacd5 196/459: Make imenu-tests less verbose., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9616fd0 192/459: Fix method-name fontification tests.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 04958ec 198/459: Fix byte-compilation warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 49a957b 199/459: Super-ugly hacks to fix build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode aa4e5db 201/459: Escape both quoting and quoted double quote, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 48dd7ee 202/459: Remove empty line at file start, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 803a362 203/459: Move log functions back down where they were., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8a9ab5a 204/459: imenu: Add test-cases for generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b56c250 205/459: Add fontification tests for generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f83e2e3 207/459: Fix indentation of generic type-initializers., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 81cf94d 214/459: Update test-data., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bd42802 216/459: Indentation fix (#88), ELPA Syncer, 2021/08/22