File: message-port-read-2.at

package info (click to toggle)
mailutils 1%3A3.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 38,912 kB
  • sloc: ansic: 187,772; sh: 111,430; yacc: 7,463; cpp: 3,834; makefile: 3,166; lex: 1,972; python: 1,617; exp: 1,563; awk: 152; lisp: 132; sed: 31
file content (30 lines) | stat: -rw-r--r-- 1,205 bytes parent folder | download | duplicates (2)
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([message port (all)])
AT_KEYWORDS([message])
MU_GUILE_CHECK([
(use-modules ((ice-9 binary-ports)))

(let ((msg (test-message)))
  (let ((port (mu-message-get-port msg "r" #t)))
    (do ((c (get-u8 port) (get-u8 port)))
	((eof-object? c))
      (put-u8 (current-output-port) c))
    (close port)))],
  0,
  [From: user@example.org
To: someone@example.com
Subject: De omnibus rebus et quibusdam aliis

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
])
AT_CLEANUP