diff options
| author | Eli Zaretskii | 2015-11-07 13:32:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-07 13:32:33 +0200 |
| commit | bede518c38db805ab9ac4b86f570ca9bff79a783 (patch) | |
| tree | d48bc534118e9ac156ee728d02681bb0c66f687d /test | |
| parent | b29be628889c4bdec24f14a3352848d559446a70 (diff) | |
| download | emacs-bede518c38db805ab9ac4b86f570ca9bff79a783.tar.gz emacs-bede518c38db805ab9ac4b86f570ca9bff79a783.zip | |
Fix error in copy-abbrev-table
* lisp/abbrev.el (define-abbrev): Don't erase the :abbrev-table-modiff
property of the abbrev-table. (Bug#21828)
* test/automated/abbrev-tests.el: New file.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/abbrev-tests.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/automated/abbrev-tests.el b/test/automated/abbrev-tests.el new file mode 100644 index 00000000000..da77f6113f8 --- /dev/null +++ b/test/automated/abbrev-tests.el | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | ;;; abbrev-tests.el --- Test suite for abbrevs. | ||
| 2 | |||
| 3 | ;; Copyright (C) 2015 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Eli Zaretskii <eliz@gnu.org> | ||
| 6 | ;; Keywords: abbrevs | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Code: | ||
| 24 | |||
| 25 | (require 'ert) | ||
| 26 | (require 'abbrev) | ||
| 27 | |||
| 28 | (ert-deftest copy-abbrev-table-test () | ||
| 29 | (defvar foo-abbrev-table nil) ; Avoid compiler warning | ||
| 30 | (define-abbrev-table 'foo-abbrev-table | ||
| 31 | '()) | ||
| 32 | (should (abbrev-table-p foo-abbrev-table)) | ||
| 33 | ;; Bug 21828 | ||
| 34 | (let ((new-foo-abbrev-table | ||
| 35 | (condition-case nil | ||
| 36 | (copy-abbrev-table foo-abbrev-table) | ||
| 37 | (error nil)))) | ||
| 38 | (should (abbrev-table-p new-foo-abbrev-table))) | ||
| 39 | (should-not (string-equal (buffer-name) "*Backtrace*"))) | ||
| 40 | |||
| 41 | (provide 'abbrev-tests) | ||
| 42 | |||
| 43 | ;;; add-log-tests.el ends here | ||