diff options
| author | Chong Yidong | 2012-08-11 10:13:55 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-08-11 10:13:55 +0800 |
| commit | 5725bd2cc0e691dadc31bd958f210b1bbcf17c49 (patch) | |
| tree | a8faec22f21eff83d918076adcc9c8c49c4cc820 /test | |
| parent | 5723992258a8025e29ba9fcae923182fb5456426 (diff) | |
| parent | 711f4590cddbc83c509c1c5e852ef4e528a39780 (diff) | |
| download | emacs-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/ChangeLog | 12 | ||||
| -rw-r--r-- | test/automated/Makefile.in | 2 | ||||
| -rw-r--r-- | test/automated/files.el | 52 |
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 @@ | |||
| 1 | 2012-08-10 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * automated/files.el (files-test-disable-local-variables): New test. | ||
| 4 | |||
| 5 | 2012-08-08 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * automated/files.el: New file. | ||
| 8 | |||
| 9 | 2012-08-07 Glenn Morris <rgm@gnu.org> | ||
| 10 | |||
| 11 | * automated/Makefile.in (all): Fix typo. | ||
| 12 | |||
| 1 | 2012-08-10 Dmitry Gutov <dgutov@yandex.ru> | 13 | 2012-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 | ||
| 58 | all: test | 58 | all: check |
| 59 | 59 | ||
| 60 | doit: | 60 | doit: |
| 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 | ||