aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChong Yidong2012-08-11 10:13:55 +0800
committerChong Yidong2012-08-11 10:13:55 +0800
commit5725bd2cc0e691dadc31bd958f210b1bbcf17c49 (patch)
treea8faec22f21eff83d918076adcc9c8c49c4cc820 /test
parent5723992258a8025e29ba9fcae923182fb5456426 (diff)
parent711f4590cddbc83c509c1c5e852ef4e528a39780 (diff)
downloademacs-5725bd2cc0e691dadc31bd958f210b1bbcf17c49.tar.gz
emacs-5725bd2cc0e691dadc31bd958f210b1bbcf17c49.zip
Merge from emacs-24; up to 2012-05-02T11:38:01Z!lekktu@gmail.com
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog12
-rw-r--r--test/automated/Makefile.in2
-rw-r--r--test/automated/files.el52
3 files changed, 65 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index d5bed2c8dfc..a9f6a7c0e9e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,15 @@
12012-08-10 Glenn Morris <rgm@gnu.org>
2
3 * automated/files.el (files-test-disable-local-variables): New test.
4
52012-08-08 Glenn Morris <rgm@gnu.org>
6
7 * automated/files.el: New file.
8
92012-08-07 Glenn Morris <rgm@gnu.org>
10
11 * automated/Makefile.in (all): Fix typo.
12
12012-08-10 Dmitry Gutov <dgutov@yandex.ru> 132012-08-10 Dmitry Gutov <dgutov@yandex.ru>
2 14
3 * automated/ruby-mode-tests.el (ruby-should-indent): 15 * automated/ruby-mode-tests.el (ruby-should-indent):
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index 4f2e8a59e49..5f92e21d91a 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -55,7 +55,7 @@ setwins=subdirs=`find . -type d -print`; \
55 esac; \ 55 esac; \
56 done 56 done
57 57
58all: test 58all: check
59 59
60doit: 60doit:
61 61
diff --git a/test/automated/files.el b/test/automated/files.el
new file mode 100644
index 00000000000..e43d8c32f85
--- /dev/null
+++ b/test/automated/files.el
@@ -0,0 +1,52 @@
1;;; files.el --- tests for file handling.
2
3;; Copyright (C) 2012 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 <http://www.gnu.org/licenses/>.
19
20;;; Code:
21
22(require 'ert)
23
24(defvar files-test-var1 nil)
25
26(defun files-test-fun1 ()
27 (setq files-test-var1 t))
28
29(ert-deftest files-test-bug12155 ()
30 "Test for http://debbugs.gnu.org/12155 ."
31 (with-temp-buffer
32 (insert "text\n"
33 ";; Local Variables:\n"
34 ";; eval: (files-test-fun1)\n"
35 ";; End:\n")
36 (let ((enable-local-variables :safe)
37 (enable-local-eval 'maybe))
38 (hack-local-variables)
39 (should (eq files-test-var1 nil)))))
40
41(ert-deftest files-test-disable-local-variables ()
42 "Test that setting enable-local-variables to nil works."
43 (with-temp-buffer
44 (insert "text\n"
45 ";; Local Variables:\n"
46 ";; files-test-var1: t\n"
47 ";; End:\n")
48 (let ((enable-local-variables nil))
49 (hack-local-variables)
50 (should (eq files-test-var1 nil)))))
51
52;;; files.el ends here