mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
lisp/auth-source-pass.el: Keep legitimate spaces inside data
Users should be able to store a field as follows: message: remember: Destroy the image and you will break the enemy and later, recover the message untouched, i.e.: "remember: Destroy the image and you will break the enemy" * lisp/auth-source-pass.el (auth-source-pass--parse-data): Preserve inner spaces at data. * test/lisp/auth-source-pass-tests.el (auth-source-pass-parse-with-colons-in-data): Add test.
This commit is contained in:
parent
c3322729e4
commit
9eadcfdfe6
2 changed files with 11 additions and 7 deletions
|
|
@ -49,6 +49,12 @@
|
|||
'(("key1" . "val1")
|
||||
("key2" . "val2"))))))
|
||||
|
||||
(ert-deftest auth-source-pass-parse-with-colons-in-data ()
|
||||
(let ((content "pass\n--\nkey1 :val1\nkey2: please: keep my space after colon\n\n"))
|
||||
(should (equal (auth-source-pass--parse-data content)
|
||||
'(("key1" . "val1")
|
||||
("key2" . "please: keep my space after colon"))))))
|
||||
|
||||
(defvar auth-source-pass--debug-log nil
|
||||
"Contains a list of all messages passed to `auth-source-do-debug`.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue