emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/csharp-mode f367ef6 135/459: Cleanup test-code for imen


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode f367ef6 135/459: Cleanup test-code for imenu-fixes.
Date: Sun, 22 Aug 2021 13:59:12 -0400 (EDT)

branch: externals/csharp-mode
commit f367ef6f49842b8fd099165bbe0e3d9e861f5f47
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Cleanup test-code for imenu-fixes.
---
 csharp-mode-tests.el | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 1225966..e44803c 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -169,33 +169,31 @@
 (ert-deftest imenu-parsing-supports-generic-parameters ()
   (let* ((find-file-hook '()) ;; avoid vc-mode file-hooks when opening!
          (buffer         (find-file-read-only 
"./test-files/imenu-generics-test.cs"))
-         (ignored        (beginning-of-buffer))
+         (beginning-of-buffer)
          (imenu-index    (csharp--imenu-create-index-helper nil "" t t)) ;; 
same line as in `csharp-imenu-create-index'.
          (class-entry    (cadr imenu-index))
          (class-entries  (cdr class-entry))
-         (class-items    (mapcar 'car class-entries))
-         (all-in-one     (cl-reduce 'concat class-items)))
+         (imenu-items    (mapconcat 'car class-entries " ")))
 
     ;; ("(top)" "method void NoGeneric(this IAppBuilder, params object[])" 
"method void OneGeneric<T>(this IAppBuilder, params object[])" "method void 
TwoGeneric<T1,T2>(this IAppBuilder, params object[])" "(bottom)")
-    (should (string-match-p "NoGeneric" all-in-one))
-    (should (string-match-p "OneGeneric<T>" all-in-one))
-    (should (string-match-p "TwoGeneric<T1,T2>" all-in-one))
+    (should (string-match-p "NoGeneric" imenu-items))
+    (should (string-match-p "OneGeneric<T>" imenu-items))
+    (should (string-match-p "TwoGeneric<T1,T2>" imenu-items))
     (kill-buffer buffer)))
 
 (ert-deftest imenu-parsing-supports-comments ()
   (let* ((find-file-hook '()) ;; avoid vc-mode file-hooks when opening!
          (buffer         (find-file-read-only 
"./test-files/imenu-comment-test.cs"))
-         (ignored        (beginning-of-buffer))
+         (beginning-of-buffer)
          (imenu-index    (csharp--imenu-create-index-helper nil "" t t)) ;; 
same line as in `csharp-imenu-create-index'.
          (class-entry    (cadr imenu-index))
          (class-entries  (cdr class-entry))
-         (class-items    (mapcar 'car class-entries))
-         (all-in-one     (cl-reduce 'concat class-items)))
+         (imenu-items    (mapconcat 'car class-entries " ")))
 
     ;; ("(top)" "method void NoGeneric(this IAppBuilder, params object[])" 
"method void OneGeneric<T>(this IAppBuilder, params object[])" "method void 
TwoGeneric<T1,T2>(this IAppBuilder, params object[])" "(bottom)")
-    (should (string-match-p "HasNoComment" all-in-one))
-    (should (string-match-p "HasComment" all-in-one))
-    (should (string-match-p "HasCommentToo" all-in-one))
+    (should (string-match-p "HasNoComment" imenu-items))
+    (should (string-match-p "HasComment" imenu-items))
+    (should (string-match-p "HasCommentToo" imenu-items))
     (kill-buffer buffer)))
 
 (defvar csharp-hook1 nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]