2 (load-file "../realgud/common/buffer/source.el")
3 (load-file "../realgud/common/loc.el")
5 (declare-function __FILE__ 'load-relative)
6 (declare-function make-realgud-loc 'realgud-loc)
7 (declare-function realgud-loc-cmd-marker 'realgud-loc)
8 (declare-function realgud-loc-line-number 'realgud-loc)
9 (declare-function realgud-loc-marker 'realgud-loc)
10 (declare-function realgud-loc-marker= 'realgud-loc)
16 ;; Below, we need to make sure current-buffer has an associated
18 (find-file (symbol-file 'test-simple))
20 (note "location field extraction")
21 (let* ((buff (current-buffer))
22 (filename (buffer-file-name buff))
23 (source-marker (point-marker))
24 (cmd-marker (point-marker))
25 (good-loc (make-realgud-loc
29 :cmd-marker cmd-marker
31 (good-loc2 (make-realgud-loc
35 :cmd-marker cmd-marker
37 ;; (good-loc3 (realgud-loc-current buff cmd-marker))
40 (assert-equal 5 (realgud-loc-line-number good-loc) "line-number extraction")
42 (assert-equal source-marker (realgud-loc-marker good-loc)
43 "source code marker extraction")
46 (assert-equal cmd-marker (realgud-loc-cmd-marker good-loc)
47 "command process marker extraction")
50 (realgud-loc-marker= good-loc2 source-marker)
51 (assert-equal source-marker (realgud-loc-marker good-loc2)
58 ; TODO: add test for debug-loc-goto, e.g.
59 ;(realgud-loc-goto (realgud-loc-new "/tmp/bashdb.diff" 8))
60 ;(realgud-loc-goto (realgud-loc-new "/tmp/bashdb.diff" 8) 'other-window 1)