diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-11-30 16:16:10 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2025-11-30 16:21:19 +0200 |
| commit | 46f91ab7b7641caac992a41264ac41a76c001c87 (patch) | |
| tree | 58aa96f63c303d9b92d88c7443c6f21881c873b8 | |
| parent | 9c495dc44b44019baaeeca7437c75fef0485947e (diff) | |
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
| -rw-r--r-- | scm/mu-scm-test.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scm/mu-scm-test.scm b/scm/mu-scm-test.scm index 3ecfb36..ee2c977 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ü <testmu@testmu.xx>" (header msg "From")) (test-equal #f (header msg "Bla")) |
