1 ;;; ruby-mode-tests.el --- Test suite for ruby-mode
3 ;; Copyright (C) 2012 Free Software Foundation, Inc.
5 ;; This file is part of GNU Emacs.
7 ;; GNU Emacs is free software: you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; GNU Emacs is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 (ert-deftest indent-line-after-symbol-made-from-string-interpolation
()
27 "It can indent the line after symbol made using string interpolation."
28 (let ((initial-content "def foo(suffix)\n :\"bar#{suffix}\"\n")
29 (expected-content "def foo(suffix)\n :\"bar#{suffix}\"\n "))
31 (insert initial-content
)
32 (ruby-indent-line) ; Doesn't rely on text properties or the syntax table.
33 (let ((buffer-content (buffer-substring-no-properties (point-min)
35 (should (string= buffer-content expected-content
))))))
37 (provide 'ruby-mode-tests
)
39 ;;; ruby-mode-tests.el ends here