* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.

This commit is contained in:
Tino Calancha 2017-06-05 09:35:29 +09:00 committed by Noam Postavsky
parent 882f81fdb4
commit 695d50fa0a

View file

@ -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