summaryrefslogtreecommitdiff
path: root/tests/xapian.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-01-02 00:15:27 +0100
committerRicardo Wurmus <rekado@elephly.net>2023-01-02 00:15:27 +0100
commit7ee17be0a1288987e56aa4af3c0ef3d49297c247 (patch)
treee0e6e83ba887385a39904cdd717fb77677ebabfb /tests/xapian.scm
parent7dbd1a5ca17bf2bd940052cd313856b5af2d8d32 (diff)
tests: Ignore search result order.
Diffstat (limited to 'tests/xapian.scm')
-rw-r--r--tests/xapian.scm16
1 files 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"