Sha256: c7c73c908370153e32ec9e5622c4b9f46031f1915344f29ed2bb2cfd31f76770

Contents?: true

Size: 1.92 KB

Versions: 35

Compression:

Stored size: 1.92 KB

Contents

;; -*- emacs-lisp -*-
;; This program has to be run from the directory it is currently in and
;; the rdebug code has to be in the parent directory
(load-file "./elk-test.el")

;; FIXME? Should we use "require 'rdebug" here.
;; Would have to prepend . to load-path. 
(load-file "../rdebug.el")
(load-file "../rdebug-regexp.el")
(load-file "../rdebug-frames.el")

(make-variable-buffer-local 'gud-rdebug-marker-acc)

(deftest "rdebug-stack-buffer-field-test"
  (let ((buf (generate-new-buffer "testing")))
    (save-excursion
      (switch-to-buffer buf)
      (insert 
       "--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line /tmp/gcd.rb:4\n")
      (insert
       "       at line /foo/bar/custom_require.rb:27\n")

      (goto-char (point-min))
      (let* ((b (line-beginning-position)) (e (line-end-position))
	     (s (buffer-substring b e))
	     (file nil) (line nil))
	(assert-nonnil (string-match rdebug-stack-frame-regexp s))
	(assert-equal "/tmp/gcd.rb" (rdebug-stack-buffer-field
				     s b
				     rdebug-stack-frame-file-group
				     font-lock-comment-face))
	(assert-equal "4" (rdebug-stack-buffer-field
			   s b
			   rdebug-stack-frame-line-group
			   font-lock-constant-face))
	(forward-line)
	(setq b (line-beginning-position))
	(setq e (line-end-position))
	(setq s (buffer-substring b e))
	(assert-nonnil (string-match rdebug-stack-frame-2nd-regexp s))
	(assert-equal "/foo/bar/custom_require.rb" 
		      (rdebug-stack-buffer-field
		       s b
		       rdebug-stack-frame-2nd-file-group
		       font-lock-comment-face))
	(assert-equal "27" (rdebug-stack-buffer-field
			    s b
			    rdebug-stack-frame-2nd-line-group
			    font-lock-constant-face))
	))
    (kill-buffer buf)))


;; -------------------------------------------------------------------
;; Build and run the test suite.
;;

(build-suite "rdebug-suite" 
	     "rdebug-stack-buffer-field-test")
(run-elk-test "rdebug-suite"
              "test things in rdebug-frames.el")

Version data entries

35 entries across 34 versions & 5 rubygems

Version Path
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/debugger-1.6.8/emacs/test/test-frames.el
debugger-1.6.8 emacs/test/test-frames.el
debugger-1.6.7 emacs/test/test-frames.el
debugger-1.6.6 emacs/test/test-frames.el
debugger-1.6.5 emacs/test/test-frames.el
debugger-1.6.4 emacs/test/test-frames.el
debugger-1.6.3 emacs/test/test-frames.el
debugger-1.6.2 emacs/test/test-frames.el
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/debugger-1.6.1/emacs/test/test-frames.el
candlepin-api-0.4.0 bundle/ruby/gems/debugger-1.6.1/emacs/test/test-frames.el
debugger-1.6.1 emacs/test/test-frames.el
debugger-1.6.0 emacs/test/test-frames.el
debugger2-1.0.0.beta2 emacs/test/test-frames.el
debugger2-1.0.0.beta1 emacs/test/test-frames.el
debugger-1.5.0 emacs/test/test-frames.el
needy_debugger-1.4.0 emacs/test/test-frames.el
debugger-1.4.0 emacs/test/test-frames.el
debugger-1.3.3 emacs/test/test-frames.el
debugger-1.3.2 emacs/test/test-frames.el
debugger-1.3.1 emacs/test/test-frames.el