File: mime-get-part.at

package info (click to toggle)
mailutils 1%3A3.19-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 38,832 kB
  • sloc: ansic: 186,739; sh: 110,867; yacc: 7,463; cpp: 3,834; makefile: 3,161; lex: 1,972; python: 1,617; exp: 1,563; awk: 152; lisp: 132; sed: 31
file content (30 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This file is part of GNU Mailutils                    -*- Autotest -*-
# Copyright (C) 2018-2025 Free Software Foundation, Inc.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.

AT_SETUP([mu-mime-get-part])
AT_KEYWORDS([mime])
WITH_MAILBOX([spool/mime.msg],
 [MU_GUILE_CHECK([
(let ((msg (file->message "mbox")))
  (let* ((mime (mu-mime-create 0 msg))
         (part-1 (mu-mime-get-part mime 1))
	 (part-2 (mu-mime-get-part mime 2)))
    (message-format #t part-1)
    (newline)
    (display (mu-message-get-header part-1 "Content-ID"))
    (newline)
    (message-format #t part-2)
    (newline)
    (display (mu-message-get-header part-2 "Content-ID"))
    (newline)))],
 0,
 [#<message "X@Y" "Dow Mon Day HH:MM" 14 489>
<5122.1026510654.2@example.net>
#<message "X@Y" "Dow Mon Day HH:MM" 52 2343>
<5122.1026510654.3@example.net>
])])
AT_CLEANUP