1 ;; Don't have a pat-hash for ruby, so we need something that pulls in
3 (load-file "./regexp-helper.el")
4 (load-file "../realgud/debugger/rdebug/init.el")
8 (setq bt (gethash "rails-backtrace" realgud-rdebug-pat-hash))
10 ;; FIXME: we get a void variable somewhere in here when running
11 ;; even though we define it in lexical-let. Dunno why.
12 ;; setq however will workaround this.
13 (setq text "/tmp/rails-2.3.5/lib/tasks/databases.rake:360")
15 (lexical-let ((text "/tmp/rails-2.3.5/lib/tasks/databases.rake:360"))
17 (assert-t (numberp (loc-match text bt)) "basic traceback location")
18 (assert-equal "/tmp/rails-2.3.5/lib/tasks/databases.rake"
19 (match-string (realgud-loc-pat-file-group bt)
20 text) "extract traceback file name")
22 (match-string (realgud-loc-pat-line-group bt)
23 text) "extract traceback line number")
27 "/tmp/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'"))
29 (assert-t (numberp (loc-match text bt)) "traceback location with in")
30 (assert-equal "/tmp/gems/rake-0.8.7/lib/rake.rb"
31 (match-string (realgud-loc-pat-file-group bt)
32 text) "extract traceback file name 2")
34 (match-string (realgud-loc-pat-line-group bt)
35 text) "extract breakpoint line number 2")