summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-08-08 00:33:10 -0700
committerGlenn Morris <rgm@gnu.org>2012-08-08 00:33:10 -0700
commit5f168c207f963826f0b13ad2dd5c39d08ae3c664 (patch)
treeb6f620251dd6443491e2623737bca9881e4b4f68 /test
parent8ccd072a2cf1216165ee9d6c641ff1982a240cfe (diff)
downloademacs-5f168c207f963826f0b13ad2dd5c39d08ae3c664.tar.gz
* test/automated/files.el: New file.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/automated/files.el41
2 files changed, 45 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index e19e6bc552a..d330311e1d3 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-08 Glenn Morris <rgm@gnu.org>
+
+ * automated/files.el: New file.
+
2012-08-07 Glenn Morris <rgm@gnu.org>
* automated/Makefile.in (all): Fix typo.
diff --git a/test/automated/files.el b/test/automated/files.el
new file mode 100644
index 00000000000..43287ec0ed3
--- /dev/null
+++ b/test/automated/files.el
@@ -0,0 +1,41 @@
+;;; files.el --- tests for file handling.
+
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert)
+
+(defvar files-test-var1 nil)
+
+(defun files-test-fun1 ()
+ (setq files-test-var1 t))
+
+(ert-deftest files-test-bug12155 ()
+ "Test for http://debbugs.gnu.org/12155 ."
+ (with-temp-buffer
+ (insert "text\n"
+ ";; Local Variables:\n"
+ ";; eval: (files-test-fun1)\n"
+ ";; End:\n")
+ (let ((enable-local-variables :safe)
+ (enable-local-eval 'maybe))
+ (hack-local-variables)
+ (should (eq files-test-var1 nil)))))
+
+;;; files.el ends here