1;;; alchemist-interact-test.el ---
2
3;; Copyright © 2014-2015 Samuel Tonini
4;;
5;; Author: Samuel Tonini <tonini.samuel@gmail.com>
6
7;; This file is not part of GNU Emacs.
8
9;; This program is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; This program is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;;
25
26;;; Code:
27
28(require 'test-helper)
29
30(ert-deftest alchemist-interact/insert-string-as-comment ()
31  (should (equal "
32# => sum = fn (a, b) ->
33# =>   a + b
34# => end
35# => sum.(21, 33)"
36                 (with-temp-buffer
37                   (alchemist-interact-insert-as-comment "sum = fn (a, b) ->
38  a + b
39end
40sum.(21, 33)")
41                   (buffer-substring-no-properties (point-min) (point-max)))))
42  (should (equal "  # => IO.puts 1 + 1"
43                 (with-temp-buffer
44                   (alchemist-interact-insert-as-comment "IO.puts 1 + 1")
45                   (buffer-substring-no-properties (point-min) (point-max))))))
46
47(provide 'alchemist-interact-test)
48
49;;; alchemist-interact-test.el ends here
50