[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 1f1b21b633 1/2: Fix Emacs-29 latest breaks
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 1f1b21b633 1/2: Fix Emacs-29 latest breaks |
Date: |
Sat, 7 May 2022 09:58:00 -0400 (EDT) |
branch: elpa/cider
commit 1f1b21b633b4bd9d511329ba11bb66a18d8fc407
Author: ikappaki <ikappaki@users.noreply.github.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Fix Emacs-29 latest breaks
---
test/cider-eldoc-tests.el | 3 +++
test/cider-repl-tests.el | 25 ++-----------------------
test/nrepl-bencode-tests.el | 9 +++++++++
3 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/test/cider-eldoc-tests.el b/test/cider-eldoc-tests.el
index 0e3cc2a34f..295a1a3234 100644
--- a/test/cider-eldoc-tests.el
+++ b/test/cider-eldoc-tests.el
@@ -122,6 +122,7 @@
(describe "cider-eldoc-beginning-of-sexp"
(it "moves to the beginning of the sexp"
(with-temp-buffer
+ (clojure-mode)
(save-excursion
(insert "(a (b b) (c c) d)"))
(search-forward "d")
@@ -131,6 +132,7 @@
(it "returns the number sexp the point was over or after"
(with-temp-buffer
+ (clojure-mode)
(save-excursion
(insert "(a (b b) (c c) d)"))
(search-forward "d")
@@ -140,6 +142,7 @@
(it "returns nil if the maximum number of sexps to skip is exceeded"
(with-temp-buffer
+ (clojure-mode)
(save-excursion
(insert "(a (b b) (c c) d)"))
(search-forward "d")
diff --git a/test/cider-repl-tests.el b/test/cider-repl-tests.el
index dcd56d73ca..84e247656e 100644
--- a/test/cider-repl-tests.el
+++ b/test/cider-repl-tests.el
@@ -169,7 +169,7 @@
))))
(defun simulate-cider-output (s property)
- "Return properties from `cider-repl--emit-output'.
+ "Return S's properties from `cider-repl--emit-output'.
PROPERTY should be a symbol of either 'text, 'ansi-context or
'properties."
(let ((strings (if (listp s) s (list s))))
@@ -192,28 +192,7 @@ PROPERTY should be a symbol of either 'text, 'ansi-context
or
(describe "when the escape code is invalid"
(it "doesn't hold the string looking for a close tag"
(expect (simulate-cider-output "\033hi" 'text)
- :to-equal "\033hi\n")
- (expect (simulate-cider-output "\033hi" 'ansi-context)
- :to-equal nil)
-
- ;; Informational: Ideally, we would have liked any non-SGR
- ;; sequence to appear on the output verbatim, but as per the
- ;; `ansi-color-apply' doc string, they are removed
- ;;
- ;; """Translates SGR control sequences into text properties.
- ;; Delete all other control sequences without processing them."""
- ;;
- ;; e.g.:
- (expect (simulate-cider-output
- "\033[hi" 'text) :to-equal "i\n")
- (expect (simulate-cider-output
- '("\033[" "hi") 'text) :to-equal "i\n")
- ))
-
- (describe "when the escape code is valid"
- (it "preserves the context"
- (let ((context (simulate-cider-output "[30ma[0mb[31mcd"
'ansi-context)))
- (expect context :to-equal '((31) nil))))))
+ :to-equal "\033hi\n"))))
(describe "cider-locref-at-point"
(it "works with stdout-stacktrace refs"
diff --git a/test/nrepl-bencode-tests.el b/test/nrepl-bencode-tests.el
index dc75fab7fb..32165ceb86 100644
--- a/test/nrepl-bencode-tests.el
+++ b/test/nrepl-bencode-tests.el
@@ -31,6 +31,15 @@
(require 'cl-lib)
(require 'nrepl-client)
+;; Workaround for silex/master-dev issue with buggy old snapshot. To be
removed
+;; once new snapshot image is build.
+(when (= emacs-major-version 29)
+ (cl-struct-define 'queue nil 'cl-structure-object 'record nil
+ '((cl-tag-slot)
+ (head)
+ (tail))
+ 'cl-struct-queue-tags 'queue 't))
+
(defun nrepl-bdecode-string (string)
"Return first complete object in STRING.
If object is incomplete, return a decoded path."