[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/assess 2399936d5b 2/2: Fix assess-robot-execute-kmacro,
From: |
ELPA Syncer |
Subject: |
[elpa] externals/assess 2399936d5b 2/2: Fix assess-robot-execute-kmacro, fix tests emacs<29 |
Date: |
Tue, 27 Feb 2024 12:57:49 -0500 (EST) |
branch: externals/assess
commit 2399936d5b75094ed0e131b3f9d48041005383e2
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Fix assess-robot-execute-kmacro, fix tests emacs<29
assess-robot-execute-kmacro was previously parsing the macro twice for
no obvious reason, which was causing breakage in Emacs-29.
The makefile now allows testing against various versions of Emacs
independently.
assess-test.el depends in a couple of places on the auto-mode-alist
binding which was broken by moving the fake elisp files to an "eld"
extension, for Emacs<29. We now set that explicitly.
---
Makefile | 13 ++++++++-----
assess-robot.el | 3 +--
test/assess-test.el | 24 +++++++++++++++---------
3 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index 434074e16c..99ac5ae86a 100644
--- a/Makefile
+++ b/Makefile
@@ -53,17 +53,22 @@ test-cp:
test-git:
docker run -it --rm --name docker-git -v $(PWD):/usr/src/app -w
/usr/src/app --entrypoint=/bin/bash silex/emacs:$(DOCKER_TAG)-ci-cask
./test-from-git
-multi-test-cp:
+
+test-cp-29.1:
$(MAKE) test-cp DOCKER_TAG=29.1
+
+test-cp-28.2:
$(MAKE) test-cp DOCKER_TAG=28.2
+
+test-cp-27.2:
$(MAKE) test-cp DOCKER_TAG=27.2
+
+multi-test-cp: test-cp-29.1 test-cp-28.2 test-cp-27.2
$(MAKE) test-cp DOCKER_TAG=26.2
$(MAKE) test-cp DOCKER_TAG=26.1
$(MAKE) test-cp DOCKER_TAG=25.3
$(MAKE) test-cp DOCKER_TAG=25.2
$(MAKE) test-cp DOCKER_TAG=25.1
- $(MAKE) test-cp DOCKER_TAG=24.5
- $(MAKE) test-cp DOCKER_TAG=24.4
$(MAKE) test-cp DOCKER_TAG=master
multi-test-git:
@@ -76,5 +81,3 @@ multi-test-git:
$(MAKE) test-git DOCKER_TAG=25.3
$(MAKE) test-git DOCKER_TAG=25.2
$(MAKE) test-git DOCKER_TAG=25.1
- $(MAKE) test-git DOCKER_TAG=24.5
- $(MAKE) test-git DOCKER_TAG=24.4
diff --git a/assess-robot.el b/assess-robot.el
index 8bb14f86c5..641706f947 100644
--- a/assess-robot.el
+++ b/assess-robot.el
@@ -81,8 +81,7 @@ In this case, MACRO is the \"long form\" accepted by
;; edit-kdb-macro provides no nice entry point. So, we take the nasty step
;; of setting the last-kbd-macro instead.
(setq last-kbd-macro macro)
- (execute-kbd-macro
- (read-kbd-macro macro))))
+ (execute-kbd-macro macro)))
(defun assess-robot-copy-and-finish ()
"Copy the macro in edmacro to the `kill-ring'."
diff --git a/test/assess-test.el b/test/assess-test.el
index f93e1710df..318d9b3df0 100644
--- a/test/assess-test.el
+++ b/test/assess-test.el
@@ -415,19 +415,25 @@ This also tests the advice on string=."
(ert-deftest assess-test-file-roundtrip-indentation= ()
(should
- (assess-file-roundtrip-indentation=
- assess-dev-elisp-indented))
+ (let ((auto-mode-alist '((".*" . emacs-lisp-mode))))
+ (assess-file-roundtrip-indentation=
+ assess-dev-elisp-indented)))
(should-not
- (assess-file-roundtrip-indentation=
- assess-dev-elisp-unindented)))
+ (let ((auto-mode-alist '((".*" . emacs-lisp-mode))))
+ (assess-file-roundtrip-indentation=
+ assess-dev-elisp-unindented))))
(ert-deftest assess-test-file-roundtrip-indentation-explain= ()
+ ;; let bind auto-mode-alist because ".eld" is not associated with
+ ;; emacs-lisp-mode before Emacs-29. Putting the let binding here
+ ;; rather than in the lambda is necessary for reasons I don't quite
understand
(should
- (assess-test--explanation
- (lambda ()
- (should
- (assess-file-roundtrip-indentation=
- assess-dev-elisp-unindented))))))
+ (let ((auto-mode-alist '((".*" . emacs-lisp-mode))))
+ (assess-test--explanation
+ (lambda ()
+ (should
+ (assess-file-roundtrip-indentation=
+ assess-dev-elisp-unindented)))))))
;; ** Face Tests
(defvar assess-dev-elisp-fontified