summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2017-06-05 09:35:29 +0900
committerNoam Postavsky <npostavs@gmail.com>2017-06-05 18:57:50 -0400
commit695d50fa0a11c6bd98f9f4a9b5a2905d33282316 (patch)
tree5a37bdaddd2318a9b6fd745632f699eb96afb044 /test
parent882f81fdb4ffba773af775d6d6f8920f23163e72 (diff)
downloademacs-695d50fa0a11c6bd98f9f4a9b5a2905d33282316.tar.gz
* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/subr-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index c0bfd40f806..54f4ab5d1b2 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