aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov2013-07-03 05:02:18 +0400
committerDmitry Gutov2013-07-03 05:02:18 +0400
commit3086ca2e2cf739cc7fd667b16c676522aecf4112 (patch)
treee49bfa18fae35f17ed64096e8d9d2c02e5e84de5 /test
parent9bd3668269180bb28ee33ded00010ab1f5ae6dd6 (diff)
downloademacs-3086ca2e2cf739cc7fd667b16c676522aecf4112.tar.gz
emacs-3086ca2e2cf739cc7fd667b16c676522aecf4112.zip
* lisp/progmodes/ruby-mode.el (ruby-move-to-block): When we're at a
middle of block statement initially, lower the depth. Remove FIXME comment, not longer valid. Remove middle of block statement detection, no need to do that anymore since we've been using `ruby-parse-region' here.
Diffstat (limited to 'test')
-rw-r--r--test/automated/ruby-mode-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index a18899df02f..02582e8ad2d 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -546,6 +546,17 @@ VALUES-PLIST is a list with alternating index and value elements."
546 (ruby-beginning-of-block)) 546 (ruby-beginning-of-block))
547 (should (= 1 (line-number-at-pos))))) 547 (should (= 1 (line-number-at-pos)))))
548 548
549(ert-deftest ruby-move-to-block-moves-from-else-to-if ()
550 (ruby-with-temp-buffer (ruby-test-string
551 "if true
552 | nested_block do
553 | end
554 |else
555 |end")
556 (goto-line 4)
557 (ruby-beginning-of-block)
558 (should (= 1 (line-number-at-pos)))))
559
549(ert-deftest ruby-beginning-of-defun-does-not-fold-case () 560(ert-deftest ruby-beginning-of-defun-does-not-fold-case ()
550 (ruby-with-temp-buffer 561 (ruby-with-temp-buffer
551 (ruby-test-string 562 (ruby-test-string