aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2016-11-19 00:17:50 +0900
committerTino Calancha2016-11-19 00:17:50 +0900
commit49ac78022802dfff08367477e8d09d17d3c73e68 (patch)
treebdfbc4fb546d44e55b26f19c1a3b520be7c192b2
parente8efa66e01933b8ae7ac9abf530a3818551c1343 (diff)
downloademacs-49ac78022802dfff08367477e8d09d17d3c73e68.tar.gz
emacs-49ac78022802dfff08367477e8d09d17d3c73e68.zip
Add test suite for buff-menu.el
* test/lisp/buff-menu-tests.el: New file. (buff-menu-24962): Add test for Bug#24962.
-rw-r--r--test/lisp/buff-menu-tests.el46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/lisp/buff-menu-tests.el b/test/lisp/buff-menu-tests.el
new file mode 100644
index 00000000000..c55dc8128bc
--- /dev/null
+++ b/test/lisp/buff-menu-tests.el
@@ -0,0 +1,46 @@
1;;; buff-menu-tests.el --- Test suite for buff-menu-tests.el -*- lexical-binding: t -*-
2
3;; Copyright (C) 2016 Free Software Foundation, Inc.
4
5;; Author: Tino Calancha <tino.calancha@gmail.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;;; Code:
25
26(require 'ert)
27
28(ert-deftest buff-menu-24962 ()
29 "Test for http://debbugs.gnu.org/24962 ."
30 :expected-result :failed
31 (let ((file (expand-file-name "foo" temporary-file-directory))
32 buf)
33 (unwind-protect
34 (progn
35 (write-region "foo" nil file)
36 (setq buf (find-file file))
37 (rename-buffer " foo")
38 (list-buffers)
39 (with-current-buffer "*Buffer List*"
40 (should (string= " foo" (buffer-name (Buffer-menu-buffer))))))
41 (and (buffer-live-p buf) (kill-buffer buf))
42 (and (file-exists-p file) (delete-file file)))))
43
44(provide 'buff-menu-tests)
45
46;;; buff-menu-tests.el ends here