aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-10-06 04:21:51 +0300
committerDmitry Gutov2013-10-06 04:21:51 +0300
commit7318480cec373d97bb98b50746c433c4db59a6b8 (patch)
treec8fed41272cafb3fb6be83e07b936ec20874d479
parent5cd9cda9b61159051825a2c5ae2700bf280e2cf2 (diff)
downloademacs-7318480cec373d97bb98b50746c433c4db59a6b8.tar.gz
emacs-7318480cec373d97bb98b50746c433c4db59a6b8.zip
* 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.
-rw-r--r--test/ChangeLog3
-rw-r--r--test/automated/ruby-mode-tests.el24
-rw-r--r--test/indent/ruby.rb6
3 files changed, 33 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index bc9addb810b..7392010cb93 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,8 @@
12013-10-06 Dmitry Gutov <dgutov@yandex.ru> 12013-10-06 Dmitry Gutov <dgutov@yandex.ru>
2 2
3 * automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp'
4 and `ruby-backward-sexp' that fail when `ruby-use-smie' is t.
5
3 * indent/ruby.rb: Fix a syntax error, add a few failing examples. 6 * indent/ruby.rb: Fix a syntax error, add a few failing examples.
4 7
52013-10-05 Stefan Monnier <monnier@iro.umontreal.ca> 82013-10-05 Stefan Monnier <monnier@iro.umontreal.ca>
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."
586 (end-of-defun) 586 (end-of-defun)
587 (should (= 5 (line-number-at-pos))))) 587 (should (= 5 (line-number-at-pos)))))
588 588
589;; Tests below fail when using SMIE.
590
591(defvar ruby-sexp-test-example
592 (ruby-test-string
593 "class C
594 | def foo
595 | self.end
596 | D.new.class
597 | end
598 |end"))
599
600(ert-deftest ruby-forward-sexp-skips-method-calls-with-keyword-names ()
601 (ruby-with-temp-buffer ruby-sexp-test-example
602 (goto-line 2)
603 (ruby-forward-sexp)
604 (should (= 5 (line-number-at-pos)))))
605
606(ert-deftest ruby-backward-sexp-skips-method-calls-with-keyword-names ()
607 (ruby-with-temp-buffer ruby-sexp-test-example
608 (goto-line 5)
609 (end-of-line)
610 (ruby-backward-sexp)
611 (should (= 2 (line-number-at-pos)))))
612
589(provide 'ruby-mode-tests) 613(provide 'ruby-mode-tests)
590 614
591;;; ruby-mode-tests.el ends here 615;;; 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
123 123
124desc "foo foo" \ 124desc "foo foo" \
125 "bar bar" 125 "bar bar"
126
127foo.
128 bar
129
130foo
131 .bar