]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/test/test-trepan2.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / realgud / test / test-trepan2.el
1 (require 'test-simple)
2 (load-file "../realgud/debugger/trepan2/trepan2.el")
3 (load-file "../realgud/debugger/trepan2/core.el")
4 (load-file "../realgud.el")
5
6 (declare-function trepan2-parse-cmd-args 'realgud:trepan2)
7 (declare-function realgud:trepan2-find-file 'realgud:trepan2-core)
8 (declare-function __FILE__ 'load-relative)
9
10
11 (test-simple-start)
12
13 (note "trepan2-parse-cmd-args")
14
15 (assert-equal '(nil ("trepan2") ("foo") nil)
16 (trepan2-parse-cmd-args '("trepan2" "foo")))
17 (assert-equal '(nil ("trepan2" "-n") ("foo") nil)
18 (trepan2-parse-cmd-args '("trepan2" "-n" "foo")))
19 (assert-equal '(("/usr/bin/python") ("trepan2" "--different")
20 ("foo") nil)
21 (trepan2-parse-cmd-args
22 '("/usr/bin/python" "trepan2"
23 "--different" "foo")))
24 (assert-equal '(nil ("program.py") ("foo") nil)
25 (trepan2-parse-cmd-args '("program.py" "foo")))
26 (assert-equal '(nil ("trepan2") ("program.py" "foo") nil)
27 (trepan2-parse-cmd-args
28 '("trepan2" "program.py" "foo")))
29
30 (note "realgud:trepan2-find-file")
31 (assert-nil (realgud:trepan2-find-file "<string>")
32 "Should ignore psuedo file")
33
34 (eval-when-compile
35 (defvar test-python-file))
36
37 (set (make-local-variable 'test-python-file)
38 (concat (file-name-directory (__FILE__)) "gcd.py"))
39 (assert-equal test-python-file (realgud:trepan2-find-file test-python-file)
40 "Should ignore psuedo file")
41
42 (end-tests)