1 (load-file "./regexp-helper.el")
2 (load-file "../realgud/debugger/pydbgr/init.el")
6 (setup-regexp-vars realgud-pydbgr-pat-hash)
8 ;; FIXME: we get a void variable somewhere in here when running
9 ;; even though we define it in lexical-let. Dunno why.
10 ;; setq however will workaround this.
11 (setq text " File \"/usr/lib/python2.6/code.py\", line 281, in raw_input")
13 (note "traceback location matching")
14 (assert-t (numberp (loc-match text helper-tb)) "basic traceback location")
15 (assert-equal "/usr/lib/python2.6/code.py"
16 (match-string (realgud-loc-pat-file-group helper-tb)
18 (format "Failing file group is %s"
19 (realgud-loc-pat-file-group helper-tb) "extract file name"))
21 (match-string (realgud-loc-pat-line-group helper-tb)
22 text) "extract line number")
24 (note "breakpoint location matching")
25 (lexical-let ((text "Breakpoint 1 set at line 13 of file /src/git/code/gcd.py"))
26 (assert-t (numberp (loc-match text helper-bps)) "basic breakpoint location")
27 (assert-equal "/src/git/code/gcd.py"
28 (match-string (realgud-loc-pat-file-group helper-bps)
29 text) "extract breakpoint file name")
31 (match-string (realgud-loc-pat-line-group helper-bps)
32 text) "extract breakpoint line number")
35 (note "prompt matching")
36 (lexical-let ((text "(c:\\working\\python\\helloworld.py:30): <module>"))
37 (assert-t (numberp (loc-match text helper-loc)) "MS DOS position location")
38 (assert-equal "c:\\working\\python\\helloworld.py"
39 (match-string (realgud-loc-pat-file-group helper-loc)
41 (format "Failing file group is %s"
42 (realgud-loc-pat-file-group helper-tb) "extract file name"))
44 (match-string (realgud-loc-pat-line-group helper-loc)
45 text) "extract line number")
48 (lexical-let ((text "(/usr/bin/ipython:24): <module>"))
49 (assert-t (numberp (loc-match text helper-loc)) "position location")
50 (assert-equal "/usr/bin/ipython"
51 (match-string (realgud-loc-pat-file-group helper-loc)
53 (format "Failing file group is %s"
54 (realgud-loc-pat-file-group helper-tb) "extract file name"))
56 (match-string (realgud-loc-pat-line-group helper-loc)
57 text) "extract line number")
61 ((text "(/tmp/eval_stringzDKTfr.py:1 remapped <string>): <module>"))
62 (assert-t (numberp (loc-match text helper-loc)) "position location")
63 (assert-equal "/tmp/eval_stringzDKTfr.py"
64 (match-string (realgud-loc-pat-file-group helper-loc)
66 (format "Failing file group is %s"
67 (realgud-loc-pat-file-group helper-tb) "extract file name"))
69 (match-string (realgud-loc-pat-line-group helper-loc)
70 text) "extract line number")