branch: master
commit acdec5b3923373ca00af0c4905765f95ac80fcde
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Add an integration test for digit args in amaranth
* hydra-test.el (hydra-simple-1): Rename.
(hydra-simple-2): New auxiliary hydra.
(hydra-integration-2): Add test.
Re #104
---
hydra-test.el | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/hydra-test.el b/hydra-test.el
index fcb34c5..23616ee 100644
--- a/hydra-test.el
+++ b/hydra-test.el
@@ -1172,11 +1172,16 @@ _w_ Worf: % -8`hydra-tng/worf^^
_h_ Set phasers to
body-pre)
'(funcall (function foo)))))
-(defhydra hydra-simple (global-map "C-c")
+(defhydra hydra-simple-1 (global-map "C-c")
("a" (insert "j"))
("b" (insert "k"))
("q" nil))
+(defhydra hydra-simple-2 (global-map "C-c" :color amaranth)
+ ("c" self-insert-command)
+ ("d" self-insert-command)
+ ("q" nil))
+
(defmacro hydra-with (in &rest body)
`(let ((temp-buffer (generate-new-buffer " *temp*")))
(save-window-excursion
@@ -1217,6 +1222,16 @@ _w_ Worf: % -8`hydra-tng/worf^^
_h_ Set phasers to
(execute-kbd-macro "aaqaabbaa"))
"jjkkaaqaabbaa|")))
+(ert-deftest hydra-integration-2 ()
+ (should (string= (hydra-with "|"
+ (execute-kbd-macro
+ (kbd "C-c c 1 c 2 d 4 c q")))
+ "ccddcccc|"))
+ (should (string= (hydra-with "|"
+ (execute-kbd-macro
+ (kbd "C-c c 1 c C-u d C-u 10 c q")))
+ "ccddddcccccccccc|")))
+
(provide 'hydra-test)
;;; hydra-test.el ends here