emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9dd7da9: * test/automated/keymap-tests.el: New test


From: Juanma Barranquero
Subject: [Emacs-diffs] master 9dd7da9: * test/automated/keymap-tests.el: New test file
Date: Thu, 12 Nov 2015 16:56:44 +0000

branch: master
commit 9dd7da9945c16aa343080a535ed74eeecf769fd1
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>

    * test/automated/keymap-tests.el: New test file
---
 test/automated/keymap-tests.el |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/test/automated/keymap-tests.el b/test/automated/keymap-tests.el
new file mode 100644
index 0000000..482ed27
--- /dev/null
+++ b/test/automated/keymap-tests.el
@@ -0,0 +1,39 @@
+;;; keymap-tests.el --- Test suite for src/keymap.c
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Juanma Barranquero <address@hidden>
+
+;; 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)
+
+(ert-deftest keymap-store_in_keymap-FASTINT-on-nonchars ()
+  "Check for bug fixed in \"Fix assertion violation in define-key\",
+commit 86c19714b097aa477d339ed99ffb5136c755a046."
+  (should-not (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined))
+  ;; This will cause an assertion violation if the bug is present.
+  ;; We could run an inferior Emacs process and check for the return
+  ;; status, but in some environments an assertion failure triggers
+  ;; an abort dialog that requires user intervention anyway.
+  (define-key Buffer-menu-mode-map [(32 . 126)] 'undefined)
+  (should (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined)))
+
+(provide 'keymap-tests)
+
+;;; keymap-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]