emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/realgud d496bcd 57/72: add test/test-keymap-cleanup.el


From: Stefan Monnier
Subject: [elpa] externals/realgud d496bcd 57/72: add test/test-keymap-cleanup.el for #275
Date: Fri, 26 Mar 2021 22:49:13 -0400 (EDT)

branch: externals/realgud
commit d496bcdf458677e4b50c0a09e567fef3efff625c
Author: 813 <813gan@protonmail.com>
Commit: 813 <813gan@protonmail.com>

    add test/test-keymap-cleanup.el for #275
---
 test/test-keymap-cleanup.el | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/test/test-keymap-cleanup.el b/test/test-keymap-cleanup.el
new file mode 100644
index 0000000..d5b8145
--- /dev/null
+++ b/test/test-keymap-cleanup.el
@@ -0,0 +1,34 @@
+;; Regression test for https://github.com/realgud/realgud/issues/275
+
+;; Press C-x C-e at the end of the next line to run this file test 
non-interactively
+;; (test-simple-run "emacs -batch -L %s -L %s -L %s -l %s" 
(file-name-directory (locate-library "load-relative.elc")) (file-name-directory 
(locate-library "test-simple.elc")) (file-name-directory (locate-library 
"loc-changes.elc")) buffer-file-name)
+
+(require 'test-simple)
+
+(test-simple-start)
+
+(note "realgud-keymap-cleanup")
+
+(setq temp-procbuf (generate-new-buffer "*procbuf-test*"))
+(setq temp-srcbuf (generate-new-buffer "*srcbuf-test*"))
+(with-current-buffer temp-srcbuf
+  (python-mode) )
+(setq debugger-name "pdb")
+(load-file "../realgud/debugger/pdb/pdb.el")
+
+(realgud-cmdbuf-init temp-procbuf debugger-name
+                    (gethash debugger-name realgud-pat-hash))
+(realgud-srcbuf-init-or-update temp-srcbuf temp-procbuf)
+
+(note "Realgud keys present in srcbuf")
+(with-current-buffer temp-srcbuf
+  (assert-t (equal 'realgud:cmd-step (key-binding (kbd "<f11>")))) )
+
+(realgud:terminate-srcbuf temp-srcbuf)
+
+(note "Realgud keys not present in srcbuf after quit")
+(with-current-buffer temp-srcbuf
+  (python-mode)
+  (assert-nil (equal 'realgud:cmd-step (key-binding (kbd "<f11>")))) )
+
+(end-tests)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]