aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/auth-source-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add fallback backend in auth-sourcesMichael Albinus2025-10-051-0/+68
| | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Describe effect of auth-sources being nil. * lisp/auth-source.el (auth-sources): Add const nil. (auth-source-ignored-keys): New defconst. (auth-source-backends, auth-source-keys) (auth-source-search-keys, auth-source-returned-keys) (auth-source-search-spec): New macros. (auth-source-file-name-p, auth-source-search) (auth-source-specmatchp, auth-source-netrc-create) (auth-source-secrets-search, auth-source-secrets-create) (auth-source-macos-keychain-search) (auth-source-plstore-search, auth-source-plstore-create): Use them (auth-source-read-passwd-search, auth-source-read-passwd-create): New defuns. * test/lisp/auth-source-tests.el (auth-source-backend-parse-plstore-string) (auth-source-backend-parse-json-string) (auth-source-backend-parse-fallback) (auth-source-test-read-passwd-create-secret): New tests.
* Improve check for netrc tokensMichael Albinus2025-09-151-2/+15
| | | | | | | | | | | * doc/misc/auth.texi (Help for users): Mention also "#" inside tokens. * lisp/auth-source.el (auth-source-netrc-create): Better check for token format. * test/lisp/auth-source-tests.el (auth-source-backend-parse-json): New test. (auth-source-test-netrc-create-secret): Extend test.
* Introduc auth-source-ignore-non-existing-fileMichael Albinus2025-09-121-5/+5
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-ignore-non-existing-file): Rename it from `auth-source-ignore-empty-file'. (auth-source-backends-parser-file): Use it. * doc/misc/auth.texi (Help for users): * etc/NEWS: * test/lisp/auth-source-tests.el (auth-source-validate-backend) (auth-source-test-netrc-create-secret): Use `auth-source-ignore-non-existing-file'.
* Ignore non-existing or empty files in auth-sourcesMichael Albinus2025-09-091-4/+8
| | | | | | | | | | | | | | | | | | | * doc/misc/auth.texi: Replace @code{"..."} by @t{"..."}. (Help for users): Describe property lists format. Explain, that empty files in auth-sources are ignored when auth-source-ignore-empty-file is non-nil. (Help for developers): Add auth-source-creation-defaults to vindex. * etc/NEWS: Introduce auth-source-ignore-empty-file. Presentational fixes and improvements. * lisp/auth-source.el (auth-source-ignore-empty-file): New defcustom. (auth-source-backends-parser-file): Use it. (Bug#9113) * test/lisp/auth-source-tests.el (auth-source-validate-backend): Let-bind `auth-source-ignore-empty-file'. (auth-source-test-searches): Set file suffix. (auth-source-test-netrc-create-secret): Adapt test.
* Prefer oddp/evenp to cl-oddp/cl-evenpStefan Kangas2025-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-ext.el (math-oddp): * lisp/calc/calc-misc.el (math-evenp): * lisp/calendar/todo-mode.el (todo-adjusted-category-label-length, todo-insert-category-line) (todo-update-categories-display): * lisp/emacs-lisp/cl-macs.el (cl-defstruct): * lisp/net/gnutls.el (open-gnutls-stream): * lisp/tab-line.el (tab-line-tab-face-inactive-alternating): * test/lisp/auth-source-tests.el (auth-source-test-macos-keychain-search): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-notany) (cl-extra-test-notevery): * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-adjoin-test): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-collect) (cl-macs-loop-append/nconc, cl-macs-loop-when) (cl-macs-loop-if): * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-remove-test) (cl-remove-if-test, cl-remove-if-not-test, cl-seq-delete-test) (cl-delete-if-test, cl-delete-if-not-test) (cl-seq-substitute-if-test, cl-seq-substitute-if-not-test) (cl-find-if-test, cl-find-if-not-test, cl-position-if-test) (cl-seq-count-test, cl-count-if-test, cl-count-if-not-test) (cl-member-if-test, cl-member-if-not-test, cl-assoc-if-test) (cl-assoc-if-not-test, cl-rassoc-if-test) (cl-rassoc-if-not-test): * test/src/treesit-tests.el (treesit-search-forward-predicate): Prefer oddp/evenp to cl-oddp/cl-evenp where possible. * lisp/calc/calc-ext.el (cl-lib): * lisp/calc/calc-misc.el (cl-lib): Don't require.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Use slot names rather than their :initargsStefan Monnier2024-02-071-58/+81
| | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-39-clone-instance-inheritor-with-args): * test/lisp/auth-source-tests.el (auth-source-ensure-ignored-backend) (auth-source-backend-parse-macos-keychain) (auth-source-backend-parse-macos-keychain-generic-string) (auth-source-backend-parse-macos-keychain-internet-string) (auth-source-backend-parse-macos-keychain-internet-symbol) (auth-source-backend-parse-macos-keychain-generic-symbol) (auth-source-backend-parse-macos-keychain-internet-default-string) (auth-source-backend-parse-plstore, auth-source-backend-parse-netrc) (auth-source-backend-parse-netrc-string) (auth-source-backend-parse-secrets) (auth-source-backend-parse-secrets-strings) (auth-source-backend-parse-secrets-alias) (auth-source-backend-parse-secrets-symbol) (auth-source-backend-parse-secrets-no-alias): Use slot names rather than their :initargs.
* Adapt test names in auth-source-tests.elMichael Albinus2024-01-111-3/+3
| | | | | | * test/lisp/auth-source-tests.el (auth-source-test-netrc-credentials) (auth-source-test-netrc-credentials-2) (auth-source-test-macos-keychain-search): Adapt test names.
* Support numeric port numbers in auth-source-macos-keychainMichael Albinus2024-01-111-10/+18
| | | | | | | | | * lisp/auth-source.el (auth-source-macos-keychain-search): Support numeric port numbers (bug#68376). (auth-source-macos-keychain-search-items): Make regexp more robust. * test/lisp/auth-source-tests.el (test-macos-keychain-search): Extend test.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Fix auth-source-macos-keychain (bug#64977)LdBeth2023-08-131-0/+20
| | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-macos-keychain-search) (auth-source-macos-keychain-search-items): Fix handling of user and port. * test/lisp/auth-source-tests.el (test-macos-keychain-search): New test.
* | Fix some `unwind-protect' formsMichael Albinus2023-04-031-7/+8
|/ | | | | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-handle-file-acl) (tramp-smb-handle-set-file-acl): Remove superfluous `unwind-protect'. * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Fix `unwind-protect' handler. * test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name): Add dummy cleanup form.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Move netrc tests to auth-source-tests.elLars Ingebrigtsen2022-08-041-1/+25
|
* Use 'auth-info-password' in testsSam Steingold2022-01-101-24/+6
| | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): (auth-source-test-secrets-create-secret): (auth-source-test-netrc-create-secret, auth-source-delete): Use 'auth-info-password' instead of ad hoc code.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Prefer ert-with-temp-(directory|file) in most remaining testsStefan Kangas2021-11-081-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): * test/lisp/autorevert-tests.el (auto-revert-test00-auto-revert-mode) (auto-revert-test01-auto-revert-several-files) (auto-revert-test02-auto-revert-deleted-file) (auto-revert-test03-auto-revert-tail-mode) (auto-revert-test04-auto-revert-mode-dired) (auto-revert-test05-global-notify) (auto-revert-test06-write-file) (auto-revert-test07-auto-revert-several-buffers): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-cycle): * test/lisp/custom-tests.el (custom-theme--load-path): * test/lisp/dired-aux-tests.el (dired-test-bug27496) (with-dired-bug28834-test): * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load) (bytecomp-tests--dest-mountpoint) (bytecomp-tests--target-file-no-directory): * test/lisp/emacs-lisp/gv-tests.el (gv-tests--in-temp-dir): * test/lisp/eshell/eshell-tests.el (with-temp-eshell) (eshell-test-command-result): * test/lisp/info-xref-tests.el (info-xref-test-makeinfo): * test/lisp/vc/vc-tests.el (vc-test--create-repo) (vc-test--register, vc-test--state, vc-test--working-revision) (vc-test--checkout-model, vc-test--rename-file) (vc-test--version-diff): * test/src/buffer-tests.el (test-kill-buffer-auto-save-delete): * test/src/comp-tests.el (comp-tests-bootstrap): * test/src/process-tests.el (process-test-quoted-batfile): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly.
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-071-67/+64
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* Clear netrc cache in auth-source testLars Ingebrigtsen2021-09-211-2/+2
| | | | | * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret): Clear the netrc cache, too.
* Only search netrc in the netrc testsLars Ingebrigtsen2021-09-211-1/+2
| | | | | * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret): Only search netrc.
* Remove superfluous skip in auth-source-tests.elMichael Albinus2021-09-201-1/+0
| | | | | * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret): Remove superfluous skip.
* Do not save empty passwords in auth-source-searchMichael Albinus2021-09-191-33/+99
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-netrc-create) (auth-source-secrets-create): Set :save-function only for non empty passwords. * lisp/net/tramp.el (tramp-read-passwd): Don't save empty passwords. * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Adapt test. (auth-source-test-netrc-create-secret): New test.
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-1/+1
|
* Fix failing auth-source testLars Ingebrigtsen2021-04-271-2/+3
| | | | | | * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Fix test failing because the mocked `read-string' had the wrong interface.
* Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-01-021-1/+1
|\
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | * Fix a test in auth-source-tests.elAndrea Corallo2020-12-211-1/+2
|/ | | | | | * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Redefine `read-string' respecting the original number of arguments.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
| * Fix bugs in `auth-source-netrc-parse-one'.Filipp Gunbin2018-08-101-0/+19
| | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match data is not overwritten in `auth-source-netrc-parse-next-interesting'. Ensure that blanks are skipped before and after going over comments and eols. * test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test. (cherry picked from commit 60ff8101449eea3a5ca4961299501efd83d011bd)
* | Merge from origin/emacs-26Glenn Morris2018-07-201-0/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3e72298 Improve documentation of 'pcase-defmacro rx' ba9b9bb Fix TTY colors breakage by 'clear-face-cache' f56ad42 * admin/MAINTAINERS: Add files maintained by me (Michael Albi... 7a258fa Adapt shadowfile.el for Tramp (Bug#4526, Bug#4846) cb50077 Fix auth-source-delete (Bug#26184) a4767a6 Avoid assertion violations in gnutls.c 90110f8 Don't use a literal "C-u" in ispell.el help message text f4e7f6d Improve documentation of 'seqp' ed13639 Clarify usage and dependencies between several Flyspell features Conflicts: etc/NEWS test/lisp/auth-source-tests.el
| * Fix auth-source-delete (Bug#26184)Noam Postavsky2018-07-171-0/+20
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-delete): Fix `auth-source-search' call. * test/lisp/auth-source-tests.el (auth-source-delete): New test.
* | Fix bugs in `auth-source-netrc-parse-one'.Filipp Gunbin2018-05-171-0/+19
| | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match data is not overwritten in `auth-source-netrc-parse-next-interesting'. Ensure that blanks are skipped before and after going over comments and eols. * test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.
* | Fix creation of Secret Service items in auth-sourceMichael Albinus2018-05-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-secrets-create): Use ´apply'. (auth-source-secrets-saver): Handle `auth-source-save-behavior' equal t. * lisp/net/secrets.el (secrets-get-items): Do not call `secrets-open-session' here ... (top): ... but here. * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Bind `auth-source-save-behavior' to t. Cleanup. * test/lisp/net/secrets-tests.el (secrets-test00-availability): After loading secets.el, a session is already opened. (secrets-test02-collections, secrets-test03-items) (secrets-test04-search): Open a new session.
* | Fix Bug#30246Michael Albinus2018-04-131-3/+31
|/ | | | | | | | | | | * lisp/auth-source.el (auth-source-secrets-search): Do not suppress creation. (auth-source-secrets-create): Implement it. (Bug#30246) * lisp/net/secrets.el (secrets-debug): Set default to nil. * test/lisp/auth-source-tests.el (secrets): Require it. (auth-source-test-secrets-create-secret): New test.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* ; * test/lisp/auth-source-tests.el: Require `cl-lib' instead of `cl'.Noam Postavsky2017-08-181-1/+1
|
* Fix and document make-temp-file optional text parameterTed Zlatanov2017-08-181-4/+2
| | | | | | | | * lisp/files.el (make-temp-file): Fix initial TEXT parameter. (files--make-magic-temp-file): Support optional TEXT parameter. * etc/NEWS: Document it. * doc/lispref/files.texi: Document it. * test/lisp/auth-source-tests.el: Minor reformat.
* * test/lisp/auth-source-tests.el: Avoid `string-join' to be simple.Ted Zlatanov2017-08-181-1/+1
|
* * test/lisp/auth-source-tests.el: Minor cleanups to use CL.Ted Zlatanov2017-08-181-7/+4
|
* Add auth-source tests and codify its API betterTed Zlatanov2017-08-181-0/+66
| | | | | | | | | | The auth-source behavior was unclear in some API use cases, so these extra tests codify and test it. For details see https://github.com/DamienCassou/auth-password-store/issues/29 * lisp/files.el (make-temp-file): Add new initial TEXT parameter. * test/lisp/auth-source-tests.el (auth-source-test-searches): Add auth-source tests and simplify them with the new `make-temp-file'.
* * lisp/password-cache.el (password-data): Use a hash-tableStefan Monnier2017-07-281-1/+1
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-magic): Remove. (auth-source-forget+, auth-source-forget-all-cached): Adjust to new format of password-data. (auth-source-format-cache-entry): Just use a cons. (password-cache-remove, password-cache-add, password-reset) (password-read-from-cache, password-in-cache-p): Adjust accordingly. Fixes: bug#26699
* auth-source: factor out parsers and add testsTed Zlatanov2017-04-271-18/+27
| | | | | * lisp/auth-source.el: Factor out the source parsers. Clean up comments. * test/lisp/auth-source-tests.el: Add tests.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
| | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
* Move low-level library files from the lisp/gnus directoryLars Ingebrigtsen2016-02-241-0/+223
The files moved from lisp/gnus are: auth-source.el -> / compface.el -> /image ecomplete.el -> / flow-fill.el -> /mail gravatar.el -> /image gssapi.el -> /net html2text.el -> /net ietf-drums.el -> /mail mail-parse.el -> /mail mail-prsvr.el -> /mail mailcap.el -> /net plstore.el -> / pop3.el -> /net qp.el -> /mail registry.el -> / rfc1843.el -> /international rfc2045.el -> /mail rfc2047.el -> /mail rfc2231.el -> /mail rtree.el -> / sieve-manage.el -> /net sieve-mode.el -> /net sieve.el -> /net starttls.el -> /net utf7.el -> /international yenc.el -> /mail