* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
This commit is contained in:
parent
882f81fdb4
commit
695d50fa0a
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue