[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 695d50f 2/2: * test/lisp/subr-tests.el (subr-tests-
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 695d50f 2/2: * test/lisp/subr-tests.el (subr-tests-bug22027): Add test. |
Date: |
Mon, 5 Jun 2017 19:00:26 -0400 (EDT) |
branch: master
commit 695d50fa0a11c6bd98f9f4a9b5a2905d33282316
Author: Tino Calancha <address@hidden>
Commit: Noam Postavsky <address@hidden>
* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
---
test/lisp/subr-tests.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index c0bfd40..54f4ab5 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -28,6 +28,7 @@
;;; Code:
(require 'ert)
+(eval-when-compile (require 'cl-lib))
(ert-deftest let-when-compile ()
;; good case
@@ -316,5 +317,14 @@ cf. Bug#25477."
(should-not (method-files 'subr-tests--undefined-generic))
(should-not (method-files 'subr-tests--generic-without-methods)))
+(ert-deftest subr-tests-bug22027 ()
+ "Test for http://debbugs.gnu.org/22027 ."
+ (let ((default "foo") res)
+ (cl-letf (((symbol-function 'read-string)
+ (lambda (_prompt _init _hist def) def)))
+ (setq res (read-passwd "pass: " 'confirm (mapconcat #'string default
"")))
+ (should (string= default res)))))
+
+
(provide 'subr-tests)
;;; subr-tests.el ends here