[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114537: * test/automated/ruby-mode-tests.el: Add te
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r114537: * test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp' |
Date: |
Sun, 06 Oct 2013 01:21:56 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114537
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-06 04:21:51 +0300
message:
* 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.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/ruby-mode-tests.el
rubymodetests.el-20120720101201-mn39s4kfopdxj3ek-1
test/indent/ruby.rb ruby.rb-20120424165921-h044139hbrd7snvw-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2013-10-06 00:46:28 +0000
+++ b/test/ChangeLog 2013-10-06 01:21:51 +0000
@@ -1,5 +1,8 @@
2013-10-06 Dmitry Gutov <address@hidden>
+ * 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 <address@hidden>
=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2013-07-11 16:04:56 +0000
+++ b/test/automated/ruby-mode-tests.el 2013-10-06 01:21:51 +0000
@@ -586,6 +586,30 @@
(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
=== modified file 'test/indent/ruby.rb'
--- a/test/indent/ruby.rb 2013-10-06 00:46:28 +0000
+++ b/test/indent/ruby.rb 2013-10-06 01:21:51 +0000
@@ -123,3 +123,9 @@
desc "foo foo" \
"bar bar"
+
+foo.
+ bar
+
+foo
+ .bar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114537: * test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp',
Dmitry Gutov <=