summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/ruby-mode-tests.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2022-12-30 23:58:26 +0200
committerDmitry Gutov <dgutov@yandex.ru>2022-12-31 00:00:21 +0200
commit8675f4136c7da7356e5578cf1eabda2f37a597e5 (patch)
treef37bbb61f80912e30f2428c20b16c30c8e7ab2bc /test/lisp/progmodes/ruby-mode-tests.el
parent4922de626f05f0c26bc732b082c30c5c18a88416 (diff)
downloademacs-8675f4136c7da7356e5578cf1eabda2f37a597e5.tar.gz
emacs-8675f4136c7da7356e5578cf1eabda2f37a597e5.tar.bz2
emacs-8675f4136c7da7356e5578cf1eabda2f37a597e5.zip
Add new options for Ruby code indentation
* lisp/progmodes/ruby-mode.el (ruby-block-indent) (ruby-after-operator-indent, ruby-method-call-indent) (ruby-parenless-call-arguments-indent): New options (bug#60186). (ruby-smie-grammar): Specify associativity for "?". (ruby-smie--indent-to-stmt): Add optional argument. * test/lisp/progmodes/ruby-mode-resources/ruby.rb: New cases. * test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb: * test/lisp/progmodes/ruby-mode-resources/ruby-block-indent.rb: * test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb: * test/lisp/progmodes/ruby-mode-resources/ ruby-parenless-call-arguments-indent.rb: New files. * test/lisp/progmodes/ruby-mode-tests.el: Add indentation tests for new files.
Diffstat (limited to 'test/lisp/progmodes/ruby-mode-tests.el')
-rw-r--r--test/lisp/progmodes/ruby-mode-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el
index 560f780285a..5c81cc31cc1 100644
--- a/test/lisp/progmodes/ruby-mode-tests.el
+++ b/test/lisp/progmodes/ruby-mode-tests.el
@@ -956,7 +956,11 @@ VALUES-PLIST is a list with alternating index and value elements."
(kill-buffer buf)))))
(ruby-deftest-indent "ruby.rb")
+(ruby-deftest-indent "ruby-after-operator-indent.rb")
+(ruby-deftest-indent "ruby-block-indent.rb")
+(ruby-deftest-indent "ruby-method-call-indent.rb")
(ruby-deftest-indent "ruby-method-params-indent.rb")
+(ruby-deftest-indent "ruby-parenless-call-arguments-indent.rb")
(ert-deftest ruby--test-chained-indentation ()
(with-temp-buffer