]> git.eshelyaron.com Git - emacs.git/commitdiff
Make abbrev-tests.el more deterministic
authorBasil L. Contovounesios <contovob@tcd.ie>
Wed, 9 Dec 2020 00:54:34 +0000 (00:54 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Wed, 9 Dec 2020 00:54:34 +0000 (00:54 +0000)
* test/lisp/abbrev-tests.el (abbrev--table-symbols-test): Don't rely
on order of symbols in obarray.

test/lisp/abbrev-tests.el

index aaf1d4a5b5cf36d99ff9ad7d553f7dd1532b0867..288ea1ae987b8c8b30c91579b916e92d3ef7bd9d 100644 (file)
@@ -69,8 +69,9 @@
     (define-abbrev ert-test-abbrevs "sys" "system abbrev" nil :system t)
     (should (equal (mapcar #'symbol-name (abbrev--table-symbols 'ert-test-abbrevs))
                    '("a-e-t")))
-    (should (equal (mapcar #'symbol-name (abbrev--table-symbols 'ert-test-abbrevs t))
-                   '("a-e-t" "sys")))))
+    (let ((syms (abbrev--table-symbols 'ert-test-abbrevs t)))
+      (should (equal (sort (mapcar #'symbol-name syms) #'string<)
+                     '("a-e-t" "sys"))))))
 
 (ert-deftest abbrev-table-get-put-test ()
   (let ((table (make-abbrev-table)))