[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 5a7c4c6 20/87: Test for Issue #437
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode 5a7c4c6 20/87: Test for Issue #437 |
Date: |
Wed, 14 Apr 2021 18:47:00 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit 5a7c4c664ff991d6c983bb6e6afda2650651ce1c
Author: Fidler <matthew.fidler@gmail.com>
Commit: Fidler <matthew.fidler@gmail.com>
Test for Issue #437
---
ergoemacs-test.el | 53 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 49 insertions(+), 4 deletions(-)
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index b0680dd..2682d43 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -1,6 +1,6 @@
;;; ergoemacs-test.el --- tests for ErgoEmacs issues
-;; Copyright © 2013-2015 Free Software Foundation, Inc.
+;; Copyright © 2013-2016 Free Software Foundation, Inc.
;; Maintainer: Matthew L. Fidler
;; Keywords: convenience
@@ -895,8 +895,8 @@ Should test issue #142"
(kill-buffer (current-buffer)))
(setq input-decode-map (copy-keymap old-map)))
(should ret)))
-;;; Key inheritance
+;;; Key inheritance
(ert-deftest ergoemacs-key-inheitance-alt-up-and-down ()
"Test M-up and M-down keys make sure they are moving lines"
(ergoemacs-require 'move-and-transpose-lines)
@@ -1365,6 +1365,48 @@ Should test issue #142"
(when (file-exists-p w-file)
(delete-file w-file))))
+(ert-deftest ergoemacs-test-issue-437 ()
+ "Test windmove bindings should be set everywhere."
+ :tags '(:slow)
+ (let* ((emacs-exe (ergoemacs-emacs-exe))
+ (w-file (expand-file-name "global-test" ergoemacs-dir))
+ (temp-file (make-temp-file "ergoemacs-test" nil ".el")))
+ (with-temp-file temp-file
+ (insert "(eval-when-compile (require 'ergoemacs-macros) (require 'cl))"
+ (or (and (boundp 'wait-for-me)
+ "(setq debug-on-error t debug-on-quit t)") "")
+ "(ergoemacs-package foo \n"
+ ":bind* ((\"<M-left>\" . windmove-left)"
+ "(\"<M-right>\" . windmove-right)"
+ "(\"<M-up>\" . windmove-up)"
+ "(\"<M-down>\" . windmove-down)))"
+ "(setq ergoemacs-mode--start-p t)"
+ "(ergoemacs-mode 1)\n"
+ "(when (and (eq (key-binding (kbd \"<M-left>\"))
'windmove-left)\n"
+ " (eq (key-binding (kbd \"<M-right>\"))
'windmove-right)\n"
+ " (eq (key-binding (kbd \"<M-up>\")) 'windmove-up)\n"
+ " (eq (key-binding (kbd \"<M-down>\"))
'windmove-down))\n"
+ "(with-temp-file \"" w-file "\")\n"
+ " (message \"Passed\")"
+ " (insert \"Found\"))\n"
+ (or (and (boundp 'wait-for-me) "")
+ "(kill-emacs)")))
+ (byte-compile-file temp-file)
+ (message "%s"
+ (shell-command-to-string
+ (format "%s %s -Q -L %s -l %s -l %s"
+ emacs-exe (if (boundp 'wait-for-me) "-debug-init"
"--batch")
+ (expand-file-name (file-name-directory (locate-library
"ergoemacs-mode")))
+ (expand-file-name (file-name-sans-extension
(locate-library "ergoemacs-mode")))
+ temp-file)))
+ (should (file-exists-p w-file))
+ (when (file-exists-p temp-file)
+ (delete-file temp-file))
+ (when (file-exists-p (concat temp-file "c"))
+ (delete-file (concat temp-file "c")))
+ (when (file-exists-p w-file)
+ (delete-file w-file))))
+
;;; Not sure why this doesn't actually use `ergoemacs-test-major-mode-map'.
(define-derived-mode ergoemacs-test-major-mode fundamental-mode "ET"
"Major mode for testing some issues with `ergoemacs-mode'.
@@ -1779,8 +1821,10 @@ hash appropriaetly."
(lambda()
(throw 'found-key (mapcar (lambda(key) (if (consp key)
(key-binding (eval
key))
- (key-binding key)))
',keys)))))
- ,minibuffer-call) nil))
+ (key-binding key)))
+ ',keys)))))
+ ,minibuffer-call)
+ nil))
(ert-deftest ergoemacs-test-icy-407-minibuffer ()
"Test minibuffer keybindings for `icy-mode'.
@@ -1800,6 +1844,7 @@ M-r = `kill-word'"
'(previous-history-element next-history-element forward-word
ergoemacs-move-cursor-next-pane kill-word)))))
(icy-mode -1))
+
(provide 'ergoemacs-test)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ergoemacs-test.el ends here
- [elpa] externals/ergoemacs-mode d36e6390 24/87: Defer ergoemacs override setup, (continued)
- [elpa] externals/ergoemacs-mode d36e6390 24/87: Defer ergoemacs override setup, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 7e31354 33/87: Merge pull request #450 from MicroAnibal/PotugueseLayout, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 9acd205 34/87: Fix Issue #451 by coding a new old binding function, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 8ea44c2 18/87: Bug fix for modifiers, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 6a3214e 58/87: Merge pull request #490 from Valdaer/keep-region-selected-after-ctrl-c, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 0a9e83e 37/87: Fix eurgoemacs to be ergoemacs. See Issue #453, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 3ea0220 31/87: Add Qwidget for nomachine, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode a87fae7 45/87: Fix passing of multiple forms for evaluation on new emacs process, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 8a65bf2 59/87: Fix typos (dispaly -> display), Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 427d0e4 16/87: Only echo on prefix keys, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 5a7c4c6 20/87: Test for Issue #437,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 3ce23bb 49/87: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode fad3ed1 56/87: Fixed not removing visible selection when ergoemacs-keep-region-after-copy is set to true., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode d51ae7e 35/87: Merge remote-tracking branch 'origin/master', Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 4769abe 61/87: Update Mac instructions to swap Command and Alt, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 981ffb3 21/87: Fix Issue #437, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 730306e 66/87: Merge pull request #495 from wlandry/mac_meta_alt_switch, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 4710b5f 14/87: Fix eating of the variable, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode daec6a1 38/87: May Fix Issue #453, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 7b06006 44/87: Merge pull request #465 from MicroAnibal/FixLayoutsTypo, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 3e6fea9 41/87: Possibly fix #453, Stefan Monnier, 2021/04/14