[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 6af6f88 111/459: Fix fontification tests.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 6af6f88 111/459: Fix fontification tests. |
Date: |
Sun, 22 Aug 2021 13:59:07 -0400 (EDT) |
branch: externals/csharp-mode
commit 6af6f8893a25dd8187461eb0dff5fe9537028cfe
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix fontification tests.
Previously they only checked string-values and not properties, which
meant they actually never verified the fontification they were created
to verify.
---
csharp-mode-tests.el | 26 ++++++++++++++--------
.../fontification-test-compiler-directives.cs | 4 ++--
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 3c13be8..38f0ab3 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -45,32 +45,40 @@
(setq buffer2 (get-current-line-contents))
;; check equality
- (setq debug-res (list buffer1 buffer2))
(should
- (equal buffer1 buffer2)))))
+ (equal-including-properties buffer1 buffer2)))))
(ert-deftest fontification-of-compiler-directives ()
(let* ((buffer (find-file-read-only
"test-files/fontification-test-compiler-directives.cs")))
;; double-ensure mode is active
(csharp-mode)
(goto-char (point-min))
- (let* ((buffer1)
- (buffer2))
+ (let* ((reference)
+ (v1)
+ (t1)
+ (t2))
;; get reference string
(move-to-line-after "reference")
(setq reference (get-current-line-contents))
;; get verification string
+ (move-to-line-after "v1")
+ (setq v1 (get-current-line-contents))
+
+ ;; get test-case1
(move-to-line-after "t1")
(setq t1 (get-current-line-contents))
- ;; get verification string
+ ;; get test-case2
(move-to-line-after "t2")
(setq t2 (get-current-line-contents))
;; check equality
- (should (equal reference t1))
- (should (equal reference t2)))))
+ (setq debug-res (list reference v1 t1 t2))
+ (should (and
+ (equal-including-properties reference v1)
+ (equal-including-properties reference t1)
+ (equal-including-properties reference t2))))))
(defun list-repeat-once (mylist)
(append mylist mylist))
@@ -156,7 +164,7 @@
(ert-deftest activating-mode-triggers-all-hooks ()
(add-hook 'csharp-mode-hook (lambda () (setq csharp-hook1 t)))
(add-hook 'prog-mode-hook (lambda () (setq csharp-hook2 t)))
-
+
(with-temp-buffer
(csharp-mode)
(should (equal t (and csharp-hook1
@@ -173,4 +181,4 @@
(should (equal orig-content indented-content))))
-;;(ert-run-tests-interactively t)
+;;(ert-run-tests-interactively t)q
diff --git a/test-files/fontification-test-compiler-directives.cs
b/test-files/fontification-test-compiler-directives.cs
index f87b45b..ffbaba8 100644
--- a/test-files/fontification-test-compiler-directives.cs
+++ b/test-files/fontification-test-compiler-directives.cs
@@ -8,11 +8,11 @@ public class Test
// reference
x += "foo";
- #region t1 test
+ #region v1 verification
x += "foo";
#endregion
- #region t2 test'
+ #region t1 test'
x += "foo";
#endregion
- [elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules., (continued)
- [elpa] externals/csharp-mode 0d35431 228/459: Fix fontification of namespaces to match using-statement rules., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c989a8 230/459: using: Don't mess up alnums in indentifier-fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5787aef 233/459: Update changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 14e0327 235/459: Bump version and updated-date., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5ca1702 236/459: Make csharp-mode-map inherit from prog-mode-map, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0f65654 245/459: Add regression test, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 628a4e2 248/459: Added testcases for region fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 79e0a60 256/459: New simpler build based on Cask, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bf613f8 274/459: Handle failure correctly, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5d0ffaa 113/459: Use cl-lib equivalents for incf and decf, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 6af6f88 111/459: Fix fontification tests.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 7247a27 115/459: Prefix set-difference from cl.el, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 71b0e96 116/459: Fix errors and warnings in unit-tests., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 56a9a87 117/459: Fix backwards compatibility and broken CI-build., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c446400 118/459: Remove obsolete comment, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 829ad4d 120/459: Another stab at fixing the CI., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ae1e36c 132/459: Tentative fix for imenu and generics, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1f292eb 141/459: Fixed fontification hanging on a large file (3kLOC)., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ee817b0 143/459: Added a test for imenu indexing of explicit interface properties., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7c196b7 144/459: Added a minimal imenu namespace test., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ffa8c3e 145/459: Fixed a test to use cl-caddr, ELPA Syncer, 2021/08/22