mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
* lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection
more strict. Add docstring. * test/automated/ruby-mode-tests.el (ruby-indent-singleton-class): Pass. (ruby-indent-inside-heredoc-after-operator) (ruby-indent-inside-heredoc-after-space): New tests.
This commit is contained in:
parent
f360feb8ec
commit
8619323f69
4 changed files with 32 additions and 6 deletions
|
|
@ -154,7 +154,6 @@ VALUES-PLIST is a list with alternating index and value elements."
|
|||
|"))
|
||||
|
||||
(ert-deftest ruby-indent-singleton-class ()
|
||||
:expected-result :failed ; Doesn't work yet, when no space before "<<".
|
||||
(ruby-should-indent-buffer
|
||||
"class<<bar
|
||||
| foo
|
||||
|
|
@ -165,6 +164,20 @@ VALUES-PLIST is a list with alternating index and value elements."
|
|||
| end
|
||||
|"))
|
||||
|
||||
(ert-deftest ruby-indent-inside-heredoc-after-operator ()
|
||||
(ruby-should-indent-buffer
|
||||
"b=<<eos
|
||||
| 42"
|
||||
"b=<<eos
|
||||
| 42"))
|
||||
|
||||
(ert-deftest ruby-indent-inside-heredoc-after-space ()
|
||||
(ruby-should-indent-buffer
|
||||
"foo <<eos.gsub(' ', '*')
|
||||
| 42"
|
||||
"foo <<eos.gsub(' ', '*')
|
||||
| 42"))
|
||||
|
||||
(ert-deftest ruby-indent-array-literal ()
|
||||
(let ((ruby-deep-indent-paren nil))
|
||||
(ruby-should-indent-buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue