emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d275882: Fix failing secrets-test03-items


From: Basil L. Contovounesios
Subject: [Emacs-diffs] master d275882: Fix failing secrets-test03-items
Date: Tue, 16 Jul 2019 15:11:06 -0400 (EDT)

branch: master
commit d2758820cd45733570c704431da3f3e91dbb8605
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    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 c565eba..bab8eb5 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 @@
         (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-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 @@
   "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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]