2 (require 'load-relative)
3 (load-file "../realgud/debugger/trepan.pl/init.el")
4 (load-file "./regexp-helper.el")
7 (defvar realgud:trepanpl-pat-hash)
16 (defvar realgud-bt-pat)
17 (defvar realgud-perl-ignnore-file-re)
19 (declare-function __FILE__ 'load-relative)
23 (set (make-local-variable 'helper-bps)
24 (gethash "brkpt-set" realgud:trepanpl-pat-hash))
25 (set (make-local-variable 'prompt)
26 (gethash "prompt" realgud:trepanpl-pat-hash))
27 (set (make-local-variable 'helper-tb)
28 (gethash "lang-backtrace" realgud:trepanpl-pat-hash))
31 (note "prompt matching")
32 (set (make-local-variable 'prompt-pat)
33 (gethash "prompt" realgud:trepanpl-pat-hash))
34 (prompt-match "(trepanpl): ")
35 (prompt-match "((trepanpl)): " nil "nested debugger prompt: %s")
36 (setq prompt-str "trepanpl:")
37 (assert-nil (loc-match prompt-str prompt-pat)
38 (format "invalid prompt %s" prompt-str))
40 (setq test-text "Breakpoint 2 set in /tmp/File/Basename.pm at line 215")
42 (assert-t (numberp (bp-loc-match test-text))
43 "basic breakpoint location")
44 (assert-equal "/tmp/File/Basename.pm"
45 (match-string (realgud-loc-pat-file-group helper-bps)
47 "extract breakpoint file name"
50 (match-string (realgud-loc-pat-line-group helper-bps)
52 "extract breakpoint line number"
55 (setq test-text "Breakpoint 1 set in (eval 1177)[/Eval.pm:94] at line 5")
56 (assert-t (numberp (bp-loc-match test-text)) "eval breakpoint location")
58 (gethash "brkpt-set" realgud:trepanpl-pat-hash))
60 (gethash "debugger-backtrace" realgud:trepanpl-pat-hash))
62 (gethash "prompt" realgud:trepanpl-pat-hash))
64 (gethash "lang-backtrace" realgud:trepanpl-pat-hash))
67 (prompt-match "(trepanpl): ")
68 (prompt-match "((trepanpl)): " nil "nested debugger prompt: %s")
70 (setq test-text "Breakpoint 1 set in /tmp/gcd.pl at line 9")
72 (assert-t (numberp (loc-match test-text bps-pat))
73 "basic breakpoint location")
76 (assert-equal "/tmp/gcd.pl"
77 (match-string (realgud-loc-pat-file-group
79 "extract breakpoint file name")
82 (match-string (realgud-loc-pat-line-group
84 "extract breakpoint line number")