Commit 7318480c authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

* test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp'

and `ruby-backward-sexp' that fail when `ruby-use-smie' is t.

* test/indent/ruby.rb: Two more failing examples.
parent 5cd9cda9
2013-10-06 Dmitry Gutov <dgutov@yandex.ru>
* automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp'
and `ruby-backward-sexp' that fail when `ruby-use-smie' is t.
* indent/ruby.rb: Fix a syntax error, add a few failing examples.
2013-10-05 Stefan Monnier <monnier@iro.umontreal.ca>
......
......@@ -586,6 +586,30 @@ VALUES-PLIST is a list with alternating index and value elements."
(end-of-defun)
(should (= 5 (line-number-at-pos)))))
;; Tests below fail when using SMIE.
(defvar ruby-sexp-test-example
(ruby-test-string
"class C
| def foo
| self.end
| D.new.class
| end
|end"))
(ert-deftest ruby-forward-sexp-skips-method-calls-with-keyword-names ()
(ruby-with-temp-buffer ruby-sexp-test-example
(goto-line 2)
(ruby-forward-sexp)
(should (= 5 (line-number-at-pos)))))
(ert-deftest ruby-backward-sexp-skips-method-calls-with-keyword-names ()
(ruby-with-temp-buffer ruby-sexp-test-example
(goto-line 5)
(end-of-line)
(ruby-backward-sexp)
(should (= 2 (line-number-at-pos)))))
(provide 'ruby-mode-tests)
;;; ruby-mode-tests.el ends here
......@@ -123,3 +123,9 @@ def test2 (arg)
desc "foo foo" \
"bar bar"
foo.
bar
foo
.bar
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment