From: Dmitry Gutov Date: Sun, 6 Oct 2013 01:21:51 +0000 (+0300) Subject: * test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp' X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1373 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7318480cec373d97bb98b50746c433c4db59a6b8;p=emacs.git * 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. --- diff --git a/test/ChangeLog b/test/ChangeLog index bc9addb810b..7392010cb93 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,8 @@ 2013-10-06 Dmitry Gutov + * 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 diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index ad805f16777..861ab9b6125 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -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 diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index d52f4a3e6f6..9bb923ebbdf 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb @@ -123,3 +123,9 @@ end desc "foo foo" \ "bar bar" + +foo. + bar + +foo + .bar