From: Tino Calancha <f92capac@gmail.com>
To: Tino Calancha <f92capac@gmail.com>
Cc: 22027@debbugs.gnu.org, npostavs@users.sourceforge.net
Subject: bug#22027: 25.1.50; Return uncorrupted default string
Date: Mon, 5 Jun 2017 09:39:38 +0900 (JST) [thread overview]
Message-ID: <alpine.DEB.2.20.1706050937060.925@calancha-pc> (raw)
In-Reply-To: <alpine.DEB.2.20.1706050920290.925@calancha-pc>
On Mon, 5 Jun 2017, Tino Calancha wrote:
> We might add a test as well:
but my previous test is wrong: it works before we apply any patch :-)
The following looks right:
commit 3b255c1b04a87442fc8293323f2c827dd44b038a
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Mon Jun 5 09:35:29 2017 +0900
* test/lisp/subr-tests.el (subr-tests-bug22027): Add test.
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index c0bfd40f80..54f4ab5d1b 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 @@ subr-tests--this-file
(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
next prev parent reply other threads:[~2017-06-05 0:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 9:53 bug#22027: 25.1.50; read-passwd fail to return default password Tino Calancha
[not found] ` <handler.22027.B.14486178085232.ack@debbugs.gnu.org>
2015-11-27 10:16 ` bug#22027: Acknowledgement (25.1.50; read-passwd fail to return default password) Constantino Calancha
2016-05-09 3:26 ` bug#22027: 25.1.50; Return uncorrupted default string Tino Calancha
2017-06-04 3:51 ` npostavs
2017-06-05 0:22 ` Tino Calancha
2017-06-05 0:39 ` Tino Calancha [this message]
2017-06-05 23:03 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1706050937060.925@calancha-pc \
--to=f92capac@gmail.com \
--cc=22027@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.