aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov2013-10-26 05:16:37 +0400
committerDmitry Gutov2013-10-26 05:16:37 +0400
commitbae91342a41c1aef864c64c2354dfbfc58335bfa (patch)
treecbbd3638d05ffca818ac046281802ce8ae97b61e /test
parenteb89dc14d9367b3f2dbb265dedf2e781a4105b03 (diff)
downloademacs-bae91342a41c1aef864c64c2354dfbfc58335bfa.tar.gz
emacs-bae91342a41c1aef864c64c2354dfbfc58335bfa.zip
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Be more
specific in what the first arg can be: a non-keyword word, string/regexp/percent literal opener, opening paren, or unary operator followed directly by word. * test/automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): Fix the test, in respect to adding the space after the curly.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/ruby-mode-tests.el4
-rw-r--r--test/indent/ruby.rb25
3 files changed, 20 insertions, 14 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 10acf187967..6572b9c46e4 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12013-10-26 Dmitry Gutov <dgutov@yandex.ru>
2
3 * automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): Fix
4 the test, in respect to adding the space after the curly.
5
12013-10-24 Michael Albinus <michael.albinus@gmx.de> 62013-10-24 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * automated/ert-tests.el (ert-test-skip-unless): New test case. 8 * automated/ert-tests.el (ert-test-skip-unless): New test case.
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index dafe393377b..dc86b4a2914 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -292,8 +292,8 @@ VALUES-PLIST is a list with alternating index and value elements."
292 (should (string= "foo do |b|\nend" (buffer-string))))) 292 (should (string= "foo do |b|\nend" (buffer-string)))))
293 293
294(ert-deftest ruby-toggle-block-to-brace () 294(ert-deftest ruby-toggle-block-to-brace ()
295 (let ((pairs '((16 . "foo {|b| b + 2 }") 295 (let ((pairs '((17 . "foo { |b| b + 2 }")
296 (15 . "foo {|b|\n b + 2\n}")))) 296 (16 . "foo { |b|\n b + 2\n}"))))
297 (dolist (pair pairs) 297 (dolist (pair pairs)
298 (with-temp-buffer 298 (with-temp-buffer
299 (let ((fill-column (car pair))) 299 (let ((fill-column (car pair)))
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 1fd19cf34d4..9532a4b4245 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -174,6 +174,19 @@ method? arg1,
174method! arg1, 174method! arg1,
175 arg2 175 arg2
176 176
177method !arg1,
178 arg2
179
180method [],
181 arg2
182
183method :foo,
184 :bar
185
186method (a + b),
187 c, :d => :e,
188 f: g
189
177it "is a method call with block" do |asd| 190it "is a method call with block" do |asd|
178 foo 191 foo
179end 192end
@@ -213,18 +226,6 @@ foo = [1, 2, 3].map do |i|
213 i + 1 226 i + 1
214end 227end
215 228
216method !arg1,
217 arg2
218
219method [],
220 arg2
221
222method :foo,
223 :bar
224
225method (a + b),
226 c
227
228bar.foo do # "." is parent to "do"; it shouldn't be. 229bar.foo do # "." is parent to "do"; it shouldn't be.
229 bar 230 bar
230end 231end