From 043f0ce33794fdd32fc8543e55846b1bc82ee732 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 30 Nov 2025 16:16:10 +0200 Subject: [PATCH] mu-scm: don't depend on dir order in tests Some of the tests were using (mfind "") to find messages, but since some messages don't have dates the order is implicitly defined by the directory order. This usually works, but not always (i.e. guix). So let's make the behavior deterministic. Fixes #2888 --- scm/mu-scm-test.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scm/mu-scm-test.scm b/scm/mu-scm-test.scm index 3ecfb367..ee2c9773 100644 --- a/scm/mu-scm-test.scm +++ b/scm/mu-scm-test.scm @@ -26,7 +26,7 @@ (test-begin "test-basic-mfind") - (let ((msg (car (mfind "")))) + (let ((msg (car (mfind "from:Frodo")))) ;; size (test-equal 490 (size msg)) ;; message-id @@ -60,7 +60,7 @@ (define (test-mfind) (test-begin "test-mfind") - (let ((msg (car (mfind "" #:sort-field 'date #:reverse? #t)))) + (let ((msg (car (mfind "to:a@example.com" #:sort-field 'date #:reverse? #t)))) (test-equal "test with multi to and cc" (subject msg) ) (test-equal "2016-05-15 16:57:25" (time->string (date msg) #:format "%F %T" #:utc? #t))) @@ -69,7 +69,7 @@ (define (test-message-full) (test-begin "test-message-full") - (let ((msg (cadr (mfind "")))) + (let ((msg (car (mfind "from:testmu@testmu.xx")))) (test-equal "Motörhead" (header msg "Subject")) (test-equal "Mü " (header msg "From")) (test-equal #f (header msg "Bla"))