]> code.delx.au - gnu-emacs-elpa/commitdiff
Add integration test for red hydras temporarily exiting
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 15 Apr 2015 06:49:39 +0000 (08:49 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 15 Apr 2015 06:49:39 +0000 (08:49 +0200)
* hydra-test.el (hydra-simple-3): Add.
(hydra-integration-3): Add.

Re #109

hydra-test.el

index 7d361e6de1f7b876084a7d4efbb1a7b9456b0a6c..d9adba66e0f5fbf5fd5ac8e0c2aea5d11e1c931d 100644 (file)
@@ -1198,6 +1198,11 @@ _w_ Worf:                      % -8`hydra-tng/worf^^    _h_ Set phasers to
   ("d" self-insert-command)
   ("q" nil))
 
+(defhydra hydra-simple-3 (global-map "C-c")
+  ("g" goto-line)
+  ("1" find-file)
+  ("q" nil))
+
 (defmacro hydra-with (in &rest body)
   `(let ((temp-buffer (generate-new-buffer " *temp*")))
      (save-window-excursion
@@ -1248,6 +1253,12 @@ _w_ Worf:                      % -8`hydra-tng/worf^^    _h_ Set phasers to
                                 (kbd "C-c c 1 c C-u d C-u 10 c q")))
                    "ccddddcccccccccc|")))
 
+(ert-deftest hydra-integration-3 ()
+  (should (string= (hydra-with "foo\nbar|"
+                               (execute-kbd-macro
+                                (kbd "C-c g 1 RET q")))
+                   "|foo\nbar")))
+
 (provide 'hydra-test)
 
 ;;; hydra-test.el ends here