diff options
| author | Daniel Colascione | 2012-10-07 14:31:58 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2012-10-07 14:31:58 -0800 |
| commit | 36a305a723c63fd345be65c536c52fe9765c14be (patch) | |
| tree | fb89d9e103552863214c60297a65320917109357 /test | |
| parent | 2ab329f3b5d52a39f0a45c3d9c129f1c19560142 (diff) | |
| parent | 795b1482a9e314cda32d62ac2988f573d359366e (diff) | |
| download | emacs-36a305a723c63fd345be65c536c52fe9765c14be.tar.gz emacs-36a305a723c63fd345be65c536c52fe9765c14be.zip | |
Merge from trunk
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 16 |
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 |