aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2020-09-21 17:32:51 +0200
committerStefan Kangas2020-09-21 18:47:55 +0200
commit1d98bed6c33e35cac2f04d2fd13f1bf1483d2f42 (patch)
treed095a30ebc05be6cc0e3caca983a09d0cb71f112
parent01f7fdb2a0790f6eb257791fc3ddf56a514c4693 (diff)
downloademacs-1d98bed6c33e35cac2f04d2fd13f1bf1483d2f42.tar.gz
emacs-1d98bed6c33e35cac2f04d2fd13f1bf1483d2f42.zip
Convert manual indent test for scheme-mode into unit test
* test/manual/indent/scheme.scm: Delete file. * test/lisp/progmodes/scheme-tests.el: New file with unit test for scheme-mode based on deleted file.
-rw-r--r--test/lisp/progmodes/scheme-tests.el50
-rw-r--r--test/manual/indent/scheme.scm9
2 files changed, 50 insertions, 9 deletions
diff --git a/test/lisp/progmodes/scheme-tests.el b/test/lisp/progmodes/scheme-tests.el
new file mode 100644
index 00000000000..e3736bd411e
--- /dev/null
+++ b/test/lisp/progmodes/scheme-tests.el
@@ -0,0 +1,50 @@
1;;; scheme-tests.el --- Test suite for scheme.el -*- lexical-binding:t -*-
2
3;; Copyright (C) 2020 Free Software Foundation, Inc.
4
5;; This file is part of GNU Emacs.
6
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.
11
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.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
19
20;;; Commentary:
21
22;;; Code:
23
24(require 'ert)
25(require 'scheme)
26
27(ert-deftest scheme-test-indent ()
28 ;; FIXME: Look into what is the expected indent here and fix it.
29 :expected-result :failed
30 ;; Converted from manual test.
31 (with-temp-buffer
32 (scheme-mode)
33 ;; TODO: Should some of these be fontification tests as well?
34 (let ((orig "#!/usr/bin/scheme is this a comment?
35
36;; This one is a comment
37(a)
38#| and this one as #|well|# as this! |#
39(b)
40(cons #;(this is a
41 comment)
42 head tail)
43"))
44 (insert orig)
45 (indent-region (point-min) (point-max))
46 (should (equal (buffer-string) orig)))))
47
48(provide 'scheme-tests)
49
50;;; scheme-tests.el ends here
diff --git a/test/manual/indent/scheme.scm b/test/manual/indent/scheme.scm
deleted file mode 100644
index 84d0f6d8786..00000000000
--- a/test/manual/indent/scheme.scm
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/usr/bin/scheme is this a comment?
2
3;; This one is a comment
4(a)
5#| and this one as #|well|# as this! |#
6(b)
7(cons #;(this is a
8 comment)
9 head tail)