scm: implement field / fields procedures
Add procedures field & fields to get information about mu's database fields, similar to "mu info fields". Add docs & tests as well.
This commit is contained in:
@ -110,7 +110,7 @@
|
||||
|
||||
;; language
|
||||
(test-equal (language msg)
|
||||
(if (assoc-ref (configuration) 'language-enabled?) 'en nil))
|
||||
(if (assoc-ref (configuration) 'language-enabled?) 'en #f))
|
||||
|
||||
;; cc, bc, labels
|
||||
(test-equal '() (cc msg))
|
||||
@ -197,6 +197,13 @@
|
||||
(test-equal "2025-06-16 15:43:12" (time->string 1750077792 #:utc? #f))
|
||||
(test-equal "12:43:12" (time->string 1750077792 #:utc? #t #:format "%T"))
|
||||
|
||||
(let* ((subject (field 'subject)))
|
||||
(test-assert subject)
|
||||
(test-equal (assoc-ref subject 'name) "subject")
|
||||
(test-equal (assoc-ref subject 'shortcut) #\s)
|
||||
(test-equal (assoc-ref subject 'search-type) 'phrase)
|
||||
(test-assert (assoc-ref subject 'value?)))
|
||||
|
||||
;; (define old-prefs %preferences)
|
||||
;; (define %preferences '((utc? . #t) (short-date . "%T %F")))
|
||||
;; (test-equal "12:43:12 2025-06-16" (time->string 1750077792))
|
||||
|
||||
Reference in New Issue
Block a user