diff options
| author | Dmitry Gutov | 2013-10-26 05:16:37 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2013-10-26 05:16:37 +0400 |
| commit | bae91342a41c1aef864c64c2354dfbfc58335bfa (patch) | |
| tree | cbbd3638d05ffca818ac046281802ce8ae97b61e /test | |
| parent | eb89dc14d9367b3f2dbb265dedf2e781a4105b03 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 4 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 25 |
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 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-10-24 Michael Albinus <michael.albinus@gmx.de> | 6 | 2013-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, | |||
| 174 | method! arg1, | 174 | method! arg1, |
| 175 | arg2 | 175 | arg2 |
| 176 | 176 | ||
| 177 | method !arg1, | ||
| 178 | arg2 | ||
| 179 | |||
| 180 | method [], | ||
| 181 | arg2 | ||
| 182 | |||
| 183 | method :foo, | ||
| 184 | :bar | ||
| 185 | |||
| 186 | method (a + b), | ||
| 187 | c, :d => :e, | ||
| 188 | f: g | ||
| 189 | |||
| 177 | it "is a method call with block" do |asd| | 190 | it "is a method call with block" do |asd| |
| 178 | foo | 191 | foo |
| 179 | end | 192 | end |
| @@ -213,18 +226,6 @@ foo = [1, 2, 3].map do |i| | |||
| 213 | i + 1 | 226 | i + 1 |
| 214 | end | 227 | end |
| 215 | 228 | ||
| 216 | method !arg1, | ||
| 217 | arg2 | ||
| 218 | |||
| 219 | method [], | ||
| 220 | arg2 | ||
| 221 | |||
| 222 | method :foo, | ||
| 223 | :bar | ||
| 224 | |||
| 225 | method (a + b), | ||
| 226 | c | ||
| 227 | |||
| 228 | bar.foo do # "." is parent to "do"; it shouldn't be. | 229 | bar.foo do # "." is parent to "do"; it shouldn't be. |
| 229 | bar | 230 | bar |
| 230 | end | 231 | end |