From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 36694@debbugs.gnu.org
Cc: michael albinus <michael.albinus@gmx.de>
Subject: bug#36694: 27.0.50; Test secrets-test03-items is failing
Date: Tue, 16 Jul 2019 18:31:59 +0100 [thread overview]
Message-ID: <87d0i928ds.fsf@tcd.ie> (raw)
In-Reply-To: <87k1ch28q6.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 16 Jul 2019 18:24:33 +0100")
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> For some reason, the test secrets-test03-items expects
> secrets-get-attributes to silently put the attribute :xdg:schema at the
> beginning of the returned alist, but on my system that attribute is
> placed at the end.
>
> Is the precise ordering of attributes significant? If so, why? If not,
> the test should stop assuming any particular ordering and use
> seq-set-equal-p in place of equal. Patch to this effect to follow.
Here it is:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-failing-secrets-test03-items.patch --]
[-- Type: text/x-diff, Size: 2561 bytes --]
From d2758820cd45733570c704431da3f3e91dbb8605 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Tue, 16 Jul 2019 17:41:18 +0100
Subject: [PATCH] Fix failing secrets-test03-items
* test/lisp/net/secrets-tests.el: Use lexical-binding.
(secrets-test03-items): Do not assume :xdg:schema attribute is
silently added to the front of the collection (bug#36694).
(secrets-test04-search, secrets-test-all): Quote function symbols as
such.
---
test/lisp/net/secrets-tests.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el
index c565eba567..bab8eb5d18 100644
--- a/test/lisp/net/secrets-tests.el
+++ b/test/lisp/net/secrets-tests.el
@@ -1,4 +1,4 @@
-;;; secrets-tests.el --- Tests of Secret Service API
+;;; secrets-tests.el --- Tests of Secret Service API -*- lexical-binding: t -*-
;; Copyright (C) 2018-2019 Free Software Foundation, Inc.
@@ -21,6 +21,7 @@
(require 'ert)
(require 'secrets)
+(require 'seq)
(require 'notifications)
;; We do not want chatty messages.
@@ -175,10 +176,9 @@ secrets-test03-items
(dolist (item `("bar" ,item-path))
(should
(string-equal (secrets-get-attribute "session" item :method) "sudo"))
- ;; The attributes are collected in reverse order.
- ;; :xdg:schema is added silently.
+ ;; The attribute :xdg:schema is added silently.
(should
- (equal
+ (seq-set-equal-p
(secrets-get-attributes "session" item)
'((:xdg:schema . "org.freedesktop.Secret.Generic")
(:host . "remote-host") (:user . "joe") (:method . "sudo")))))
@@ -242,14 +242,14 @@ secrets-test04-search
(secrets-search-items "session" :xdg:schema "org.gnu.Emacs.foo"))
(should
(equal
- (sort (secrets-search-items "session" :user "joe") 'string-lessp)
+ (sort (secrets-search-items "session" :user "joe") #'string-lessp)
'("baz" "foo")))
(should
(equal
(secrets-search-items "session":method "sudo" :user "joe") '("foo")))
(should
(equal
- (sort (secrets-search-items "session") 'string-lessp)
+ (sort (secrets-search-items "session") #'string-lessp)
'("bar" "baz" "foo"))))
;; Exit.
@@ -261,7 +261,7 @@ secrets-test-all
"Run all tests for \\[secrets]."
(interactive "p")
(funcall
- (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch)
+ (if interactive #'ert-run-tests-interactively #'ert-run-tests-batch)
"^secrets"))
(provide 'secrets-tests)
--
2.20.1
[-- Attachment #3: Type: text/plain, Size: 27 bytes --]
WDYT?
Thanks,
--
Basil
next prev parent reply other threads:[~2019-07-16 17:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 17:24 bug#36694: 27.0.50; Test secrets-test03-items is failing Basil L. Contovounesios
2019-07-16 17:31 ` Basil L. Contovounesios [this message]
2019-07-16 19:08 ` Michael Albinus
2019-07-16 19:13 ` Basil L. Contovounesios
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=87d0i928ds.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=36694@debbugs.gnu.org \
--cc=michael.albinus@gmx.de \
/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.