branch: master
commit 684f8a2d71ea7b515fd1de3b6d15973a40002576
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Add integration test for red hydras temporarily exiting
* hydra-test.el (hydra-simple-3): Add.
(hydra-integration-3): Add.
Re #109
---
hydra-test.el | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/hydra-test.el b/hydra-test.el
index 7d361e6..d9adba6 100644
--- a/hydra-test.el
+++ b/hydra-test.el
@@ -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