[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode f1a2e06 110/459: Add unit-test for fontific
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode f1a2e06 110/459: Add unit-test for fontification of compiler-directives. |
Date: |
Sun, 22 Aug 2021 13:59:07 -0400 (EDT) |
branch: externals/csharp-mode
commit f1a2e06ff25bd036859b9a1ce38849f76c75a4c6
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Add unit-test for fontification of compiler-directives.
---
csharp-mode-tests.el | 23 ++++++++++++++++++++++
.../fontification-test-compiler-directives.cs | 23 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 3db42f1..3c13be8 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -49,6 +49,29 @@
(should
(equal 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))
+ ;; get reference string
+ (move-to-line-after "reference")
+ (setq reference (get-current-line-contents))
+
+ ;; get verification string
+ (move-to-line-after "t1")
+ (setq t1 (get-current-line-contents))
+
+ ;; get verification string
+ (move-to-line-after "t2")
+ (setq t2 (get-current-line-contents))
+
+ ;; check equality
+ (should (equal reference t1))
+ (should (equal reference t2)))))
+
(defun list-repeat-once (mylist)
(append mylist mylist))
diff --git a/test-files/fontification-test-compiler-directives.cs
b/test-files/fontification-test-compiler-directives.cs
new file mode 100644
index 0000000..f87b45b
--- /dev/null
+++ b/test-files/fontification-test-compiler-directives.cs
@@ -0,0 +1,23 @@
+using System;
+
+public class Test
+{
+ public void Test()
+ {
+ string x;
+
+ // reference
+ x += "foo";
+ #region t1 test
+ x += "foo";
+ #endregion
+
+ #region t2 test'
+ x += "foo";
+ #endregion
+
+ #region t2 - test"
+ x += "foo";
+ #endregion
+ }
+}
- [elpa] externals/csharp-mode ae1e36c 132/459: Tentative fix for imenu and generics, (continued)
- [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
- [elpa] externals/csharp-mode f08f0ee 154/459: Improved test-structure with less redundant information (and thus errors). Prepare for improved tests., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7b8fe05 160/459: Fix version-history based on actual git-tags., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 838727a 173/459: Ensure we get Emacs 24.4 for CI., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 405af61 076/459: Fix parsing of build-logs., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1574d3e 085/459: Merge pull request #32 from binki/master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f1a2e06 110/459: Add unit-test for fontification of compiler-directives.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 7856be4 123/459: Merge pull request #50 from syohex/workaround-18845, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 257602e 121/459: Test-file for https://github.com/josteink/csharp-mode/issues/46, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ef9d3f9 134/459: Update changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 367ecc2 137/459: Clean up test-code., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e1a7622 138/459: Tenative fixes for compilation-mode., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2ddd3c2 142/459: Merge pull request #62 from shoover/fontification-hang, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b11fcda 147/459: Imenu: Add support for interface-prefixed methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bc3bd2a 155/459: Fix devenv.com output-parsing, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9743156 158/459: Test-case for fontification error, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 57b2353 161/459: Bump version since we're working on vNext, ELPA Syncer, 2021/08/22