aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/automated/ruby-mode-tests.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index e711b52fb9c..ba3040577b1 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -219,12 +219,16 @@ VALUES-PLIST is a list with alternating index and value elements."
219 (should (string= "foo do |b|\nend" (buffer-string))))) 219 (should (string= "foo do |b|\nend" (buffer-string)))))
220 220
221(ert-deftest ruby-toggle-block-to-brace () 221(ert-deftest ruby-toggle-block-to-brace ()
222 (with-temp-buffer 222 (let ((pairs '((16 . "foo {|b| b + 2 }")
223 (insert "foo do |b|\nend") 223 (15 . "foo {|b|\n b + 2\n}"))))
224 (ruby-mode) 224 (dolist (pair pairs)
225 (beginning-of-line) 225 (with-temp-buffer
226 (ruby-toggle-block) 226 (let ((fill-column (car pair)))
227 (should (string= "foo {|b|\n}" (buffer-string))))) 227 (insert "foo do |b|\n b + 2\nend")
228 (ruby-mode)
229 (beginning-of-line)
230 (ruby-toggle-block)
231 (should (string= (cdr pair) (buffer-string))))))))
228 232
229(ert-deftest ruby-toggle-block-to-multiline () 233(ert-deftest ruby-toggle-block-to-multiline ()
230 (with-temp-buffer 234 (with-temp-buffer