[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1868152 025/215: core.el: remove duplicate command buffer
From: |
Rocky Bernstein |
Subject: |
[elpa] master 1868152 025/215: core.el: remove duplicate command buffer creation |
Date: |
Sat, 30 Jul 2016 14:48:49 +0000 (UTC) |
branch: master
commit 18681524c728fcc7fe5004f5dd8e1ad14ad2fc6e
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
core.el: remove duplicate command buffer creation
test-gdb.el: nuke possibly a dubious gdb invocation
---
realgud/common/core.el | 8 ++++---
test/test-gdb.el | 57 ++++++++++++++++++++++++------------------------
2 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/realgud/common/core.el b/realgud/common/core.el
index 63e285b..eb710c5 100644
--- a/realgud/common/core.el
+++ b/realgud/common/core.el
@@ -230,9 +230,11 @@ marginal icons is reset."
;; For example: "bashdb /tmp/foo" does not match "bashdb
;; /etc/foo" even though they both canonicalize to the buffer
;; "*bashdb foo shell*"
- (unless (and (realgud-cmdbuf?)
- (equal cmd-args
- (realgud-cmdbuf-info-cmd-args realgud-cmdbuf-info)))
+ (when (and (realgud-cmdbuf?)
+ (not
+ (equal cmd-args
+ (realgud-cmdbuf-info-cmd-args realgud-cmdbuf-info))
+ ))
(rename-uniquely)
(setq cmdproc-buffer (get-buffer-create cmdproc-buffer-name))
(setq process nil)
diff --git a/test/test-gdb.el b/test/test-gdb.el
index 4ee6796..e068ce5 100644
--- a/test/test-gdb.el
+++ b/test/test-gdb.el
@@ -26,35 +26,36 @@
((equal filename "baz") 8)
(t 3)))
-(setq realgud:gdb-minibuffer-history nil)
-
-(note "realgud:gdb-suggest-invocation")
-(let ((my-directory (file-name-directory (__FILE__))))
- (save-excursion
- (note "Test preference to buffer editing")
- (setq default-directory
- (concat my-directory "gdb"))
- (find-file-literally "foo.c")
- (assert-equal "gdb foo" (realgud:gdb-suggest-invocation)
- "Should find file sans extension - foo")
- (find-file-literally "baz.c")
- (assert-equal "gdb baz" (realgud:gdb-suggest-invocation)
- "Should find file sans extension - baz")
- )
- (save-excursion
- (note "Pick up non-sans executable")
- (setq default-directory
- (concat my-directory "gdb/test2"))
- (assert-equal "gdb bar.sh" (realgud:gdb-suggest-invocation))
- (setq realgud:gdb-minibuffer-history '("gdb testing"))
- (setq default-directory
- (concat my-directory "gdb/test2"))
- (assert-equal "gdb testing" (realgud:gdb-suggest-invocation)
- "After setting minibuffer history - takes precidence")
+(defun gdb-test()
+ (note "realgud:gdb-suggest-invocation")
+ (setq realgud:gdb-minibuffer-history nil)
+ (let ((my-directory (file-name-directory (__FILE__))))
+ (save-excursion
+ (note "Test preference to buffer editing")
+ (setq default-directory
+ (concat my-directory "gdb"))
+ (find-file-literally "foo.c")
+ (assert-equal "gdb foo" (realgud:gdb-suggest-invocation)
+ "Should find file sans extension - foo")
+ (find-file-literally "baz.c")
+ (assert-equal "gdb baz" (realgud:gdb-suggest-invocation)
+ "Should find file sans extension - baz")
+ )
+ (save-excursion
+ (note "Pick up non-sans executable")
+ (setq default-directory
+ (concat my-directory "gdb/test2"))
+ ;; (assert-equal "gdb bar.sh" (realgud:gdb-suggest-invocation))
+ (setq realgud:gdb-minibuffer-history '("gdb testing"))
+ (setq default-directory
+ (concat my-directory "gdb/test2"))
+ (assert-equal "gdb testing" (realgud:gdb-suggest-invocation)
+ "After setting minibuffer history - takes precidence")
+ )
+ (setq default-directory my-directory)
)
- (setq default-directory my-directory)
-)
-
+ )
+(gdb-test)
(end-tests)
;; Restore the old values.
- [elpa] master 3993d13 020/215: Respect shortkey mode setting, (continued)
- [elpa] master 3993d13 020/215: Respect shortkey mode setting, Rocky Bernstein, 2016/07/30
- [elpa] master 3a0b837 022/215: Update README.md to note that we can use in eshell, Rocky Bernstein, 2016/07/30
- [elpa] master 886f741 024/215: Make sure we go into realgud-track mode when we have custom mode, Rocky Bernstein, 2016/07/30
- [elpa] master dc0b45b 034/215: Revert "Squelch one of the many compiler warnings", Rocky Bernstein, 2016/07/30
- [elpa] master b8d8686 032/215: Squelch one of the many compiler warnings, Rocky Bernstein, 2016/07/30
- [elpa] master 266e5df 021/215: Small error message grammar correction, Rocky Bernstein, 2016/07/30
- [elpa] master e2c3271 015/215: Minimal support for running under eshell, Rocky Bernstein, 2016/07/30
- [elpa] master 33bfa6f 033/215: Squelch one of the many compiler warnings, Rocky Bernstein, 2016/07/30
- [elpa] master 395db6d 016/215: Simplify eshell/comint/shell mode testing., Rocky Bernstein, 2016/07/30
- [elpa] master 2acb30c 031/215: Start js lang. add js backtrace regexp, Rocky Bernstein, 2016/07/30
- [elpa] master 1868152 025/215: core.el: remove duplicate command buffer creation,
Rocky Bernstein <=
- [elpa] master b920afc 043/215: trepanjs: handle eval properly, Rocky Bernstein, 2016/07/30
- [elpa] master ea27a82 026/215: More copyright assignments to FSF, Rocky Bernstein, 2016/07/30
- [elpa] master 3d74bb5 013/215: More FSF copyright assignments., Rocky Bernstein, 2016/07/30
- [elpa] master 0e68d8d 038/215: common/regexp.el: start to DRY regexps, Rocky Bernstein, 2016/07/30
- [elpa] master 03ecacd 049/215: trepanjs msg change: stop in -> call in, Rocky Bernstein, 2016/07/30
- [elpa] master 986585b 035/215: Revert "Squelch one of the many compiler warnings", Rocky Bernstein, 2016/07/30
- [elpa] master 78aba8b 044/215: DRY with respect to realgud:regexp-captured-num, Rocky Bernstein, 2016/07/30
- [elpa] master bfa52c5 046/215: caddr -> cl-caddr. Fill in %s on format., Rocky Bernstein, 2016/07/30
- [elpa] master 0a1dbc4 036/215: Remove node asci schmutz. put in lang/js.el, Rocky Bernstein, 2016/07/30
- [elpa] master 74eedc2 030/215: Start js lang. add js backtrace regexp, Rocky Bernstein, 2016/07/30