From 7ee17be0a1288987e56aa4af3c0ef3d49297c247 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 2 Jan 2023 00:15:27 +0100 Subject: tests: Ignore search result order. --- tests/xapian.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/xapian.scm b/tests/xapian.scm index f754b56..5b9082a 100644 --- a/tests/xapian.scm +++ b/tests/xapian.scm @@ -86,9 +86,11 @@ (dynamic-wind (lambda () #t) (lambda () - (test-equal "search: finds simple strings" - '("33299" "47187") - (search "hello" #:pagesize 2)) + (test-assert "search: finds simple strings" + (let ((result (search "hello" #:pagesize 2))) + (and (= 2 (length result)) + (member "33299" result) + (member "47187" result)))) (test-equal "search: supports submitter prefix with partial name" '("26095") (search "submitter:Ricardo" #:pagesize 2)) @@ -98,9 +100,11 @@ (test-equal "search: supports submitter prefix with phrase" '("26095") (search "submitter:\"Ricardo Wurmus\"" #:pagesize 2)) - (test-equal "search: supports author prefix with email address" - '("26095" "33299") - (search "author:ludo" #:pagesize 2)) + (test-assert "search: supports author prefix with email address" + (let ((result (search "author:ludo" #:pagesize 2))) + (and (= 2 (length result)) + (member "26095" result) + (member "33299" result)))) (test-equal "search: finds by message id" '("33299") (search "msgid:c78be403-0616-67a0-fd5a-e1196b6a14d1@example.com" -- cgit v1.2.3