aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/progmodes
diff options
context:
space:
mode:
authorNobuyoshi Nakada2019-07-22 10:14:01 +0900
committerDmitry Gutov2019-07-25 16:01:55 +0300
commit0cbdbac2bbc0ade799711cd70d3d59aee3db9cef (patch)
tree722dc9a416434494bbc24bdc94f91ab6eb110088 /test/lisp/progmodes
parenta112547f91d8b4131ed01a05f15f22aa18b85a49 (diff)
downloademacs-0cbdbac2bbc0ade799711cd70d3d59aee3db9cef.tar.gz
emacs-0cbdbac2bbc0ade799711cd70d3d59aee3db9cef.zip
Strip trailing whitespaces at the end of converted do block
* lisp/progmodes/ruby-mode.el (ruby-brace-to-do-end): Strip trailing whitespaces at the end of converted do block (bug#36756). https://bugs.ruby-lang.org/issues/16014 https://github.com/syl20bnr/spacemacs/issues/12548
Diffstat (limited to 'test/lisp/progmodes')
-rw-r--r--test/lisp/progmodes/ruby-mode-tests.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el
index efbe012427f..83fcdd8aa85 100644
--- a/test/lisp/progmodes/ruby-mode-tests.el
+++ b/test/lisp/progmodes/ruby-mode-tests.el
@@ -369,7 +369,11 @@ VALUES-PLIST is a list with alternating index and value elements."
369 (ruby-with-temp-buffer "foo {|b|\n}" 369 (ruby-with-temp-buffer "foo {|b|\n}"
370 (beginning-of-line) 370 (beginning-of-line)
371 (ruby-toggle-block) 371 (ruby-toggle-block)
372 (should (string= "foo do |b|\nend" (buffer-string))))) 372 (should (string= "foo do |b|\nend" (buffer-string))))
373 (ruby-with-temp-buffer "foo {|b| b }"
374 (beginning-of-line)
375 (ruby-toggle-block)
376 (should (string= "foo do |b|\n b\nend" (buffer-string)))))
373 377
374(ert-deftest ruby-toggle-block-to-brace () 378(ert-deftest ruby-toggle-block-to-brace ()
375 (let ((pairs '((17 . "foo { |b| b + 2 }") 379 (let ((pairs '((17 . "foo { |b| b + 2 }")