[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 30398e1 099/215: ipdb: add test
From: |
Rocky Bernstein |
Subject: |
[elpa] master 30398e1 099/215: ipdb: add test |
Date: |
Sat, 30 Jul 2016 14:48:57 +0000 (UTC) |
branch: master
commit 30398e16b54ed8525a4e5739de1b108e3362930e
Author: Sean Farley <address@hidden>
Commit: Sean Farley <address@hidden>
ipdb: add test
---
test/test-ipdb.el | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/test/test-ipdb.el b/test/test-ipdb.el
new file mode 100644
index 0000000..e82e56f
--- /dev/null
+++ b/test/test-ipdb.el
@@ -0,0 +1,39 @@
+;; 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" (file-name-directory
(locate-library "test-simple.elc")) buffer-file-name)
+
+(require 'test-simple)
+(require 'load-relative)
+(load-file "../realgud/debugger/ipdb/ipdb.el")
+
+(eval-when-compile (defvar test:run-process-save))
+
+(declare-function ipdb-parse-cmd-args 'realgud:ipdb-core)
+(declare-function realgud:ipdb 'realgud:ipdb)
+(declare-function __FILE__ 'load-relative)
+
+(test-simple-start)
+
+;; Save value realgud:run-process and change it to something we want
+(setq test:run-process-save (symbol-function 'realgud:run-process))
+(defun realgud:run-process(debugger-name script-filename cmd-args
+ minibuffer-histroy &optional no-reset)
+ "Fake realgud:run-process used in testing"
+ (note
+ (format "%s %s %s" debugger-name script-filename cmd-args))
+ (assert-equal "ipdb" debugger-name "debugger name gets passed")
+ (assert-equal (expand-file-name "./gcd.py") script-filename "file name
check")
+ (assert-equal '("3" "5") (cddr cmd-args) "command args listified")
+ )
+
+(note "ipdb-parse-cmd-args")
+(assert-equal (list nil '("ipdb") (list (expand-file-name "foo")) nil)
+ (ipdb-parse-cmd-args '("ipdb" "foo")))
+(assert-equal (list nil '("ipdb") (list (expand-file-name "program.py") "foo")
nil)
+ (ipdb-parse-cmd-args
+ '("ipdb" "program.py" "foo")))
+
+(realgud:ipdb "ipdb ./gcd.py 3 5")
+;; Restore the old value of realgud:run-process
+(fset 'realgud:run-process test:run-process-save)
+
+(end-tests)
- [elpa] master d3953ae 092/215: Fix bug in picking out short-key variable name introduced by recent changes, (continued)
- [elpa] master d3953ae 092/215: Fix bug in picking out short-key variable name introduced by recent changes, Rocky Bernstein, 2016/07/30
- [elpa] master 2facb99 075/215: init.el: break and clear command use %X rather than %l, Rocky Bernstein, 2016/07/30
- [elpa] master 7edc244 063/215: wrong args in jdb invocation; issue #51. Disable some jdb commands we, Rocky Bernstein, 2016/07/30
- [elpa] master ca52896 071/215: A workaround: reinitialize shell mode when going out of realgud-track-mode, Rocky Bernstein, 2016/07/30
- [elpa] master eee3112 089/215: track.el: Allow us to separate stem variable name to get debugger config from debugger name. This will make it easier, Rocky Bernstein, 2016/07/30
- [elpa] master 1eda9a1 076/215: Partially addresses #61. Handling multiple breakpoints on a line still, Rocky Bernstein, 2016/07/30
- [elpa] master a216bf0 084/215: Last commit set wrong variables, Rocky Bernstein, 2016/07/30
- [elpa] master 1420ff1 096/215: ipdb: add hook for completion to initialization, Rocky Bernstein, 2016/07/30
- [elpa] master 924969d 095/215: ipdb: add tab completion, Rocky Bernstein, 2016/07/30
- [elpa] master 518dccd 070/215: Merge branch 'master' of github.com:rocky/emacs-dbgr, Rocky Bernstein, 2016/07/30
- [elpa] master 30398e1 099/215: ipdb: add test,
Rocky Bernstein <=
- [elpa] master 6a5c71d 112/215: Merge pull request #80 from cpitclaudel/master, Rocky Bernstein, 2016/07/30
- [elpa] master 5bcb424 082/215: Add Kilian, Rocky Bernstein, 2016/07/30
- [elpa] master 75737a0 121/215: Merge pull request #90 from cpitclaudel/82-add-prefix-arg-to-c, Rocky Bernstein, 2016/07/30
- [elpa] master e8fc998 116/215: Merge pull request #85 from cpitclaudel/84-pdb-fixes, Rocky Bernstein, 2016/07/30
- [elpa] master 0cf9321 125/215: Small fixes in cmds.el, Rocky Bernstein, 2016/07/30
- [elpa] master 8c8f9f1 093/215: Not sure why this initialization was there, but it is syntactically, Rocky Bernstein, 2016/07/30
- [elpa] master 6a87f3c 097/215: ipdb: add tab completion to track-mode, Rocky Bernstein, 2016/07/30
- [elpa] master cfe2be3 107/215: Reinstate ipdb support, Rocky Bernstein, 2016/07/30
- [elpa] master d15f90a 132/215: Prepare for refactoring of realgud-cmd, Rocky Bernstein, 2016/07/30
- [elpa] master a1deb86 145/215: Show default buffer when automatically attaching, Rocky Bernstein, 2016/07/30