aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-09-24 12:30:22 +0300
committerEli Zaretskii2016-09-24 12:30:22 +0300
commit0cba34447768b7aa5c8bd05128b17541a43e980d (patch)
tree7070074d3cd1cb66e58569690ed19a750f259a74
parent2f4776bf321bcd9c92a0f979f5a0544b76f3cba5 (diff)
downloademacs-0cba34447768b7aa5c8bd05128b17541a43e980d.tar.gz
emacs-0cba34447768b7aa5c8bd05128b17541a43e980d.zip
Incorporate core-elisp-tests in lisp-tests
* test/lisp/emacs-lisp/lisp-tests.el: Added tests from test/lisp/legacy/core-elisp-tests.el. * test/lisp/legacy/core-elisp-tests.el: File removed.
-rw-r--r--test/lisp/emacs-lisp/lisp-tests.el29
-rw-r--r--test/lisp/legacy/core-elisp-tests.el52
2 files changed, 29 insertions, 52 deletions
diff --git a/test/lisp/emacs-lisp/lisp-tests.el b/test/lisp/emacs-lisp/lisp-tests.el
index 4fe20f06e9d..d83f4a052cb 100644
--- a/test/lisp/emacs-lisp/lisp-tests.el
+++ b/test/lisp/emacs-lisp/lisp-tests.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 2013-2016 Free Software Foundation, Inc. 3;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
4 4
5;; Author: Aaron S. Hawley <aaron.s.hawley@gmail.com> 5;; Author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
6;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
6;; Keywords: internal 7;; Keywords: internal
7 8
8;; GNU Emacs is free software: you can redistribute it and/or modify 9;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -207,5 +208,33 @@
207 (goto-char (point-min)) 208 (goto-char (point-min))
208 (should-error (forward-sexp)))) ;; FIXME: Shouldn't be an error. 209 (should-error (forward-sexp)))) ;; FIXME: Shouldn't be an error.
209 210
211;; Test some core Elisp rules.
212(ert-deftest core-elisp-tests-1-defvar-in-let ()
213 "Test some core Elisp rules."
214 (with-temp-buffer
215 ;; Check that when defvar is run within a let-binding, the toplevel default
216 ;; is properly initialized.
217 (should (equal (list (let ((c-e-x 1)) (defvar c-e-x 2) c-e-x) c-e-x)
218 '(1 2)))
219 (should (equal (list (let ((c-e-x 1))
220 (defcustom c-e-x 2 "doc" :group 'blah :type 'integer) c-e-x)
221 c-e-x)
222 '(1 2)))))
223
224(ert-deftest core-elisp-tests-2-window-configurations ()
225 "Test properties of window-configurations."
226 (let ((wc (current-window-configuration)))
227 (with-current-buffer (window-buffer (frame-selected-window))
228 (push-mark)
229 (activate-mark))
230 (set-window-configuration wc)
231 (should (or (not mark-active) (mark)))))
232
233(ert-deftest core-elisp-tests-3-backquote ()
234 (should (eq 3 (eval ``,,'(+ 1 2)))))
235
236(provide 'core-elisp-tests)
237;;; core-elisp-tests.el ends here
238
210(provide 'lisp-tests) 239(provide 'lisp-tests)
211;;; lisp-tests.el ends here 240;;; lisp-tests.el ends here
diff --git a/test/lisp/legacy/core-elisp-tests.el b/test/lisp/legacy/core-elisp-tests.el
deleted file mode 100644
index b44bb37cc4f..00000000000
--- a/test/lisp/legacy/core-elisp-tests.el
+++ /dev/null
@@ -1,52 +0,0 @@
1;;; core-elisp-tests.el --- Testing some core Elisp rules
2
3;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
4
5;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
6;; Keywords:
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation, either version 3 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21;;; Commentary:
22
23;;
24
25;;; Code:
26
27(ert-deftest core-elisp-tests-1-defvar-in-let ()
28 "Test some core Elisp rules."
29 (with-temp-buffer
30 ;; Check that when defvar is run within a let-binding, the toplevel default
31 ;; is properly initialized.
32 (should (equal (list (let ((c-e-x 1)) (defvar c-e-x 2) c-e-x) c-e-x)
33 '(1 2)))
34 (should (equal (list (let ((c-e-x 1))
35 (defcustom c-e-x 2 "doc" :group 'blah :type 'integer) c-e-x)
36 c-e-x)
37 '(1 2)))))
38
39(ert-deftest core-elisp-tests-2-window-configurations ()
40 "Test properties of window-configurations."
41 (let ((wc (current-window-configuration)))
42 (with-current-buffer (window-buffer (frame-selected-window))
43 (push-mark)
44 (activate-mark))
45 (set-window-configuration wc)
46 (should (or (not mark-active) (mark)))))
47
48(ert-deftest core-elisp-tests-3-backquote ()
49 (should (eq 3 (eval ``,,'(+ 1 2)))))
50
51(provide 'core-elisp-tests)
52;;; core-elisp-tests.el ends here