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>
(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