Debian Codegraph @

libmu_scm/tests/testsuite

raw symbols SCIP
1 #! /bin/sh
2 # Generated from testsuite.at by GNU Autoconf 2.71.
3 #
4 # Copyright (C) 2009-2017, 2020-2021 Free Software Foundation, Inc.
5 #
6 # This test suite is free software; the Free Software Foundation gives
7 # unlimited permission to copy, distribute and modify it.
8 ## -------------------- ##
9 ## M4sh Initialization. ##
10 ## -------------------- ##
11
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 as_nop=:
15 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16 then :
17 emulate sh
18 NULLCMD=:
19 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else $as_nop
24 case `(set -o) 2>/dev/null` in #(
25 *posix*) :
26 set -o posix ;; #(
27 *) :
28 ;;
29 esac
30 fi
31
32
33
34 # Reset variables that may have inherited troublesome values from
35 # the environment.
36
37 # IFS needs to be set, to space, tab, and newline, in precisely that order.
38 # (If _AS_PATH_WALK were called with IFS unset, it would have the
39 # side effect of setting IFS to empty, thus disabling word splitting.)
40 # Quoting is to prevent editors from complaining about space-tab.
41 as_nl='
42 '
43 export as_nl
44 IFS=" "" $as_nl"
45
46 PS1='$ '
47 PS2='> '
48 PS4='+ '
49
50 # Ensure predictable behavior from utilities with locale-dependent output.
51 LC_ALL=C
52 export LC_ALL
53 LANGUAGE=C
54 export LANGUAGE
55
56 # We cannot yet rely on "unset" to work, but we need these variables
57 # to be unset--not just set to an empty or harmless value--now, to
58 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
59 # also avoids known problems related to "unset" and subshell syntax
60 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
61 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
62 do eval test \${$as_var+y} \
63 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
64 done
65
66 # Ensure that fds 0, 1, and 2 are open.
67 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
68 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
69 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
70
71 # The user is always right.
72 if ${PATH_SEPARATOR+false} :; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80
81 # Find who we are. Look in the path if we contain no directory separator.
82 as_myself=
83 case $0 in #((
84 *[\\/]* ) as_myself=$0 ;;
85 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
86 for as_dir in $PATH
87 do
88 IFS=$as_save_IFS
89 case $as_dir in #(((
90 '') as_dir=./ ;;
91 */) ;;
92 *) as_dir=$as_dir/ ;;
93 esac
94 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
95 done
96 IFS=$as_save_IFS
97
98 ;;
99 esac
100 # We did not find ourselves, most probably we were run as `sh COMMAND'
101 # in which case we are not to be found in the path.
102 if test "x$as_myself" = x; then
103 as_myself=$0
104 fi
105 if test ! -f "$as_myself"; then
106 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
107 exit 1
108 fi
109
110
111 if test "x$CONFIG_SHELL" = x; then
112 as_bourne_compatible="as_nop=:
113 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
114 then :
115 emulate sh
116 NULLCMD=:
117 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
118 # is contrary to our usage. Disable this feature.
119 alias -g '\${1+\"\$@\"}'='\"\$@\"'
120 setopt NO_GLOB_SUBST
121 else \$as_nop
122 case \`(set -o) 2>/dev/null\` in #(
123 *posix*) :
124 set -o posix ;; #(
125 *) :
126 ;;
127 esac
128 fi
129 "
130 as_required="as_fn_return () { (exit \$1); }
131 as_fn_success () { as_fn_return 0; }
132 as_fn_failure () { as_fn_return 1; }
133 as_fn_ret_success () { return 0; }
134 as_fn_ret_failure () { return 1; }
135
136 exitcode=0
137 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
138 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
139 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
140 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
141 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
142 then :
143
144 else \$as_nop
145 exitcode=1; echo positional parameters were not saved.
146 fi
147 test x\$exitcode = x0 || exit 1
148 blah=\$(echo \$(echo blah))
149 test x\"\$blah\" = xblah || exit 1
150 test -x / || exit 1"
151 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
152 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
153 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
154 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
155 test \$(( 1 + 1 )) = 2 || exit 1"
156 if (eval "$as_required") 2>/dev/null
157 then :
158 as_have_required=yes
159 else $as_nop
160 as_have_required=no
161 fi
162 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
163 then :
164
165 else $as_nop
166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
167 as_found=false
168 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
169 do
170 IFS=$as_save_IFS
171 case $as_dir in #(((
172 '') as_dir=./ ;;
173 */) ;;
174 *) as_dir=$as_dir/ ;;
175 esac
176 as_found=:
177 case $as_dir in #(
178 /*)
179 for as_base in sh bash ksh sh5; do
180 # Try only shells that exist, to save several forks.
181 as_shell=$as_dir$as_base
182 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
183 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
184 then :
185 CONFIG_SHELL=$as_shell as_have_required=yes
186 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
187 then :
188 break 2
189 fi
190 fi
191 done;;
192 esac
193 as_found=false
194 done
195 IFS=$as_save_IFS
196 if $as_found
197 then :
198
199 else $as_nop
200 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
201 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
202 then :
203 CONFIG_SHELL=$SHELL as_have_required=yes
204 fi
205 fi
206
207
208 if test "x$CONFIG_SHELL" != x
209 then :
210 export CONFIG_SHELL
211 # We cannot yet assume a decent shell, so we have to provide a
212 # neutralization value for shells without unset; and this also
213 # works around shells that cannot unset nonexistent variables.
214 # Preserve -v and -x to the replacement shell.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 case $- in # ((((
219 *v*x* | *x*v* ) as_opts=-vx ;;
220 *v* ) as_opts=-v ;;
221 *x* ) as_opts=-x ;;
222 * ) as_opts= ;;
223 esac
224 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
225 # Admittedly, this is quite paranoid, since all the known shells bail
226 # out after a failed `exec'.
227 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
228 exit 255
229 fi
230
231 if test x$as_have_required = xno
232 then :
233 printf "%s\n" "$0: This script requires a shell more modern than all"
234 printf "%s\n" "$0: the shells that I found on your system."
235 if test ${ZSH_VERSION+y} ; then
236 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
237 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
238 else
239 printf "%s\n" "$0: Please tell [email protected] about your system,
240 $0: including any error possibly output before this
241 $0: message. Then install a modern shell, or manually run
242 $0: the script under such a shell if you do have one."
243 fi
244 exit 1
245 fi
246 fi
247 fi
248 SHELL=${CONFIG_SHELL-/bin/sh}
249 export SHELL
250 # Unset more variables known to interfere with behavior of common tools.
251 CLICOLOR_FORCE= GREP_OPTIONS=
252 unset CLICOLOR_FORCE GREP_OPTIONS
253
254 ## --------------------- ##
255 ## M4sh Shell Functions. ##
256 ## --------------------- ##
257 # as_fn_unset VAR
258 # ---------------
259 # Portably unset VAR.
260 as_fn_unset ()
261 {
262 { eval $1=; unset $1;}
263 }
264 as_unset=as_fn_unset
265
266
267 # as_fn_set_status STATUS
268 # -----------------------
269 # Set $? to STATUS, without forking.
270 as_fn_set_status ()
271 {
272 return $1
273 } # as_fn_set_status
274
275 # as_fn_exit STATUS
276 # -----------------
277 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
278 as_fn_exit ()
279 {
280 set +e
281 as_fn_set_status $1
282 exit $1
283 } # as_fn_exit
284 # as_fn_nop
285 # ---------
286 # Do nothing but, unlike ":", preserve the value of $?.
287 as_fn_nop ()
288 {
289 return $?
290 }
291 as_nop=as_fn_nop
292
293 # as_fn_mkdir_p
294 # -------------
295 # Create "$as_dir" as a directory, including parents if necessary.
296 as_fn_mkdir_p ()
297 {
298
299 case $as_dir in #(
300 -*) as_dir=./$as_dir;;
301 esac
302 test -d "$as_dir" || eval $as_mkdir_p || {
303 as_dirs=
304 while :; do
305 case $as_dir in #(
306 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
307 *) as_qdir=$as_dir;;
308 esac
309 as_dirs="'$as_qdir' $as_dirs"
310 as_dir=`$as_dirname -- "$as_dir" ||
311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
312 X"$as_dir" : 'X\(//\)[^/]' \| \
313 X"$as_dir" : 'X\(//\)$' \| \
314 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
315 printf "%s\n" X"$as_dir" |
316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
317 s//\1/
318 q
319 }
320 /^X\(\/\/\)[^/].*/{
321 s//\1/
322 q
323 }
324 /^X\(\/\/\)$/{
325 s//\1/
326 q
327 }
328 /^X\(\/\).*/{
329 s//\1/
330 q
331 }
332 s/.*/./; q'`
333 test -d "$as_dir" && break
334 done
335 test -z "$as_dirs" || eval "mkdir $as_dirs"
336 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
337
338
339 } # as_fn_mkdir_p
340
341 # as_fn_executable_p FILE
342 # -----------------------
343 # Test if FILE is an executable regular file.
344 as_fn_executable_p ()
345 {
346 test -f "$1" && test -x "$1"
347 } # as_fn_executable_p
348 # as_fn_append VAR VALUE
349 # ----------------------
350 # Append the text in VALUE to the end of the definition contained in VAR. Take
351 # advantage of any shell optimizations that allow amortized linear growth over
352 # repeated appends, instead of the typical quadratic growth present in naive
353 # implementations.
354 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
355 then :
356 eval 'as_fn_append ()
357 {
358 eval $1+=\$2
359 }'
360 else $as_nop
361 as_fn_append ()
362 {
363 eval $1=\$$1\$2
364 }
365 fi # as_fn_append
366
367 # as_fn_arith ARG...
368 # ------------------
369 # Perform arithmetic evaluation on the ARGs, and store the result in the
370 # global $as_val. Take advantage of shells that can avoid forks. The arguments
371 # must be portable across $(()) and expr.
372 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
373 then :
374 eval 'as_fn_arith ()
375 {
376 as_val=$(( $* ))
377 }'
378 else $as_nop
379 as_fn_arith ()
380 {
381 as_val=`expr "$@" || test $? -eq 1`
382 }
383 fi # as_fn_arith
384
385
386 # as_fn_error STATUS ERROR [LINENO LOG_FD]
387 # ----------------------------------------
388 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
389 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
390 # script with STATUS, using 1 if that was 0.
391 as_fn_error ()
392 {
393 as_status=$1; test $as_status -eq 0 && as_status=1
394 if test "$4"; then
395 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
396 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
397 fi
398 printf "%s\n" "$as_me: error: $2" >&2
399 as_fn_exit $as_status
400 } # as_fn_error
401
402 if expr a : '\(a\)' >/dev/null 2>&1 &&
403 test "X`expr 00001 : '.*\(...\)'`" = X001; then
404 as_expr=expr
405 else
406 as_expr=false
407 fi
408
409 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
410 as_basename=basename
411 else
412 as_basename=false
413 fi
414
415 as_me=`$as_basename -- "$0" ||
416 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
417 X"$0" : 'X\(//\)$' \| \
418 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
419 printf "%s\n" X/"$0" |
420 sed '/^.*\/\([^/][^/]*\)\/*$/{
421 s//\1/
422 q
423 }
424 /^X\/\(\/\/\)$/{
425 s//\1/
426 q
427 }
428 /^X\/\(\/\).*/{
429 s//\1/
430 q
431 }
432 s/.*/./; q'`
433
434 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
435 as_dirname=dirname
436 else
437 as_dirname=false
438 fi
439
440 # Avoid depending upon Character Ranges.
441 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
442 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
443 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
444 as_cr_digits='0123456789'
445 as_cr_alnum=$as_cr_Letters$as_cr_digits
446
447
448 as_lineno_1=$LINENO as_lineno_1a=$LINENO
449 as_lineno_2=$LINENO as_lineno_2a=$LINENO
450 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
451 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
452 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
453 sed -n '
454 p
455 /[$]LINENO/=
456 ' <$as_myself |
457 sed '
458 s/[$]LINENO.*/&-/
459 t lineno
460 b
461 :lineno
462 N
463 :loop
464 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
465 t loop
466 s/-\n.*//
467 ' >$as_me.lineno &&
468 chmod +x "$as_me.lineno" ||
469 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
470
471 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
472 # already done that, so ensure we don't try to do so again and fall
473 # in an infinite loop. This has already happened in practice.
474 _as_can_reexec=no; export _as_can_reexec
475 # Don't try to exec as it changes $[0], causing all sort of problems
476 # (the dirname of $[0] is not the place where we might find the
477 # original and so on. Autoconf is especially sensitive to this).
478 . "./$as_me.lineno"
479 # Exit status is that of the last command.
480 exit
481 }
482
483
484 # Determine whether it's possible to make 'echo' print without a newline.
485 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
486 # for compatibility with existing Makefiles.
487 ECHO_C= ECHO_N= ECHO_T=
488 case `echo -n x` in #(((((
489 -n*)
490 case `echo 'xy\c'` in
491 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
492 xy) ECHO_C='\c';;
493 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
494 ECHO_T=' ';;
495 esac;;
496 *)
497 ECHO_N='-n';;
498 esac
499
500 # For backward compatibility with old third-party macros, we provide
501 # the shell variables $as_echo and $as_echo_n. New code should use
502 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
503 as_echo='printf %s\n'
504 as_echo_n='printf %s'
505
506
507 rm -f conf$$ conf$$.exe conf$$.file
508 if test -d conf$$.dir; then
509 rm -f conf$$.dir/conf$$.file
510 else
511 rm -f conf$$.dir
512 mkdir conf$$.dir 2>/dev/null
513 fi
514 if (echo >conf$$.file) 2>/dev/null; then
515 if ln -s conf$$.file conf$$ 2>/dev/null; then
516 as_ln_s='ln -s'
517 # ... but there are two gotchas:
518 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
519 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
520 # In both cases, we have to default to `cp -pR'.
521 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
522 as_ln_s='cp -pR'
523 elif ln conf$$.file conf$$ 2>/dev/null; then
524 as_ln_s=ln
525 else
526 as_ln_s='cp -pR'
527 fi
528 else
529 as_ln_s='cp -pR'
530 fi
531 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
532 rmdir conf$$.dir 2>/dev/null
533
534 if mkdir -p . 2>/dev/null; then
535 as_mkdir_p='mkdir -p "$as_dir"'
536 else
537 test -d ./-p && rmdir ./-p
538 as_mkdir_p=false
539 fi
540
541 as_test_x='test -x'
542 as_executable_p=as_fn_executable_p
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552
553
554 SHELL=${CONFIG_SHELL-/bin/sh}
555
556 # How were we run?
557 at_cli_args="$@"
558
559
560 # Not all shells have the 'times' builtin; the subshell is needed to make
561 # sure we discard the 'times: not found' message from the shell.
562 at_times_p=false
563 (times) >/dev/null 2>&1 && at_times_p=:
564
565 # CLI Arguments to pass to the debugging scripts.
566 at_debug_args=
567 # -e sets to true
568 at_errexit_p=false
569 # Shall we be verbose? ':' means no, empty means yes.
570 at_verbose=:
571 at_quiet=
572 # Running several jobs in parallel, 0 means as many as test groups.
573 at_jobs=1
574 at_traceon=:
575 at_trace_echo=:
576 at_check_filter_trace=:
577
578 # Shall we keep the debug scripts? Must be `:' when the suite is
579 # run by a debug script, so that the script doesn't remove itself.
580 at_debug_p=false
581 # Display help message?
582 at_help_p=false
583 # Display the version message?
584 at_version_p=false
585 # List test groups?
586 at_list_p=false
587 # --clean
588 at_clean=false
589 # Test groups to run
590 at_groups=
591 # Whether to rerun failed tests.
592 at_recheck=
593 # Whether a write failure occurred
594 at_write_fail=0
595
596 # The directory we run the suite in. Default to . if no -C option.
597 at_dir=`pwd`
598 # An absolute reference to this testsuite script.
599 case $as_myself in
600 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
601 * ) at_myself=$at_dir/$as_myself ;;
602 esac
603 # Whether -C is in effect.
604 at_change_dir=false
605
606 # Whether to enable colored test results.
607 at_color=no
608 # As many question marks as there are digits in the last test group number.
609 # Used to normalize the test group numbers so that `ls' lists them in
610 # numerical order.
611 at_format='??'
612 # Description of all the test groups.
613 at_help_all="1;const.at:7;Constants;constants;
614 2;address-count.at:6;mu-address-get-count;address;
615 3;address-domain.at:6;mu-address-get-domain;address;
616 4;address-domain.at:13;mu-address-get-domain with arg;address;
617 5;address-local.at:6;mu-address-get-local;address;
618 6;address-local.at:13;mu-address-get-local with arg;address;
619 7;address-email.at:6;mu-address-get-email;address;
620 8;address-personal.at:6;mu-address-get-personal;address;
621 9;message-print.at:7;message print;message;
622 10;message-get-size.at:7;mu-message-get-size;message;
623 11;message-get-lines.at:7;mu-message-get-lines;message;
624 12;message-get-envelope.at:6;message-get-envelope;message;
625 13;message-get-sender.at:6;message-get-sender;message;
626 14;message-get-envelope-date.at:6;message-get-envelope-date;message;
627 15;message-get-header.at:6;message-get-header;message;
628 16;message-get-header-fields.at:6;mu-message-get-header-fields;message;
629 17;message-port-read-1.at:7;message port (body);message;
630 18;message-port-read-2.at:7;message port (all);message;
631 19;message-multipart.at:7;mu-message-multipart?;message;
632 20;message-get-num-parts.at:7;mu-message-get-num-parts;message;
633 21;message-get-part.at:7;mu-message-get-part;message;
634 22;message-set-header.at:6;message-set-header;message;
635 23;message-set-header-fields.at:6;message-set-header-fields;message;
636 24;message-create.at:7;mu-message-create;message;
637 25;message-port-1.at:7;message port (body);message;
638 26;message-port-2.at:7;message port (full);message;
639 27;message-body.at:7;message body;message body;
640 28;bodyp.at:7;mu-body?;body;
641 29;message-delete.at:7;mu-message-delete;message;
642 30;mailbox-open.at:7;mu-mailbox-open;mailbox;
643 31;mailbox-open-exc.at:7;mu-mailbox-open exception;mailbox;
644 32;mailbox-print.at:7;mailbox print;mailbox;
645 33;mailbox-get-url.at:7;mu-mailbox-get-url;mailbox;
646 34;mailbox-get-size.at:7;mu-mailbox-get-size;mailbox;
647 35;mailbox-messages-count.at:7;mu-mailbox-messages-count;mailbox;
648 36;mailbox-get-message.at:7;mu-mailbox-get-message;mailbox;
649 37;mailbox-iterate.at:7;mu-mailbox-first/next-message;mailbox;
650 38;mailbox-append-message.at:7;mu-mailbox-append-message;mailbox;
651 39;mailbox-expunge.at:7;mailbox-expunge;mailbox;
652 40;message-get-flag.at:7;mu-message-set/get-flag;message;
653 41;mime-create.at:7;mu-mime-create (from file);mime;
654 42;mime-p.at:7;mu-mime?;mime;
655 43;mime-multipart-p.at:7;mu-mime-multipart?;mime;
656 44;mime-get-num-parts.at:7;mu-mime-get-num-parts;mime;
657 45;mime-get-part.at:7;mu-mime-get-part;mime;
658 46;mime-add-part.at:7;mu-mime-add-part and mu-mime-get-message;mime;
659 "
660 # List of the all the test groups.
661 at_groups_all=`printf "%s\n" "$at_help_all" | sed 's/;.*//'`
662
663 # at_fn_validate_ranges NAME...
664 # -----------------------------
665 # Validate and normalize the test group number contained in each variable
666 # NAME. Leading zeroes are treated as decimal.
667 at_fn_validate_ranges ()
668 {
669 for at_grp
670 do
671 eval at_value=\$$at_grp
672 if test $at_value -lt 1 || test $at_value -gt 46; then
673 printf "%s\n" "invalid test group: $at_value" >&2
674 exit 1
675 fi
676 case $at_value in
677 0*) # We want to treat leading 0 as decimal, like expr and test, but
678 # AS_VAR_ARITH treats it as octal if it uses $(( )).
679 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
680 # expr fork, but it is not worth the effort to determine if the
681 # shell supports XSI when the user can just avoid leading 0.
682 eval $at_grp='`expr $at_value + 0`' ;;
683 esac
684 done
685 }
686 # List of the tested programs.
687 at_tested='"guile"'
688
689
690 at_prev=
691 for at_option
692 do
693 # If the previous option needs an argument, assign it.
694 if test -n "$at_prev"; then
695 at_option=$at_prev=$at_option
696 at_prev=
697 fi
698
699 case $at_option in
700 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
701 *) at_optarg= ;;
702 esac
703
704 case $at_option in
705 --help | -h )
706 at_help_p=:
707 ;;
708
709 --list | -l )
710 at_list_p=:
711 ;;
712
713 --version | -V )
714 at_version_p=:
715 ;;
716
717 --clean | -c )
718 at_clean=:
719 ;;
720
721 --color )
722 at_color=always
723 ;;
724 --color=* )
725 case $at_optarg in
726 no | never | none) at_color=never ;;
727 auto | tty | if-tty) at_color=auto ;;
728 always | yes | force) at_color=always ;;
729 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
730 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
731 esac
732 ;;
733
734 --debug | -d )
735 at_debug_p=:
736 ;;
737
738 --errexit | -e )
739 at_debug_p=:
740 at_errexit_p=:
741 ;;
742
743 --verbose | -v )
744 at_verbose=; at_quiet=:
745 ;;
746
747 --trace | -x )
748 at_traceon='set -x'
749 at_trace_echo=echo
750 at_check_filter_trace=at_fn_filter_trace
751 ;;
752
753 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
754 at_fn_validate_ranges at_option
755 as_fn_append at_groups "$at_option$as_nl"
756 ;;
757
758 # Ranges
759 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
760 at_range_start=`echo $at_option |tr -d X-`
761 at_fn_validate_ranges at_range_start
762 at_range=`printf "%s\n" "$at_groups_all" | \
763 sed -ne '/^'$at_range_start'$/,$p'`
764 as_fn_append at_groups "$at_range$as_nl"
765 ;;
766
767 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
768 at_range_end=`echo $at_option |tr -d X-`
769 at_fn_validate_ranges at_range_end
770 at_range=`printf "%s\n" "$at_groups_all" | \
771 sed -ne '1,/^'$at_range_end'$/p'`
772 as_fn_append at_groups "$at_range$as_nl"
773 ;;
774
775 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
776 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
777 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
778 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
779 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
780 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
781 at_range_start=`expr $at_option : '\(.*\)-'`
782 at_range_end=`expr $at_option : '.*-\(.*\)'`
783 if test $at_range_start -gt $at_range_end; then
784 at_tmp=$at_range_end
785 at_range_end=$at_range_start
786 at_range_start=$at_tmp
787 fi
788 at_fn_validate_ranges at_range_start at_range_end
789 at_range=`printf "%s\n" "$at_groups_all" | \
790 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
791 as_fn_append at_groups "$at_range$as_nl"
792 ;;
793
794 # Directory selection.
795 --directory | -C )
796 at_prev=--directory
797 ;;
798 --directory=* )
799 at_change_dir=:
800 at_dir=$at_optarg
801 if test x- = "x$at_dir" ; then
802 at_dir=./-
803 fi
804 ;;
805
806 # Parallel execution.
807 --jobs | -j )
808 at_jobs=0
809 ;;
810 --jobs=* | -j[0-9]* )
811 if test -n "$at_optarg"; then
812 at_jobs=$at_optarg
813 else
814 at_jobs=`expr X$at_option : 'X-j\(.*\)'`
815 fi
816 case $at_jobs in *[!0-9]*)
817 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
818 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
819 esac
820 ;;
821
822 # Keywords.
823 --keywords | -k )
824 at_prev=--keywords
825 ;;
826 --keywords=* )
827 at_groups_selected=$at_help_all
828 at_save_IFS=$IFS
829 IFS=,
830 set X $at_optarg
831 shift
832 IFS=$at_save_IFS
833 for at_keyword
834 do
835 at_invert=
836 case $at_keyword in
837 '!'*)
838 at_invert="-v"
839 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
840 ;;
841 esac
842 # It is on purpose that we match the test group titles too.
843 at_groups_selected=`printf "%s\n" "$at_groups_selected" |
844 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
845 done
846 # Smash the keywords.
847 at_groups_selected=`printf "%s\n" "$at_groups_selected" | sed 's/;.*//'`
848 as_fn_append at_groups "$at_groups_selected$as_nl"
849 ;;
850 --recheck)
851 at_recheck=:
852 ;;
853
854 *=*)
855 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
856 # Reject names that are not valid shell variable names.
857 case $at_envvar in
858 '' | [0-9]* | *[!_$as_cr_alnum]* )
859 as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
860 esac
861 at_value=`printf "%s\n" "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
862 # Export now, but save eval for later and for debug scripts.
863 export $at_envvar
864 as_fn_append at_debug_args " $at_envvar='$at_value'"
865 ;;
866
867 *) printf "%s\n" "$as_me: invalid option: $at_option" >&2
868 printf "%s\n" "Try \`$0 --help' for more information." >&2
869 exit 1
870 ;;
871 esac
872 done
873
874 # Verify our last option didn't require an argument
875 if test -n "$at_prev"
876 then :
877 as_fn_error $? "\`$at_prev' requires an argument"
878 fi
879
880 # The file containing the suite.
881 at_suite_log=$at_dir/$as_me.log
882
883 # Selected test groups.
884 if test -z "$at_groups$at_recheck"; then
885 at_groups=$at_groups_all
886 else
887 if test -n "$at_recheck" && test -r "$at_suite_log"; then
888 at_oldfails=`sed -n '
889 /^Failed tests:$/,/^Skipped tests:$/{
890 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
891 }
892 /^Unexpected passes:$/,/^## Detailed failed tests/{
893 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
894 }
895 /^## Detailed failed tests/q
896 ' "$at_suite_log"`
897 as_fn_append at_groups "$at_oldfails$as_nl"
898 fi
899 # Sort the tests, removing duplicates.
900 at_groups=`printf "%s\n" "$at_groups" | sort -nu | sed '/^$/d'`
901 fi
902
903 if test x"$at_color" = xalways \
904 || { test x"$at_color" = xauto && test -t 1; }; then
905 at_red=`printf '\033[0;31m'`
906 at_grn=`printf '\033[0;32m'`
907 at_lgn=`printf '\033[1;32m'`
908 at_blu=`printf '\033[1;34m'`
909 at_std=`printf '\033[m'`
910 else
911 at_red= at_grn= at_lgn= at_blu= at_std=
912 fi
913
914 # Help message.
915 if $at_help_p; then
916 cat <<_ATEOF || at_write_fail=1
917 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
918
919 Run all the tests, or the selected TESTS, given by numeric ranges, and
920 save a detailed log file. Upon failure, create debugging scripts.
921
922 Do not change environment variables directly. Instead, set them via
923 command line arguments. Set \`AUTOTEST_PATH' to select the executables
924 to exercise. Each relative directory is expanded as build and source
925 directories relative to the top level of this distribution.
926 E.g., from within the build directory /tmp/foo-1.0, invoking this:
927
928 $ $0 AUTOTEST_PATH=bin
929
930 is equivalent to the following, assuming the source directory is /src/foo-1.0:
931
932 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
933 _ATEOF
934 cat <<_ATEOF || at_write_fail=1
935
936 Operation modes:
937 -h, --help print the help message, then exit
938 -V, --version print version number, then exit
939 -c, --clean remove all the files this test suite might create and exit
940 -l, --list describes all the tests, or the selected TESTS
941 _ATEOF
942 cat <<_ATEOF || at_write_fail=1
943
944 Execution tuning:
945 -C, --directory=DIR
946 change to directory DIR before starting
947 --color[=never|auto|always]
948 enable colored test results on terminal, or always
949 -j, --jobs[=N]
950 Allow N jobs at once; infinite jobs with no arg (default 1)
951 -k, --keywords=KEYWORDS
952 select the tests matching all the comma-separated KEYWORDS
953 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
954 --recheck select all tests that failed or passed unexpectedly last time
955 -e, --errexit abort as soon as a test fails; implies --debug
956 -v, --verbose force more detailed output
957 default for debugging scripts
958 -d, --debug inhibit clean up and top-level logging
959 default for debugging scripts
960 -x, --trace enable tests shell tracing
961 _ATEOF
962 cat <<_ATEOF || at_write_fail=1
963
964 Report bugs to <[email protected]>.
965 General help using GNU software: <https://www.gnu.org/gethelp/>.
966 _ATEOF
967 exit $at_write_fail
968 fi
969
970 # List of tests.
971 if $at_list_p; then
972 cat <<_ATEOF || at_write_fail=1
973 GNU Mailutils 3.20 test suite test groups:
974
975 NUM: FILE-NAME:LINE TEST-GROUP-NAME
976 KEYWORDS
977
978 _ATEOF
979 # Pass an empty line as separator between selected groups and help.
980 printf "%s\n" "$at_groups$as_nl$as_nl$at_help_all" |
981 awk 'NF == 1 && FS != ";" {
982 selected[$ 1] = 1
983 next
984 }
985 /^$/ { FS = ";" }
986 NF > 0 {
987 if (selected[$ 1]) {
988 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
989 if ($ 4) {
990 lmax = 79
991 indent = " "
992 line = indent
993 len = length (line)
994 n = split ($ 4, a, " ")
995 for (i = 1; i <= n; i++) {
996 l = length (a[i]) + 1
997 if (i > 1 && len + l > lmax) {
998 print line
999 line = indent " " a[i]
1000 len = length (line)
1001 } else {
1002 line = line " " a[i]
1003 len += l
1004 }
1005 }
1006 if (n)
1007 print line
1008 }
1009 }
1010 }' || at_write_fail=1
1011 exit $at_write_fail
1012 fi
1013 if $at_version_p; then
1014 printf "%s\n" "$as_me (GNU Mailutils 3.20)" &&
1015 cat <<\_ATEOF || at_write_fail=1
1016
1017 Copyright (C) 2021 Free Software Foundation, Inc.
1018 This test suite is free software; the Free Software Foundation gives
1019 unlimited permission to copy, distribute and modify it.
1020 _ATEOF
1021 exit $at_write_fail
1022 fi
1023
1024 # Should we print banners? Yes if more than one test is run.
1025 case $at_groups in #(
1026 *$as_nl* )
1027 at_print_banners=: ;; #(
1028 * ) at_print_banners=false ;;
1029 esac
1030 # Text for banner N, set to a single space once printed.
1031 # Banner 1. testsuite.at:37
1032 # Category starts at test group 2.
1033 at_banner_text_1="mu-address functions"
1034 # Banner 2. testsuite.at:44
1035 # Category starts at test group 9.
1036 at_banner_text_2="mu-message functions"
1037 # Banner 3. testsuite.at:70
1038 # Category starts at test group 30.
1039 at_banner_text_3="mu-mailbox functions"
1040 # Banner 4. testsuite.at:83
1041 # Category starts at test group 41.
1042 at_banner_text_4="mu-mime functions"
1043
1044 # Take any -C into account.
1045 if $at_change_dir ; then
1046 test x != "x$at_dir" && cd "$at_dir" \
1047 || as_fn_error $? "unable to change directory"
1048 at_dir=`pwd`
1049 fi
1050
1051 # Load the config files for any default variable assignments.
1052 for at_file in atconfig atlocal
1053 do
1054 test -r $at_file || continue
1055 . ./$at_file || as_fn_error $? "invalid content: $at_file"
1056 done
1057
1058 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1059 : "${at_top_build_prefix=$at_top_builddir}"
1060
1061 # Perform any assignments requested during argument parsing.
1062 eval "$at_debug_args"
1063
1064 # atconfig delivers names relative to the directory the test suite is
1065 # in, but the groups themselves are run in testsuite-dir/group-dir.
1066 if test -n "$at_top_srcdir"; then
1067 builddir=../..
1068 for at_dir_var in srcdir top_srcdir top_build_prefix
1069 do
1070 eval at_val=\$at_$at_dir_var
1071 case $at_val in
1072 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1073 *) at_prefix=../../ ;;
1074 esac
1075 eval "$at_dir_var=\$at_prefix\$at_val"
1076 done
1077 fi
1078
1079 ## -------------------- ##
1080 ## Directory structure. ##
1081 ## -------------------- ##
1082
1083 # This is the set of directories and files used by this script
1084 # (non-literals are capitalized):
1085 #
1086 # TESTSUITE - the testsuite
1087 # TESTSUITE.log - summarizes the complete testsuite run
1088 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1089 # + at-groups/ - during a run: status of all groups in run
1090 # | + NNN/ - during a run: meta-data about test group NNN
1091 # | | + check-line - location (source file and line) of current AT_CHECK
1092 # | | + status - exit status of current AT_CHECK
1093 # | | + stdout - stdout of current AT_CHECK
1094 # | | + stder1 - stderr, including trace
1095 # | | + stderr - stderr, with trace filtered out
1096 # | | + test-source - portion of testsuite that defines group
1097 # | | + times - timestamps for computing duration
1098 # | | + pass - created if group passed
1099 # | | + xpass - created if group xpassed
1100 # | | + fail - created if group failed
1101 # | | + xfail - created if group xfailed
1102 # | | + skip - created if group skipped
1103 # + at-stop - during a run: end the run if this file exists
1104 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1105 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1106 # | + TESTSUITE.log - summarizes the group results
1107 # | + ... - files created during the group
1108
1109 # The directory the whole suite works in.
1110 # Should be absolute to let the user `cd' at will.
1111 at_suite_dir=$at_dir/$as_me.dir
1112 # The file containing the suite ($at_dir might have changed since earlier).
1113 at_suite_log=$at_dir/$as_me.log
1114 # The directory containing helper files per test group.
1115 at_helper_dir=$at_suite_dir/at-groups
1116 # Stop file: if it exists, do not start new jobs.
1117 at_stop_file=$at_suite_dir/at-stop
1118 # The fifo used for the job dispatcher.
1119 at_job_fifo=$at_suite_dir/at-job-fifo
1120
1121 if $at_clean; then
1122 test -d "$at_suite_dir" &&
1123 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1124 rm -f -r "$at_suite_dir" "$at_suite_log"
1125 exit $?
1126 fi
1127
1128 # Don't take risks: use only absolute directories in PATH.
1129 #
1130 # For stand-alone test suites (ie. atconfig was not found),
1131 # AUTOTEST_PATH is relative to `.'.
1132 #
1133 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1134 # of the package. Then expand it into build/src parts, since users
1135 # may create executables in both places.
1136 AUTOTEST_PATH=`printf "%s\n" "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1137 at_path=
1138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1139 for as_dir in $AUTOTEST_PATH $PATH
1140 do
1141 IFS=$as_save_IFS
1142 case $as_dir in #(((
1143 '') as_dir=./ ;;
1144 */) ;;
1145 *) as_dir=$as_dir/ ;;
1146 esac
1147 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1148 case $as_dir in
1149 [\\/]* | ?:[\\/]* )
1150 as_fn_append at_path "$as_dir"
1151 ;;
1152 * )
1153 if test -z "$at_top_build_prefix"; then
1154 # Stand-alone test suite.
1155 as_fn_append at_path "$as_dir"
1156 else
1157 # Embedded test suite.
1158 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1159 as_fn_append at_path "$at_top_srcdir/$as_dir"
1160 fi
1161 ;;
1162 esac
1163 done
1164 IFS=$as_save_IFS
1165
1166
1167 # Now build and simplify PATH.
1168 #
1169 # There might be directories that don't exist, but don't redirect
1170 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1171 at_new_path=
1172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1173 for as_dir in $at_path
1174 do
1175 IFS=$as_save_IFS
1176 case $as_dir in #(((
1177 '') as_dir=./ ;;
1178 */) ;;
1179 *) as_dir=$as_dir/ ;;
1180 esac
1181 test -d "$as_dir" || continue
1182 case $as_dir in
1183 [\\/]* | ?:[\\/]* ) ;;
1184 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1185 esac
1186 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1187 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1188 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1189 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1190 esac
1191 done
1192 IFS=$as_save_IFS
1193
1194 PATH=$at_new_path
1195 export PATH
1196
1197 # Setting up the FDs.
1198
1199
1200
1201 # 5 is the log file. Not to be overwritten if `-d'.
1202 if $at_debug_p; then
1203 at_suite_log=/dev/null
1204 else
1205 : >"$at_suite_log"
1206 fi
1207 exec 5>>"$at_suite_log"
1208
1209 # Banners and logs.
1210 printf "%s\n" "## ------------------------------ ##
1211 ## GNU Mailutils 3.20 test suite. ##
1212 ## ------------------------------ ##"
1213 {
1214 printf "%s\n" "## ------------------------------ ##
1215 ## GNU Mailutils 3.20 test suite. ##
1216 ## ------------------------------ ##"
1217 echo
1218
1219 printf "%s\n" "$as_me: command line was:"
1220 printf "%s\n" " \$ $0 $at_cli_args"
1221 echo
1222
1223 # If ChangeLog exists, list a few lines in case it might help determining
1224 # the exact version.
1225 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1226 printf "%s\n" "## ---------- ##
1227 ## ChangeLog. ##
1228 ## ---------- ##"
1229 echo
1230 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1231 echo
1232 fi
1233
1234 {
1235 cat <<_ASUNAME
1236 ## --------- ##
1237 ## Platform. ##
1238 ## --------- ##
1239
1240 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1241 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1242 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1243 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1244 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1245
1246 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1247 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1248
1249 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1250 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1251 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1252 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1253 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1254 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1255 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1256
1257 _ASUNAME
1258
1259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1260 for as_dir in $PATH
1261 do
1262 IFS=$as_save_IFS
1263 case $as_dir in #(((
1264 '') as_dir=./ ;;
1265 */) ;;
1266 *) as_dir=$as_dir/ ;;
1267 esac
1268 printf "%s\n" "PATH: $as_dir"
1269 done
1270 IFS=$as_save_IFS
1271
1272 }
1273 echo
1274
1275 # Contents of the config files.
1276 for at_file in atconfig atlocal
1277 do
1278 test -r $at_file || continue
1279 printf "%s\n" "$as_me: $at_file:"
1280 sed 's/^/| /' $at_file
1281 echo
1282 done
1283 } >&5
1284
1285 # This setting is needed on FreeBSD to ensure the LD_LIBRARY_PATH overrides
1286 # the DT_RPATH tag in ELF header. See
1287 # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27510
1288 # for details.
1289 LD_LIBRARY_PATH_RPATH=y
1290 export LD_LIBRARY_PATH_RPATH
1291
1292
1293 ## ------------------------- ##
1294 ## Autotest shell functions. ##
1295 ## ------------------------- ##
1296
1297 # at_fn_banner NUMBER
1298 # -------------------
1299 # Output banner NUMBER, provided the testsuite is running multiple groups and
1300 # this particular banner has not yet been printed.
1301 at_fn_banner ()
1302 {
1303 $at_print_banners || return 0
1304 eval at_banner_text=\$at_banner_text_$1
1305 test "x$at_banner_text" = "x " && return 0
1306 eval "at_banner_text_$1=\" \""
1307 if test -z "$at_banner_text"; then
1308 $at_first || echo
1309 else
1310 printf "%s\n" "$as_nl$at_banner_text$as_nl"
1311 fi
1312 } # at_fn_banner
1313
1314 # at_fn_check_prepare_notrace REASON LINE
1315 # ---------------------------------------
1316 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1317 # command; REASON is the reason for disabling tracing.
1318 at_fn_check_prepare_notrace ()
1319 {
1320 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1321 printf "%s\n" "$2" >"$at_check_line_file"
1322 at_check_trace=: at_check_filter=:
1323 : >"$at_stdout"; : >"$at_stderr"
1324 }
1325
1326 # at_fn_check_prepare_trace LINE
1327 # ------------------------------
1328 # Perform AT_CHECK preparations for the command at LINE for a traceable
1329 # command.
1330 at_fn_check_prepare_trace ()
1331 {
1332 printf "%s\n" "$1" >"$at_check_line_file"
1333 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1334 : >"$at_stdout"; : >"$at_stderr"
1335 }
1336
1337 # at_fn_check_prepare_dynamic COMMAND LINE
1338 # ----------------------------------------
1339 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1340 # preparation function.
1341 at_fn_check_prepare_dynamic ()
1342 {
1343 case $1 in
1344 *$as_nl*)
1345 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1346 *)
1347 at_fn_check_prepare_trace "$2" ;;
1348 esac
1349 }
1350
1351 # at_fn_filter_trace
1352 # ------------------
1353 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1354 # them to stderr.
1355 at_fn_filter_trace ()
1356 {
1357 mv "$at_stderr" "$at_stder1"
1358 grep '^ *+' "$at_stder1" >&2
1359 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1360 }
1361
1362 # at_fn_log_failure FILE-LIST
1363 # ---------------------------
1364 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1365 # with a failure exit code.
1366 at_fn_log_failure ()
1367 {
1368 for file
1369 do printf "%s\n" "$file:"; sed 's/^/> /' "$file"; done
1370 echo 1 > "$at_status_file"
1371 exit 1
1372 }
1373
1374 # at_fn_check_skip EXIT-CODE LINE
1375 # -------------------------------
1376 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1377 # the test group subshell with that same exit code. Use LINE in any report
1378 # about test failure.
1379 at_fn_check_skip ()
1380 {
1381 case $1 in
1382 99) echo 99 > "$at_status_file"; at_failed=:
1383 printf "%s\n" "$2: hard failure"; exit 99;;
1384 77) echo 77 > "$at_status_file"; exit 77;;
1385 esac
1386 }
1387
1388 # at_fn_check_status EXPECTED EXIT-CODE LINE
1389 # ------------------------------------------
1390 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1391 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1392 # exit code; if it is anything else print an error message referring to LINE,
1393 # and fail the test.
1394 at_fn_check_status ()
1395 {
1396 case $2 in
1397 $1 ) ;;
1398 77) echo 77 > "$at_status_file"; exit 77;;
1399 99) echo 99 > "$at_status_file"; at_failed=:
1400 printf "%s\n" "$3: hard failure"; exit 99;;
1401 *) printf "%s\n" "$3: exit code was $2, expected $1"
1402 at_failed=:;;
1403 esac
1404 }
1405
1406 # at_fn_diff_devnull FILE
1407 # -----------------------
1408 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1409 # invocations.
1410 at_fn_diff_devnull ()
1411 {
1412 test -s "$1" || return 0
1413 $at_diff "$at_devnull" "$1"
1414 }
1415
1416 # at_fn_test NUMBER
1417 # -----------------
1418 # Parse out test NUMBER from the tail of this file.
1419 at_fn_test ()
1420 {
1421 eval at_sed=\$at_sed$1
1422 sed "$at_sed" "$at_myself" > "$at_test_source"
1423 }
1424
1425 # at_fn_create_debugging_script
1426 # -----------------------------
1427 # Create the debugging script $at_group_dir/run which will reproduce the
1428 # current test group.
1429 at_fn_create_debugging_script ()
1430 {
1431 {
1432 echo "#! /bin/sh" &&
1433 echo 'test ${ZSH_VERSION+y} && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1434 printf "%s\n" "cd '$at_dir'" &&
1435 printf "%s\n" "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1436 echo 'exit 1'
1437 } >"$at_group_dir/run" &&
1438 chmod +x "$at_group_dir/run"
1439 }
1440
1441 ## -------------------------------- ##
1442 ## End of autotest shell functions. ##
1443 ## -------------------------------- ##
1444 {
1445 printf "%s\n" "## ---------------- ##
1446 ## Tested programs. ##
1447 ## ---------------- ##"
1448 echo
1449 } >&5
1450
1451 # Report what programs are being tested.
1452 for at_program in : `eval echo $at_tested`
1453 do
1454 case $at_program in #(
1455 :) :
1456 continue ;; #(
1457 [\\/]* | ?:[\\/]*) :
1458 at_program_=$at_program ;; #(
1459 *) :
1460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1461 for as_dir in $PATH
1462 do
1463 IFS=$as_save_IFS
1464 case $as_dir in #(((
1465 '') as_dir=./ ;;
1466 */) ;;
1467 *) as_dir=$as_dir/ ;;
1468 esac
1469 test -f "$as_dir$at_program" && break
1470 done
1471 IFS=$as_save_IFS
1472
1473 at_program_=$as_dir$at_program ;;
1474 esac
1475
1476 if test -f "$at_program_"; then
1477 {
1478 printf "%s\n" "$at_srcdir/testsuite.at:32: $at_program_ --version"
1479 "$at_program_" --version </dev/null
1480 echo
1481 } >&5 2>&1
1482 else
1483 as_fn_error $? "cannot find $at_program" "$LINENO" 5
1484 fi
1485 done
1486
1487 {
1488 printf "%s\n" "## ------------------ ##
1489 ## Running the tests. ##
1490 ## ------------------ ##"
1491 } >&5
1492
1493 at_start_date=`date`
1494 at_start_time=`date +%s 2>/dev/null`
1495 printf "%s\n" "$as_me: starting at: $at_start_date" >&5
1496
1497 # Create the master directory if it doesn't already exist.
1498 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1499 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1500
1501 # Can we diff with `/dev/null'? DU 5.0 refuses.
1502 if diff /dev/null /dev/null >/dev/null 2>&1; then
1503 at_devnull=/dev/null
1504 else
1505 at_devnull=$at_suite_dir/devnull
1506 >"$at_devnull"
1507 fi
1508
1509 # Use `diff -u' when possible.
1510 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1511 then
1512 at_diff='diff -u'
1513 else
1514 at_diff=diff
1515 fi
1516
1517 # Get the last needed group.
1518 for at_group in : $at_groups; do :; done
1519
1520 # Extract the start and end lines of each test group at the tail
1521 # of this file
1522 awk '
1523 BEGIN { FS="" }
1524 /^#AT_START_/ {
1525 start = NR
1526 }
1527 /^#AT_STOP_/ {
1528 test = substr ($ 0, 10)
1529 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1530 if (test == "'"$at_group"'") exit
1531 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1532 . "$at_suite_dir/at-source-lines" ||
1533 as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1534 rm -f "$at_suite_dir/at-source-lines"
1535
1536 # Set number of jobs for `-j'; avoid more jobs than test groups.
1537 set X $at_groups; shift; at_max_jobs=$#
1538 if test $at_max_jobs -eq 0; then
1539 at_jobs=1
1540 fi
1541 if test $at_jobs -ne 1 &&
1542 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1543 at_jobs=$at_max_jobs
1544 fi
1545
1546 # If parallel mode, don't output banners, don't split summary lines.
1547 if test $at_jobs -ne 1; then
1548 at_print_banners=false
1549 at_quiet=:
1550 fi
1551
1552 # Set up helper dirs.
1553 rm -rf "$at_helper_dir" &&
1554 mkdir "$at_helper_dir" &&
1555 cd "$at_helper_dir" &&
1556 { test -z "$at_groups" || mkdir $at_groups; } ||
1557 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1558
1559 # Functions for running a test group. We leave the actual
1560 # test group execution outside of a shell function in order
1561 # to avoid hitting zsh 4.x exit status bugs.
1562
1563 # at_fn_group_prepare
1564 # -------------------
1565 # Prepare for running a test group.
1566 at_fn_group_prepare ()
1567 {
1568 # The directory for additional per-group helper files.
1569 at_job_dir=$at_helper_dir/$at_group
1570 # The file containing the location of the last AT_CHECK.
1571 at_check_line_file=$at_job_dir/check-line
1572 # The file containing the exit status of the last command.
1573 at_status_file=$at_job_dir/status
1574 # The files containing the output of the tested commands.
1575 at_stdout=$at_job_dir/stdout
1576 at_stder1=$at_job_dir/stder1
1577 at_stderr=$at_job_dir/stderr
1578 # The file containing the code for a test group.
1579 at_test_source=$at_job_dir/test-source
1580 # The file containing dates.
1581 at_times_file=$at_job_dir/times
1582
1583 # Be sure to come back to the top test directory.
1584 cd "$at_suite_dir"
1585
1586 # Clearly separate the test groups when verbose.
1587 $at_first || $at_verbose echo
1588
1589 at_group_normalized=$at_group
1590
1591 eval 'while :; do
1592 case $at_group_normalized in #(
1593 '"$at_format"'*) break;;
1594 esac
1595 at_group_normalized=0$at_group_normalized
1596 done'
1597
1598
1599 # Create a fresh directory for the next test group, and enter.
1600 # If one already exists, the user may have invoked ./run from
1601 # within that directory; we remove the contents, but not the
1602 # directory itself, so that we aren't pulling the rug out from
1603 # under the shell's notion of the current directory.
1604 at_group_dir=$at_suite_dir/$at_group_normalized
1605 at_group_log=$at_group_dir/$as_me.log
1606 if test -d "$at_group_dir"
1607 then
1608 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1609 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1610 fi ||
1611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1612 printf "%s\n" "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1613 # Be tolerant if the above `rm' was not able to remove the directory.
1614 as_dir="$at_group_dir"; as_fn_mkdir_p
1615
1616 echo 0 > "$at_status_file"
1617
1618 # In verbose mode, append to the log file *and* show on
1619 # the standard output; in quiet mode only write to the log.
1620 if test -z "$at_verbose"; then
1621 at_tee_pipe='tee -a "$at_group_log"'
1622 else
1623 at_tee_pipe='cat >> "$at_group_log"'
1624 fi
1625 }
1626
1627 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1628 # -------------------------------------------------
1629 # Declare the test group ORDINAL, located at LINE with group description DESC,
1630 # and residing under BANNER. Use PAD to align the status column.
1631 at_fn_group_banner ()
1632 {
1633 at_setup_line="$2"
1634 test -n "$5" && at_fn_banner $5
1635 at_desc="$3"
1636 case $1 in
1637 [0-9]) at_desc_line=" $1: ";;
1638 [0-9][0-9]) at_desc_line=" $1: " ;;
1639 *) at_desc_line="$1: " ;;
1640 esac
1641 as_fn_append at_desc_line "$3$4"
1642 $at_quiet printf %s "$at_desc_line"
1643 echo "# -*- compilation -*-" >> "$at_group_log"
1644 }
1645
1646 # at_fn_group_postprocess
1647 # -----------------------
1648 # Perform cleanup after running a test group.
1649 at_fn_group_postprocess ()
1650 {
1651 # Be sure to come back to the suite directory, in particular
1652 # since below we might `rm' the group directory we are in currently.
1653 cd "$at_suite_dir"
1654
1655 if test ! -f "$at_check_line_file"; then
1656 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1657 A failure happened in a test group before any test could be
1658 run. This means that test suite is improperly designed. Please
1659 report this failure to <[email protected]>.
1660 _ATEOF
1661 printf "%s\n" "$at_setup_line" >"$at_check_line_file"
1662 at_status=99
1663 fi
1664 $at_verbose printf %s "$at_group. $at_setup_line: "
1665 printf %s "$at_group. $at_setup_line: " >> "$at_group_log"
1666 case $at_xfail:$at_status in
1667 yes:0)
1668 at_msg="UNEXPECTED PASS"
1669 at_res=xpass
1670 at_errexit=$at_errexit_p
1671 at_color=$at_red
1672 ;;
1673 no:0)
1674 at_msg="ok"
1675 at_res=pass
1676 at_errexit=false
1677 at_color=$at_grn
1678 ;;
1679 *:77)
1680 at_msg='skipped ('`cat "$at_check_line_file"`')'
1681 at_res=skip
1682 at_errexit=false
1683 at_color=$at_blu
1684 ;;
1685 no:* | *:99)
1686 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1687 at_res=fail
1688 at_errexit=$at_errexit_p
1689 at_color=$at_red
1690 ;;
1691 yes:*)
1692 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1693 at_res=xfail
1694 at_errexit=false
1695 at_color=$at_lgn
1696 ;;
1697 esac
1698 echo "$at_res" > "$at_job_dir/$at_res"
1699 # In parallel mode, output the summary line only afterwards.
1700 if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1701 printf "%s\n" "$at_desc_line $at_color$at_msg$at_std"
1702 else
1703 # Make sure there is a separator even with long titles.
1704 printf "%s\n" " $at_color$at_msg$at_std"
1705 fi
1706 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1707 case $at_status in
1708 0|77)
1709 # $at_times_file is only available if the group succeeded.
1710 # We're not including the group log, so the success message
1711 # is written in the global log separately. But we also
1712 # write to the group log in case they're using -d.
1713 if test -f "$at_times_file"; then
1714 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1715 rm -f "$at_times_file"
1716 fi
1717 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1718 printf "%s\n" "$at_log_msg" >&5
1719
1720 # Cleanup the group directory, unless the user wants the files
1721 # or the success was unexpected.
1722 if $at_debug_p || test $at_res = xpass; then
1723 at_fn_create_debugging_script
1724 if test $at_res = xpass && $at_errexit; then
1725 echo stop > "$at_stop_file"
1726 fi
1727 else
1728 if test -d "$at_group_dir"; then
1729 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1730 rm -fr "$at_group_dir"
1731 fi
1732 rm -f "$at_test_source"
1733 fi
1734 ;;
1735 *)
1736 # Upon failure, include the log into the testsuite's global
1737 # log. The failure message is written in the group log. It
1738 # is later included in the global log.
1739 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1740
1741 # Upon failure, keep the group directory for autopsy, and create
1742 # the debugging script. With -e, do not start any further tests.
1743 at_fn_create_debugging_script
1744 if $at_errexit; then
1745 echo stop > "$at_stop_file"
1746 fi
1747 ;;
1748 esac
1749 }
1750
1751
1752 ## ------------ ##
1753 ## Driver loop. ##
1754 ## ------------ ##
1755
1756
1757 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1758 set +b
1759 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1760 else
1761 at_job_control_on=: at_job_control_off=: at_job_group=
1762 fi
1763
1764 for at_signal in 1 2 15; do
1765 trap 'set +x; set +e
1766 $at_job_control_off
1767 at_signal='"$at_signal"'
1768 echo stop > "$at_stop_file"
1769 trap "" $at_signal
1770 at_pgids=
1771 for at_pgid in `jobs -p 2>/dev/null`; do
1772 at_pgids="$at_pgids $at_job_group$at_pgid"
1773 done
1774 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1775 wait
1776 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1777 echo >&2
1778 fi
1779 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1780 set x $at_signame
1781 test 0 -gt 2 && at_signame=$at_signal
1782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1783 printf "%s\n" "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1784 as_fn_arith 128 + $at_signal && exit_status=$as_val
1785 as_fn_exit $exit_status' $at_signal
1786 done
1787
1788 rm -f "$at_stop_file"
1789 at_first=:
1790
1791 if test $at_jobs -ne 1 &&
1792 rm -f "$at_job_fifo" &&
1793 test -n "$at_job_group" &&
1794 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1795 then
1796 # FIFO job dispatcher.
1797
1798 trap 'at_pids=
1799 for at_pid in `jobs -p`; do
1800 at_pids="$at_pids $at_job_group$at_pid"
1801 done
1802 if test -n "$at_pids"; then
1803 at_sig=TSTP
1804 test ${TMOUT+y} && at_sig=STOP
1805 kill -$at_sig $at_pids 2>/dev/null
1806 fi
1807 kill -STOP $$
1808 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1809
1810 echo
1811 # Turn jobs into a list of numbers, starting from 1.
1812 at_joblist=`printf "%s\n" "$at_groups" | sed -n 1,${at_jobs}p`
1813
1814 set X $at_joblist
1815 shift
1816 for at_group in $at_groups; do
1817 $at_job_control_on 2>/dev/null
1818 (
1819 # Start one test group.
1820 $at_job_control_off
1821 if $at_first; then
1822 exec 7>"$at_job_fifo"
1823 else
1824 exec 6<&-
1825 fi
1826 trap 'set +x; set +e
1827 trap "" PIPE
1828 echo stop > "$at_stop_file"
1829 echo >&7
1830 as_fn_exit 141' PIPE
1831 at_fn_group_prepare
1832 if cd "$at_group_dir" &&
1833 at_fn_test $at_group &&
1834 . "$at_test_source"
1835 then :; else
1836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1837 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1838 at_failed=:
1839 fi
1840 at_fn_group_postprocess
1841 echo >&7
1842 ) &
1843 $at_job_control_off
1844 if $at_first; then
1845 at_first=false
1846 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1847 fi
1848 shift # Consume one token.
1849 if test $# -gt 0; then :; else
1850 read at_token <&6 || break
1851 set x $*
1852 fi
1853 test -f "$at_stop_file" && break
1854 done
1855 exec 7>&-
1856 # Read back the remaining ($at_jobs - 1) tokens.
1857 set X $at_joblist
1858 shift
1859 if test $# -gt 0; then
1860 shift
1861 for at_job
1862 do
1863 read at_token
1864 done <&6
1865 fi
1866 exec 6<&-
1867 wait
1868 else
1869 # Run serially, avoid forks and other potential surprises.
1870 for at_group in $at_groups; do
1871 at_fn_group_prepare
1872 if cd "$at_group_dir" &&
1873 at_fn_test $at_group &&
1874 . "$at_test_source"; then :; else
1875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1876 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1877 at_failed=:
1878 fi
1879 at_fn_group_postprocess
1880 test -f "$at_stop_file" && break
1881 at_first=false
1882 done
1883 fi
1884
1885 # Wrap up the test suite with summary statistics.
1886 cd "$at_helper_dir"
1887
1888 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1889 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1890 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1891 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1892 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1893 echo $f; done | sed '/?/d; s,/xpass,,'`
1894 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1895 echo $f; done | sed '/?/d; s,/fail,,'`
1896
1897 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1898 shift; at_group_count=$#
1899 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1900 set X $at_xfail_list; shift; at_xfail_count=$#
1901 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1902 set X $at_skip_list; shift; at_skip_count=$#
1903
1904 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1905 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1906 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1907
1908 # Back to the top directory.
1909 cd "$at_dir"
1910 rm -rf "$at_helper_dir"
1911
1912 # Compute the duration of the suite.
1913 at_stop_date=`date`
1914 at_stop_time=`date +%s 2>/dev/null`
1915 printf "%s\n" "$as_me: ending at: $at_stop_date" >&5
1916 case $at_start_time,$at_stop_time in
1917 [0-9]*,[0-9]*)
1918 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1919 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1920 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1921 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1922 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1923 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1924 printf "%s\n" "$as_me: test suite duration: $at_duration" >&5
1925 ;;
1926 esac
1927
1928 echo
1929 printf "%s\n" "## ------------- ##
1930 ## Test results. ##
1931 ## ------------- ##"
1932 echo
1933 {
1934 echo
1935 printf "%s\n" "## ------------- ##
1936 ## Test results. ##
1937 ## ------------- ##"
1938 echo
1939 } >&5
1940
1941 if test $at_run_count = 1; then
1942 at_result="1 test"
1943 at_were=was
1944 else
1945 at_result="$at_run_count tests"
1946 at_were=were
1947 fi
1948 if $at_errexit_p && test $at_unexpected_count != 0; then
1949 if test $at_xpass_count = 1; then
1950 at_result="$at_result $at_were run, one passed"
1951 else
1952 at_result="$at_result $at_were run, one failed"
1953 fi
1954 at_result="$at_result unexpectedly and inhibited subsequent tests."
1955 at_color=$at_red
1956 else
1957 # Don't you just love exponential explosion of the number of cases?
1958 at_color=$at_red
1959 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1960 # So far, so good.
1961 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1962 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1963
1964 # Some unexpected failures
1965 0:*:0) at_result="$at_result $at_were run,
1966 $at_fail_count failed unexpectedly." ;;
1967
1968 # Some failures, both expected and unexpected
1969 0:*:1) at_result="$at_result $at_were run,
1970 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1971 0:*:*) at_result="$at_result $at_were run,
1972 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1973
1974 # No unexpected failures, but some xpasses
1975 *:0:*) at_result="$at_result $at_were run,
1976 $at_xpass_count passed unexpectedly." ;;
1977
1978 # No expected failures, but failures and xpasses
1979 *:1:0) at_result="$at_result $at_were run,
1980 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1981 *:*:0) at_result="$at_result $at_were run,
1982 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1983
1984 # All of them.
1985 *:*:1) at_result="$at_result $at_were run,
1986 $at_xpass_count passed unexpectedly,
1987 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1988 *:*:*) at_result="$at_result $at_were run,
1989 $at_xpass_count passed unexpectedly,
1990 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1991 esac
1992
1993 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1994 at_result="All $at_result"
1995 fi
1996 fi
1997
1998 # Now put skips in the mix.
1999 case $at_skip_count in
2000 0) ;;
2001 1) at_result="$at_result
2002 1 test was skipped." ;;
2003 *) at_result="$at_result
2004 $at_skip_count tests were skipped." ;;
2005 esac
2006
2007 if test $at_unexpected_count = 0; then
2008 echo "$at_color$at_result$at_std"
2009 echo "$at_result" >&5
2010 else
2011 echo "${at_color}ERROR: $at_result$at_std" >&2
2012 echo "ERROR: $at_result" >&5
2013 {
2014 echo
2015 printf "%s\n" "## ------------------------ ##
2016 ## Summary of the failures. ##
2017 ## ------------------------ ##"
2018
2019 # Summary of failed and skipped tests.
2020 if test $at_fail_count != 0; then
2021 echo "Failed tests:"
2022 $SHELL "$at_myself" $at_fail_list --list
2023 echo
2024 fi
2025 if test $at_skip_count != 0; then
2026 echo "Skipped tests:"
2027 $SHELL "$at_myself" $at_skip_list --list
2028 echo
2029 fi
2030 if test $at_xpass_count != 0; then
2031 echo "Unexpected passes:"
2032 $SHELL "$at_myself" $at_xpass_list --list
2033 echo
2034 fi
2035 if test $at_fail_count != 0; then
2036 printf "%s\n" "## ---------------------- ##
2037 ## Detailed failed tests. ##
2038 ## ---------------------- ##"
2039 echo
2040 for at_group in $at_fail_list
2041 do
2042 at_group_normalized=$at_group
2043
2044 eval 'while :; do
2045 case $at_group_normalized in #(
2046 '"$at_format"'*) break;;
2047 esac
2048 at_group_normalized=0$at_group_normalized
2049 done'
2050
2051 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2052 echo
2053 done
2054 echo
2055 fi
2056 if test -n "$at_top_srcdir"; then
2057 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2058 ## ${at_top_build_prefix}config.log ##
2059 _ASBOX
2060 sed 's/^/| /' ${at_top_build_prefix}config.log
2061 echo
2062 fi
2063 } >&5
2064
2065 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2066 ## $as_me.log was created. ##
2067 _ASBOX
2068
2069 echo
2070 if $at_debug_p; then
2071 at_msg='per-test log files'
2072 else
2073 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2074 fi
2075 at_msg1a=${at_xpass_list:+', '}
2076 at_msg1=$at_fail_list${at_fail_list:+" failed$at_msg1a"}
2077 at_msg2=$at_xpass_list${at_xpass_list:+" passed unexpectedly"}
2078
2079 printf "%s\n" "Please send $at_msg and all information you think might help:
2080
2081 To: <[email protected]>
2082 Subject: [GNU Mailutils 3.20] $as_me: $at_msg1$at_msg2
2083
2084 You may investigate any problem if you feel able to do so, in which
2085 case the test suite provides a good starting point. Its output may
2086 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2087 "
2088 exit 1
2089 fi
2090
2091 exit 0
2092
2093 ## ------------- ##
2094 ## Actual tests. ##
2095 ## ------------- ##
2096 #AT_START_1
2097 at_fn_group_banner 1 'const.at:7' \
2098 "Constants" " "
2099 at_xfail=no
2100 (
2101 printf "%s\n" "1. $at_setup_line: testing $at_desc ..."
2102 $at_traceon
2103
2104
2105 cat >expout <<'_ATEOF'
2106 mailutils
2107 3.20
2108 GNU Mailutils 3.20
2109 [email protected]
2110 0
2111 _ATEOF
2112
2113
2114 cat >input.scm <<'_ATEOF'
2115 (use-modules ((mailutils mailutils))
2116 ((mailutils ancilla)))
2117 (mu-register-format "mbox")
2118
2119 (display mu-package)(newline)
2120 (display mu-version)(newline)
2121 (display mu-package-string)(newline)
2122 (display mu-bugreport)(newline)
2123 (display mu-debug)(newline)
2124
2125 _ATEOF
2126
2127
2128 { set +x
2129 printf "%s\n" "$at_srcdir/const.at:17: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2130 rc=\$?
2131 grep -v '^;;;' err>&2
2132 exit \$rc"
2133 at_fn_check_prepare_notrace 'an embedded newline' "const.at:17"
2134 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2135 rc=$?
2136 grep -v '^;;;' err>&2
2137 exit $rc
2138 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2139 at_status=$? at_failed=false
2140 $at_check_filter
2141 at_fn_diff_devnull "$at_stderr" || at_failed=:
2142 $at_diff expout "$at_stdout" || at_failed=:
2143 at_fn_check_status 0 $at_status "$at_srcdir/const.at:17"
2144 $at_failed && at_fn_log_failure
2145 $at_traceon; }
2146
2147 set +x
2148 $at_times_p && times >"$at_times_file"
2149 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2150 read at_status <"$at_status_file"
2151 #AT_STOP_1
2152 #AT_START_2
2153 at_fn_group_banner 2 'address-count.at:6' \
2154 "mu-address-get-count" " " 1
2155 at_xfail=no
2156 (
2157 printf "%s\n" "2. $at_setup_line: testing $at_desc ..."
2158 $at_traceon
2159
2160
2161 cat >input.scm <<'_ATEOF'
2162 (use-modules ((mailutils mailutils))
2163 ((mailutils ancilla)))
2164 (mu-register-format "mbox")
2165 (display (mu-address-get-count "[email protected],[email protected]"))
2166 _ATEOF
2167
2168
2169 { set +x
2170 printf "%s\n" "$at_srcdir/address-count.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2171 rc=\$?
2172 grep -v '^;;;' err>&2
2173 exit \$rc"
2174 at_fn_check_prepare_notrace 'an embedded newline' "address-count.at:8"
2175 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2176 rc=$?
2177 grep -v '^;;;' err>&2
2178 exit $rc
2179 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2180 at_status=$? at_failed=false
2181 $at_check_filter
2182 at_fn_diff_devnull "$at_stderr" || at_failed=:
2183 echo >>"$at_stdout"; printf "%s\n" "2" | \
2184 $at_diff - "$at_stdout" || at_failed=:
2185 at_fn_check_status 0 $at_status "$at_srcdir/address-count.at:8"
2186 $at_failed && at_fn_log_failure
2187 $at_traceon; }
2188
2189 set +x
2190 $at_times_p && times >"$at_times_file"
2191 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2192 read at_status <"$at_status_file"
2193 #AT_STOP_2
2194 #AT_START_3
2195 at_fn_group_banner 3 'address-domain.at:6' \
2196 "mu-address-get-domain" " " 1
2197 at_xfail=no
2198 (
2199 printf "%s\n" "3. $at_setup_line: testing $at_desc ..."
2200 $at_traceon
2201
2202
2203 cat >input.scm <<'_ATEOF'
2204 (use-modules ((mailutils mailutils))
2205 ((mailutils ancilla)))
2206 (mu-register-format "mbox")
2207 (display (mu-address-get-domain "[email protected],[email protected]"))
2208 _ATEOF
2209
2210
2211 { set +x
2212 printf "%s\n" "$at_srcdir/address-domain.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2213 rc=\$?
2214 grep -v '^;;;' err>&2
2215 exit \$rc"
2216 at_fn_check_prepare_notrace 'an embedded newline' "address-domain.at:8"
2217 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2218 rc=$?
2219 grep -v '^;;;' err>&2
2220 exit $rc
2221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2222 at_status=$? at_failed=false
2223 $at_check_filter
2224 at_fn_diff_devnull "$at_stderr" || at_failed=:
2225 echo >>"$at_stdout"; printf "%s\n" "example.org" | \
2226 $at_diff - "$at_stdout" || at_failed=:
2227 at_fn_check_status 0 $at_status "$at_srcdir/address-domain.at:8"
2228 $at_failed && at_fn_log_failure
2229 $at_traceon; }
2230
2231 set +x
2232 $at_times_p && times >"$at_times_file"
2233 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2234 read at_status <"$at_status_file"
2235 #AT_STOP_3
2236 #AT_START_4
2237 at_fn_group_banner 4 'address-domain.at:13' \
2238 "mu-address-get-domain with arg" " " 1
2239 at_xfail=no
2240 (
2241 printf "%s\n" "4. $at_setup_line: testing $at_desc ..."
2242 $at_traceon
2243
2244
2245 cat >input.scm <<'_ATEOF'
2246 (use-modules ((mailutils mailutils))
2247 ((mailutils ancilla)))
2248 (mu-register-format "mbox")
2249 (display (mu-address-get-domain "[email protected],[email protected]" 2))
2250 _ATEOF
2251
2252
2253 { set +x
2254 printf "%s\n" "$at_srcdir/address-domain.at:15: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2255 rc=\$?
2256 grep -v '^;;;' err>&2
2257 exit \$rc"
2258 at_fn_check_prepare_notrace 'an embedded newline' "address-domain.at:15"
2259 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2260 rc=$?
2261 grep -v '^;;;' err>&2
2262 exit $rc
2263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2264 at_status=$? at_failed=false
2265 $at_check_filter
2266 at_fn_diff_devnull "$at_stderr" || at_failed=:
2267 echo >>"$at_stdout"; printf "%s\n" "example.com" | \
2268 $at_diff - "$at_stdout" || at_failed=:
2269 at_fn_check_status 0 $at_status "$at_srcdir/address-domain.at:15"
2270 $at_failed && at_fn_log_failure
2271 $at_traceon; }
2272
2273 set +x
2274 $at_times_p && times >"$at_times_file"
2275 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2276 read at_status <"$at_status_file"
2277 #AT_STOP_4
2278 #AT_START_5
2279 at_fn_group_banner 5 'address-local.at:6' \
2280 "mu-address-get-local" " " 1
2281 at_xfail=no
2282 (
2283 printf "%s\n" "5. $at_setup_line: testing $at_desc ..."
2284 $at_traceon
2285
2286
2287 cat >input.scm <<'_ATEOF'
2288 (use-modules ((mailutils mailutils))
2289 ((mailutils ancilla)))
2290 (mu-register-format "mbox")
2291 (display (mu-address-get-local "[email protected]"))
2292 _ATEOF
2293
2294
2295 { set +x
2296 printf "%s\n" "$at_srcdir/address-local.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2297 rc=\$?
2298 grep -v '^;;;' err>&2
2299 exit \$rc"
2300 at_fn_check_prepare_notrace 'an embedded newline' "address-local.at:8"
2301 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2302 rc=$?
2303 grep -v '^;;;' err>&2
2304 exit $rc
2305 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2306 at_status=$? at_failed=false
2307 $at_check_filter
2308 at_fn_diff_devnull "$at_stderr" || at_failed=:
2309 echo >>"$at_stdout"; printf "%s\n" "user" | \
2310 $at_diff - "$at_stdout" || at_failed=:
2311 at_fn_check_status 0 $at_status "$at_srcdir/address-local.at:8"
2312 $at_failed && at_fn_log_failure
2313 $at_traceon; }
2314
2315 set +x
2316 $at_times_p && times >"$at_times_file"
2317 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2318 read at_status <"$at_status_file"
2319 #AT_STOP_5
2320 #AT_START_6
2321 at_fn_group_banner 6 'address-local.at:13' \
2322 "mu-address-get-local with arg" " " 1
2323 at_xfail=no
2324 (
2325 printf "%s\n" "6. $at_setup_line: testing $at_desc ..."
2326 $at_traceon
2327
2328
2329 cat >input.scm <<'_ATEOF'
2330 (use-modules ((mailutils mailutils))
2331 ((mailutils ancilla)))
2332 (mu-register-format "mbox")
2333 (display (mu-address-get-local "[email protected],[email protected]" 2))
2334 _ATEOF
2335
2336
2337 { set +x
2338 printf "%s\n" "$at_srcdir/address-local.at:15: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2339 rc=\$?
2340 grep -v '^;;;' err>&2
2341 exit \$rc"
2342 at_fn_check_prepare_notrace 'an embedded newline' "address-local.at:15"
2343 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2344 rc=$?
2345 grep -v '^;;;' err>&2
2346 exit $rc
2347 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2348 at_status=$? at_failed=false
2349 $at_check_filter
2350 at_fn_diff_devnull "$at_stderr" || at_failed=:
2351 echo >>"$at_stdout"; printf "%s\n" "root" | \
2352 $at_diff - "$at_stdout" || at_failed=:
2353 at_fn_check_status 0 $at_status "$at_srcdir/address-local.at:15"
2354 $at_failed && at_fn_log_failure
2355 $at_traceon; }
2356
2357 set +x
2358 $at_times_p && times >"$at_times_file"
2359 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2360 read at_status <"$at_status_file"
2361 #AT_STOP_6
2362 #AT_START_7
2363 at_fn_group_banner 7 'address-email.at:6' \
2364 "mu-address-get-email" " " 1
2365 at_xfail=no
2366 (
2367 printf "%s\n" "7. $at_setup_line: testing $at_desc ..."
2368 $at_traceon
2369
2370
2371 cat >input.scm <<'_ATEOF'
2372 (use-modules ((mailutils mailutils))
2373 ((mailutils ancilla)))
2374 (mu-register-format "mbox")
2375 (display (mu-address-get-email "Leopold Bloom <[email protected]>"))
2376 _ATEOF
2377
2378
2379 { set +x
2380 printf "%s\n" "$at_srcdir/address-email.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2381 rc=\$?
2382 grep -v '^;;;' err>&2
2383 exit \$rc"
2384 at_fn_check_prepare_notrace 'an embedded newline' "address-email.at:8"
2385 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2386 rc=$?
2387 grep -v '^;;;' err>&2
2388 exit $rc
2389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2390 at_status=$? at_failed=false
2391 $at_check_filter
2392 at_fn_diff_devnull "$at_stderr" || at_failed=:
2393 echo >>"$at_stdout"; printf "%s\n" "[email protected]" | \
2394 $at_diff - "$at_stdout" || at_failed=:
2395 at_fn_check_status 0 $at_status "$at_srcdir/address-email.at:8"
2396 $at_failed && at_fn_log_failure
2397 $at_traceon; }
2398
2399 set +x
2400 $at_times_p && times >"$at_times_file"
2401 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2402 read at_status <"$at_status_file"
2403 #AT_STOP_7
2404 #AT_START_8
2405 at_fn_group_banner 8 'address-personal.at:6' \
2406 "mu-address-get-personal" " " 1
2407 at_xfail=no
2408 (
2409 printf "%s\n" "8. $at_setup_line: testing $at_desc ..."
2410 $at_traceon
2411
2412
2413 cat >input.scm <<'_ATEOF'
2414 (use-modules ((mailutils mailutils))
2415 ((mailutils ancilla)))
2416 (mu-register-format "mbox")
2417 (display (mu-address-get-personal "Leopold Bloom <[email protected]>"))
2418 _ATEOF
2419
2420
2421 { set +x
2422 printf "%s\n" "$at_srcdir/address-personal.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2423 rc=\$?
2424 grep -v '^;;;' err>&2
2425 exit \$rc"
2426 at_fn_check_prepare_notrace 'an embedded newline' "address-personal.at:8"
2427 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2428 rc=$?
2429 grep -v '^;;;' err>&2
2430 exit $rc
2431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2432 at_status=$? at_failed=false
2433 $at_check_filter
2434 at_fn_diff_devnull "$at_stderr" || at_failed=:
2435 echo >>"$at_stdout"; printf "%s\n" "Leopold Bloom" | \
2436 $at_diff - "$at_stdout" || at_failed=:
2437 at_fn_check_status 0 $at_status "$at_srcdir/address-personal.at:8"
2438 $at_failed && at_fn_log_failure
2439 $at_traceon; }
2440
2441 set +x
2442 $at_times_p && times >"$at_times_file"
2443 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2444 read at_status <"$at_status_file"
2445 #AT_STOP_8
2446 #AT_START_9
2447 at_fn_group_banner 9 'message-print.at:7' \
2448 "message print" " " 2
2449 at_xfail=no
2450 (
2451 printf "%s\n" "9. $at_setup_line: testing $at_desc ..."
2452 $at_traceon
2453
2454
2455 cat >input.scm <<'_ATEOF'
2456 (use-modules ((mailutils mailutils))
2457 ((mailutils ancilla)))
2458 (mu-register-format "mbox")
2459 (display (test-message))
2460 _ATEOF
2461
2462
2463 { set +x
2464 printf "%s\n" "$at_srcdir/message-print.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2465 rc=\$?
2466 grep -v '^;;;' err>&2
2467 exit \$rc"
2468 at_fn_check_prepare_notrace 'an embedded newline' "message-print.at:9"
2469 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2470 rc=$?
2471 grep -v '^;;;' err>&2
2472 exit $rc
2473 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2474 at_status=$? at_failed=false
2475 $at_check_filter
2476 at_fn_diff_devnull "$at_stderr" || at_failed=:
2477 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539>" | \
2478 $at_diff - "$at_stdout" || at_failed=:
2479 at_fn_check_status 0 $at_status "$at_srcdir/message-print.at:9"
2480 $at_failed && at_fn_log_failure
2481 $at_traceon; }
2482
2483 set +x
2484 $at_times_p && times >"$at_times_file"
2485 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2486 read at_status <"$at_status_file"
2487 #AT_STOP_9
2488 #AT_START_10
2489 at_fn_group_banner 10 'message-get-size.at:7' \
2490 "mu-message-get-size" " " 2
2491 at_xfail=no
2492 (
2493 printf "%s\n" "10. $at_setup_line: testing $at_desc ..."
2494 $at_traceon
2495
2496
2497 cat >input.scm <<'_ATEOF'
2498 (use-modules ((mailutils mailutils))
2499 ((mailutils ancilla)))
2500 (mu-register-format "mbox")
2501 (display (mu-message-get-size (test-message)))
2502 _ATEOF
2503
2504
2505 { set +x
2506 printf "%s\n" "$at_srcdir/message-get-size.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2507 rc=\$?
2508 grep -v '^;;;' err>&2
2509 exit \$rc"
2510 at_fn_check_prepare_notrace 'an embedded newline' "message-get-size.at:9"
2511 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2512 rc=$?
2513 grep -v '^;;;' err>&2
2514 exit $rc
2515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2516 at_status=$? at_failed=false
2517 $at_check_filter
2518 at_fn_diff_devnull "$at_stderr" || at_failed=:
2519 echo >>"$at_stdout"; printf "%s\n" "539" | \
2520 $at_diff - "$at_stdout" || at_failed=:
2521 at_fn_check_status 0 $at_status "$at_srcdir/message-get-size.at:9"
2522 $at_failed && at_fn_log_failure
2523 $at_traceon; }
2524
2525 set +x
2526 $at_times_p && times >"$at_times_file"
2527 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2528 read at_status <"$at_status_file"
2529 #AT_STOP_10
2530 #AT_START_11
2531 at_fn_group_banner 11 'message-get-lines.at:7' \
2532 "mu-message-get-lines" " " 2
2533 at_xfail=no
2534 (
2535 printf "%s\n" "11. $at_setup_line: testing $at_desc ..."
2536 $at_traceon
2537
2538
2539 cat >input.scm <<'_ATEOF'
2540 (use-modules ((mailutils mailutils))
2541 ((mailutils ancilla)))
2542 (mu-register-format "mbox")
2543 (display (mu-message-get-lines (test-message)))
2544 _ATEOF
2545
2546
2547 { set +x
2548 printf "%s\n" "$at_srcdir/message-get-lines.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2549 rc=\$?
2550 grep -v '^;;;' err>&2
2551 exit \$rc"
2552 at_fn_check_prepare_notrace 'an embedded newline' "message-get-lines.at:9"
2553 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2554 rc=$?
2555 grep -v '^;;;' err>&2
2556 exit $rc
2557 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2558 at_status=$? at_failed=false
2559 $at_check_filter
2560 at_fn_diff_devnull "$at_stderr" || at_failed=:
2561 echo >>"$at_stdout"; printf "%s\n" "10" | \
2562 $at_diff - "$at_stdout" || at_failed=:
2563 at_fn_check_status 0 $at_status "$at_srcdir/message-get-lines.at:9"
2564 $at_failed && at_fn_log_failure
2565 $at_traceon; }
2566
2567 set +x
2568 $at_times_p && times >"$at_times_file"
2569 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2570 read at_status <"$at_status_file"
2571 #AT_STOP_11
2572 #AT_START_12
2573 at_fn_group_banner 12 'message-get-envelope.at:6' \
2574 "message-get-envelope" " " 2
2575 at_xfail=no
2576 (
2577 printf "%s\n" "12. $at_setup_line: testing $at_desc ..."
2578 $at_traceon
2579
2580
2581 cat >input.scm <<'_ATEOF'
2582 (use-modules ((mailutils mailutils))
2583 ((mailutils ancilla)))
2584 (mu-register-format "mbox")
2585
2586 (display (mu-message-get-envelope (test-message)))
2587 _ATEOF
2588
2589
2590 { set +x
2591 printf "%s\n" "$at_srcdir/message-get-envelope.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2592 rc=\$?
2593 grep -v '^;;;' err>&2
2594 exit \$rc"
2595 at_fn_check_prepare_notrace 'an embedded newline' "message-get-envelope.at:8"
2596 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2597 rc=$?
2598 grep -v '^;;;' err>&2
2599 exit $rc
2600 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2601 at_status=$? at_failed=false
2602 $at_check_filter
2603 at_fn_diff_devnull "$at_stderr" || at_failed=:
2604 echo >>"$at_stdout"; printf "%s\n" "[email protected] Fri Jun 8 14:30:40 2018" | \
2605 $at_diff - "$at_stdout" || at_failed=:
2606 at_fn_check_status 0 $at_status "$at_srcdir/message-get-envelope.at:8"
2607 $at_failed && at_fn_log_failure
2608 $at_traceon; }
2609
2610 set +x
2611 $at_times_p && times >"$at_times_file"
2612 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2613 read at_status <"$at_status_file"
2614 #AT_STOP_12
2615 #AT_START_13
2616 at_fn_group_banner 13 'message-get-sender.at:6' \
2617 "message-get-sender" " " 2
2618 at_xfail=no
2619 (
2620 printf "%s\n" "13. $at_setup_line: testing $at_desc ..."
2621 $at_traceon
2622
2623
2624 cat >input.scm <<'_ATEOF'
2625 (use-modules ((mailutils mailutils))
2626 ((mailutils ancilla)))
2627 (mu-register-format "mbox")
2628
2629 (display (mu-message-get-sender (test-message)))
2630 _ATEOF
2631
2632
2633 { set +x
2634 printf "%s\n" "$at_srcdir/message-get-sender.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2635 rc=\$?
2636 grep -v '^;;;' err>&2
2637 exit \$rc"
2638 at_fn_check_prepare_notrace 'an embedded newline' "message-get-sender.at:8"
2639 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2640 rc=$?
2641 grep -v '^;;;' err>&2
2642 exit $rc
2643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2644 at_status=$? at_failed=false
2645 $at_check_filter
2646 at_fn_diff_devnull "$at_stderr" || at_failed=:
2647 echo >>"$at_stdout"; printf "%s\n" "[email protected]" | \
2648 $at_diff - "$at_stdout" || at_failed=:
2649 at_fn_check_status 0 $at_status "$at_srcdir/message-get-sender.at:8"
2650 $at_failed && at_fn_log_failure
2651 $at_traceon; }
2652
2653 set +x
2654 $at_times_p && times >"$at_times_file"
2655 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2656 read at_status <"$at_status_file"
2657 #AT_STOP_13
2658 #AT_START_14
2659 at_fn_group_banner 14 'message-get-envelope-date.at:6' \
2660 "message-get-envelope-date" " " 2
2661 at_xfail=no
2662 (
2663 printf "%s\n" "14. $at_setup_line: testing $at_desc ..."
2664 $at_traceon
2665
2666
2667 cat >input.scm <<'_ATEOF'
2668 (use-modules ((mailutils mailutils))
2669 ((mailutils ancilla)))
2670 (mu-register-format "mbox")
2671
2672 (display (mu-message-get-envelope-date (test-message)))
2673 _ATEOF
2674
2675
2676 { set +x
2677 printf "%s\n" "$at_srcdir/message-get-envelope-date.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2678 rc=\$?
2679 grep -v '^;;;' err>&2
2680 exit \$rc"
2681 at_fn_check_prepare_notrace 'an embedded newline' "message-get-envelope-date.at:8"
2682 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2683 rc=$?
2684 grep -v '^;;;' err>&2
2685 exit $rc
2686 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2687 at_status=$? at_failed=false
2688 $at_check_filter
2689 at_fn_diff_devnull "$at_stderr" || at_failed=:
2690 echo >>"$at_stdout"; printf "%s\n" "#(40 30 14 8 5 118 5 158 -1 0 UTC)" | \
2691 $at_diff - "$at_stdout" || at_failed=:
2692 at_fn_check_status 0 $at_status "$at_srcdir/message-get-envelope-date.at:8"
2693 $at_failed && at_fn_log_failure
2694 $at_traceon; }
2695
2696 set +x
2697 $at_times_p && times >"$at_times_file"
2698 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2699 read at_status <"$at_status_file"
2700 #AT_STOP_14
2701 #AT_START_15
2702 at_fn_group_banner 15 'message-get-header.at:6' \
2703 "message-get-header" " " 2
2704 at_xfail=no
2705 (
2706 printf "%s\n" "15. $at_setup_line: testing $at_desc ..."
2707 $at_traceon
2708
2709
2710 cat >input.scm <<'_ATEOF'
2711 (use-modules ((mailutils mailutils))
2712 ((mailutils ancilla)))
2713 (mu-register-format "mbox")
2714
2715 (let ((msg (test-message)))
2716 (display (mu-message-get-header msg "From"))
2717 (newline)
2718 (display (mu-message-get-header msg "Nonexistent"))
2719 (newline))
2720 _ATEOF
2721
2722
2723 { set +x
2724 printf "%s\n" "$at_srcdir/message-get-header.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2725 rc=\$?
2726 grep -v '^;;;' err>&2
2727 exit \$rc"
2728 at_fn_check_prepare_notrace 'an embedded newline' "message-get-header.at:8"
2729 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2730 rc=$?
2731 grep -v '^;;;' err>&2
2732 exit $rc
2733 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2734 at_status=$? at_failed=false
2735 $at_check_filter
2736 at_fn_diff_devnull "$at_stderr" || at_failed=:
2737 echo >>"$at_stdout"; printf "%s\n" "[email protected]
2738 #f
2739 " | \
2740 $at_diff - "$at_stdout" || at_failed=:
2741 at_fn_check_status 0 $at_status "$at_srcdir/message-get-header.at:8"
2742 $at_failed && at_fn_log_failure
2743 $at_traceon; }
2744
2745 set +x
2746 $at_times_p && times >"$at_times_file"
2747 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2748 read at_status <"$at_status_file"
2749 #AT_STOP_15
2750 #AT_START_16
2751 at_fn_group_banner 16 'message-get-header-fields.at:6' \
2752 "mu-message-get-header-fields" " " 2
2753 at_xfail=no
2754 (
2755 printf "%s\n" "16. $at_setup_line: testing $at_desc ..."
2756 $at_traceon
2757
2758
2759 cat >input.scm <<'_ATEOF'
2760 (use-modules ((mailutils mailutils))
2761 ((mailutils ancilla)))
2762 (mu-register-format "mbox")
2763 (display (sort-headers (mu-message-get-header-fields (test-message))))
2764 _ATEOF
2765
2766
2767 { set +x
2768 printf "%s\n" "$at_srcdir/message-get-header-fields.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2769 rc=\$?
2770 grep -v '^;;;' err>&2
2771 exit \$rc"
2772 at_fn_check_prepare_notrace 'an embedded newline' "message-get-header-fields.at:8"
2773 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2774 rc=$?
2775 grep -v '^;;;' err>&2
2776 exit $rc
2777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2778 at_status=$? at_failed=false
2779 $at_check_filter
2780 at_fn_diff_devnull "$at_stderr" || at_failed=:
2781 echo >>"$at_stdout"; printf "%s\n" "((From . [email protected]) (Subject . De omnibus rebus et quibusdam aliis) (To . [email protected]))" | \
2782 $at_diff - "$at_stdout" || at_failed=:
2783 at_fn_check_status 0 $at_status "$at_srcdir/message-get-header-fields.at:8"
2784 $at_failed && at_fn_log_failure
2785 $at_traceon; }
2786
2787 cat >input.scm <<'_ATEOF'
2788 (use-modules ((mailutils mailutils))
2789 ((mailutils ancilla)))
2790 (mu-register-format "mbox")
2791
2792 (display (sort-headers (mu-message-get-header-fields (test-message) '("from" "sender"))))
2793 _ATEOF
2794
2795
2796 { set +x
2797 printf "%s\n" "$at_srcdir/message-get-header-fields.at:10: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2798 rc=\$?
2799 grep -v '^;;;' err>&2
2800 exit \$rc"
2801 at_fn_check_prepare_notrace 'an embedded newline' "message-get-header-fields.at:10"
2802 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2803 rc=$?
2804 grep -v '^;;;' err>&2
2805 exit $rc
2806 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2807 at_status=$? at_failed=false
2808 $at_check_filter
2809 at_fn_diff_devnull "$at_stderr" || at_failed=:
2810 echo >>"$at_stdout"; printf "%s\n" "((From . [email protected]))" | \
2811 $at_diff - "$at_stdout" || at_failed=:
2812 at_fn_check_status 0 $at_status "$at_srcdir/message-get-header-fields.at:10"
2813 $at_failed && at_fn_log_failure
2814 $at_traceon; }
2815
2816 set +x
2817 $at_times_p && times >"$at_times_file"
2818 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2819 read at_status <"$at_status_file"
2820 #AT_STOP_16
2821 #AT_START_17
2822 at_fn_group_banner 17 'message-port-read-1.at:7' \
2823 "message port (body)" " " 2
2824 at_xfail=no
2825 (
2826 printf "%s\n" "17. $at_setup_line: testing $at_desc ..."
2827 $at_traceon
2828
2829
2830 cat >input.scm <<'_ATEOF'
2831 (use-modules ((mailutils mailutils))
2832 ((mailutils ancilla)))
2833 (mu-register-format "mbox")
2834
2835 (use-modules ((ice-9 binary-ports)))
2836
2837 (let ((msg (test-message)))
2838 (let ((port (mu-message-get-port msg "r")))
2839 (do ((c (get-u8 port) (get-u8 port)))
2840 ((eof-object? c))
2841 (put-u8 (current-output-port) c))
2842 (close port)))
2843 _ATEOF
2844
2845
2846 { set +x
2847 printf "%s\n" "$at_srcdir/message-port-read-1.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2848 rc=\$?
2849 grep -v '^;;;' err>&2
2850 exit \$rc"
2851 at_fn_check_prepare_notrace 'an embedded newline' "message-port-read-1.at:9"
2852 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2853 rc=$?
2854 grep -v '^;;;' err>&2
2855 exit $rc
2856 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2857 at_status=$? at_failed=false
2858 $at_check_filter
2859 at_fn_diff_devnull "$at_stderr" || at_failed=:
2860 echo >>"$at_stdout"; printf "%s\n" "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
2861 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
2862 quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
2863 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
2864 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
2865 non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
2866 " | \
2867 $at_diff - "$at_stdout" || at_failed=:
2868 at_fn_check_status 0 $at_status "$at_srcdir/message-port-read-1.at:9"
2869 $at_failed && at_fn_log_failure
2870 $at_traceon; }
2871
2872 set +x
2873 $at_times_p && times >"$at_times_file"
2874 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2875 read at_status <"$at_status_file"
2876 #AT_STOP_17
2877 #AT_START_18
2878 at_fn_group_banner 18 'message-port-read-2.at:7' \
2879 "message port (all)" " " 2
2880 at_xfail=no
2881 (
2882 printf "%s\n" "18. $at_setup_line: testing $at_desc ..."
2883 $at_traceon
2884
2885
2886 cat >input.scm <<'_ATEOF'
2887 (use-modules ((mailutils mailutils))
2888 ((mailutils ancilla)))
2889 (mu-register-format "mbox")
2890
2891 (use-modules ((ice-9 binary-ports)))
2892
2893 (let ((msg (test-message)))
2894 (let ((port (mu-message-get-port msg "r" #t)))
2895 (do ((c (get-u8 port) (get-u8 port)))
2896 ((eof-object? c))
2897 (put-u8 (current-output-port) c))
2898 (close port)))
2899 _ATEOF
2900
2901
2902 { set +x
2903 printf "%s\n" "$at_srcdir/message-port-read-2.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2904 rc=\$?
2905 grep -v '^;;;' err>&2
2906 exit \$rc"
2907 at_fn_check_prepare_notrace 'an embedded newline' "message-port-read-2.at:9"
2908 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2909 rc=$?
2910 grep -v '^;;;' err>&2
2911 exit $rc
2912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2913 at_status=$? at_failed=false
2914 $at_check_filter
2915 at_fn_diff_devnull "$at_stderr" || at_failed=:
2916 echo >>"$at_stdout"; printf "%s\n" "From: [email protected]
2917 To: [email protected]
2918 Subject: De omnibus rebus et quibusdam aliis
2919
2920 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
2921 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
2922 quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
2923 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
2924 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
2925 non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
2926 " | \
2927 $at_diff - "$at_stdout" || at_failed=:
2928 at_fn_check_status 0 $at_status "$at_srcdir/message-port-read-2.at:9"
2929 $at_failed && at_fn_log_failure
2930 $at_traceon; }
2931
2932 set +x
2933 $at_times_p && times >"$at_times_file"
2934 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2935 read at_status <"$at_status_file"
2936 #AT_STOP_18
2937 #AT_START_19
2938 at_fn_group_banner 19 'message-multipart.at:7' \
2939 "mu-message-multipart?" " " 2
2940 at_xfail=no
2941 (
2942 printf "%s\n" "19. $at_setup_line: testing $at_desc ..."
2943 $at_traceon
2944
2945
2946
2947 cat >input.scm <<'_ATEOF'
2948 (use-modules ((mailutils mailutils))
2949 ((mailutils ancilla)))
2950 (mu-register-format "mbox")
2951
2952 (display (mu-message-multipart? (test-message)))
2953 (display (mu-message-multipart? (file->message "mbox")))
2954 _ATEOF
2955
2956
2957
2958
2959
2960 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
2961 if test -e mbox/mime.msg; then
2962
2963 # First, set all modes to +w
2964 find mbox/mime.msg | xargs chmod +w
2965 # Then, remove executable bit from regular files
2966 find mbox/mime.msg -type f | xargs chmod -x
2967
2968 else
2969
2970 # First, set all modes to +w
2971 find mbox | xargs chmod +w
2972 # Then, remove executable bit from regular files
2973 find mbox -type f | xargs chmod -x
2974
2975 fi
2976
2977
2978
2979 { set +x
2980 printf "%s\n" "$at_srcdir/message-multipart.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
2981 rc=\$?
2982 grep -v '^;;;' err>&2
2983 exit \$rc"
2984 at_fn_check_prepare_notrace 'an embedded newline' "message-multipart.at:9"
2985 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
2986 rc=$?
2987 grep -v '^;;;' err>&2
2988 exit $rc
2989 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2990 at_status=$? at_failed=false
2991 $at_check_filter
2992 at_fn_diff_devnull "$at_stderr" || at_failed=:
2993 echo >>"$at_stdout"; printf "%s\n" "#f#t" | \
2994 $at_diff - "$at_stdout" || at_failed=:
2995 at_fn_check_status 0 $at_status "$at_srcdir/message-multipart.at:9"
2996 $at_failed && at_fn_log_failure
2997 $at_traceon; }
2998
2999
3000 set +x
3001 $at_times_p && times >"$at_times_file"
3002 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3003 read at_status <"$at_status_file"
3004 #AT_STOP_19
3005 #AT_START_20
3006 at_fn_group_banner 20 'message-get-num-parts.at:7' \
3007 "mu-message-get-num-parts" " " 2
3008 at_xfail=no
3009 (
3010 printf "%s\n" "20. $at_setup_line: testing $at_desc ..."
3011 $at_traceon
3012
3013
3014
3015 cat >input.scm <<'_ATEOF'
3016 (use-modules ((mailutils mailutils))
3017 ((mailutils ancilla)))
3018 (mu-register-format "mbox")
3019 (display (mu-message-get-num-parts (file->message "mbox")))
3020 _ATEOF
3021
3022
3023
3024
3025
3026 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
3027 if test -e mbox/mime.msg; then
3028
3029 # First, set all modes to +w
3030 find mbox/mime.msg | xargs chmod +w
3031 # Then, remove executable bit from regular files
3032 find mbox/mime.msg -type f | xargs chmod -x
3033
3034 else
3035
3036 # First, set all modes to +w
3037 find mbox | xargs chmod +w
3038 # Then, remove executable bit from regular files
3039 find mbox -type f | xargs chmod -x
3040
3041 fi
3042
3043
3044
3045 { set +x
3046 printf "%s\n" "$at_srcdir/message-get-num-parts.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3047 rc=\$?
3048 grep -v '^;;;' err>&2
3049 exit \$rc"
3050 at_fn_check_prepare_notrace 'an embedded newline' "message-get-num-parts.at:9"
3051 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3052 rc=$?
3053 grep -v '^;;;' err>&2
3054 exit $rc
3055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3056 at_status=$? at_failed=false
3057 $at_check_filter
3058 at_fn_diff_devnull "$at_stderr" || at_failed=:
3059 echo >>"$at_stdout"; printf "%s\n" "2" | \
3060 $at_diff - "$at_stdout" || at_failed=:
3061 at_fn_check_status 0 $at_status "$at_srcdir/message-get-num-parts.at:9"
3062 $at_failed && at_fn_log_failure
3063 $at_traceon; }
3064
3065
3066 set +x
3067 $at_times_p && times >"$at_times_file"
3068 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3069 read at_status <"$at_status_file"
3070 #AT_STOP_20
3071 #AT_START_21
3072 at_fn_group_banner 21 'message-get-part.at:7' \
3073 "mu-message-get-part" " " 2
3074 at_xfail=no
3075 (
3076 printf "%s\n" "21. $at_setup_line: testing $at_desc ..."
3077 $at_traceon
3078
3079
3080
3081 cat >input.scm <<'_ATEOF'
3082 (use-modules ((mailutils mailutils))
3083 ((mailutils ancilla)))
3084 (mu-register-format "mbox")
3085 (let ((msg (mu-message-get-part (file->message "mbox") 1)))
3086 (message-format #t msg)
3087 (display (mu-message-get-header-fields msg)))
3088 _ATEOF
3089
3090
3091
3092
3093
3094 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
3095 if test -e mbox/mime.msg; then
3096
3097 # First, set all modes to +w
3098 find mbox/mime.msg | xargs chmod +w
3099 # Then, remove executable bit from regular files
3100 find mbox/mime.msg -type f | xargs chmod -x
3101
3102 else
3103
3104 # First, set all modes to +w
3105 find mbox | xargs chmod +w
3106 # Then, remove executable bit from regular files
3107 find mbox -type f | xargs chmod -x
3108
3109 fi
3110
3111
3112
3113 { set +x
3114 printf "%s\n" "$at_srcdir/message-get-part.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3115 rc=\$?
3116 grep -v '^;;;' err>&2
3117 exit \$rc"
3118 at_fn_check_prepare_notrace 'an embedded newline' "message-get-part.at:9"
3119 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3120 rc=$?
3121 grep -v '^;;;' err>&2
3122 exit $rc
3123 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3124 at_status=$? at_failed=false
3125 $at_check_filter
3126 at_fn_diff_devnull "$at_stderr" || at_failed=:
3127 echo >>"$at_stdout"; printf "%s\n" "#<message \"X@Y\" \"Dow Mon Day HH:MM\" 14 489>((Content-Type . text/plain; name=\"msg.21\"; charset=\"us-ascii\") (Content-ID . <[email protected]>) (Content-Description . Father William Part I))" | \
3128 $at_diff - "$at_stdout" || at_failed=:
3129 at_fn_check_status 0 $at_status "$at_srcdir/message-get-part.at:9"
3130 $at_failed && at_fn_log_failure
3131 $at_traceon; }
3132
3133
3134 set +x
3135 $at_times_p && times >"$at_times_file"
3136 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3137 read at_status <"$at_status_file"
3138 #AT_STOP_21
3139 #AT_START_22
3140 at_fn_group_banner 22 'message-set-header.at:6' \
3141 "message-set-header" " " 2
3142 at_xfail=no
3143 (
3144 printf "%s\n" "22. $at_setup_line: testing $at_desc ..."
3145 $at_traceon
3146
3147
3148 cat >input.scm <<'_ATEOF'
3149 (use-modules ((mailutils mailutils))
3150 ((mailutils ancilla)))
3151 (mu-register-format "mbox")
3152
3153 (let ((msg (test-message)))
3154 (mu-message-set-header msg "Sender" "[email protected]")
3155 (display (sort-headers (mu-message-get-header-fields msg)))
3156 (newline)
3157 (mu-message-set-header msg "Sender" "[email protected]")
3158 (mu-message-set-header msg "From" "[email protected]" #t)
3159 (display (sort-headers (mu-message-get-header-fields msg))))
3160 _ATEOF
3161
3162
3163 { set +x
3164 printf "%s\n" "$at_srcdir/message-set-header.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3165 rc=\$?
3166 grep -v '^;;;' err>&2
3167 exit \$rc"
3168 at_fn_check_prepare_notrace 'an embedded newline' "message-set-header.at:8"
3169 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3170 rc=$?
3171 grep -v '^;;;' err>&2
3172 exit $rc
3173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3174 at_status=$? at_failed=false
3175 $at_check_filter
3176 at_fn_diff_devnull "$at_stderr" || at_failed=:
3177 echo >>"$at_stdout"; printf "%s\n" "((From . [email protected]) (Sender . [email protected]) (Subject . De omnibus rebus et quibusdam aliis) (To . [email protected]))
3178 ((From . [email protected]) (Sender . [email protected]) (Sender . [email protected]) (Subject . De omnibus rebus et quibusdam aliis) (To . [email protected]))" | \
3179 $at_diff - "$at_stdout" || at_failed=:
3180 at_fn_check_status 0 $at_status "$at_srcdir/message-set-header.at:8"
3181 $at_failed && at_fn_log_failure
3182 $at_traceon; }
3183
3184 set +x
3185 $at_times_p && times >"$at_times_file"
3186 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3187 read at_status <"$at_status_file"
3188 #AT_STOP_22
3189 #AT_START_23
3190 at_fn_group_banner 23 'message-set-header-fields.at:6' \
3191 "message-set-header-fields" " " 2
3192 at_xfail=no
3193 (
3194 printf "%s\n" "23. $at_setup_line: testing $at_desc ..."
3195 $at_traceon
3196
3197
3198 cat >input.scm <<'_ATEOF'
3199 (use-modules ((mailutils mailutils))
3200 ((mailutils ancilla)))
3201 (mu-register-format "mbox")
3202
3203 (let ((msg (test-message)))
3204 (mu-message-set-header-fields msg '(("Sender" . "[email protected]")
3205 ("Reply-To" . "[email protected]")))
3206 (display (sort-headers (mu-message-get-header-fields msg))))
3207 _ATEOF
3208
3209
3210 { set +x
3211 printf "%s\n" "$at_srcdir/message-set-header-fields.at:8: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3212 rc=\$?
3213 grep -v '^;;;' err>&2
3214 exit \$rc"
3215 at_fn_check_prepare_notrace 'an embedded newline' "message-set-header-fields.at:8"
3216 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3217 rc=$?
3218 grep -v '^;;;' err>&2
3219 exit $rc
3220 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3221 at_status=$? at_failed=false
3222 $at_check_filter
3223 at_fn_diff_devnull "$at_stderr" || at_failed=:
3224 echo >>"$at_stdout"; printf "%s\n" "((From . [email protected]) (Reply-To . [email protected]) (Sender . [email protected]) (Subject . De omnibus rebus et quibusdam aliis) (To . [email protected]))" | \
3225 $at_diff - "$at_stdout" || at_failed=:
3226 at_fn_check_status 0 $at_status "$at_srcdir/message-set-header-fields.at:8"
3227 $at_failed && at_fn_log_failure
3228 $at_traceon; }
3229
3230 set +x
3231 $at_times_p && times >"$at_times_file"
3232 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3233 read at_status <"$at_status_file"
3234 #AT_STOP_23
3235 #AT_START_24
3236 at_fn_group_banner 24 'message-create.at:7' \
3237 "mu-message-create" " " 2
3238 at_xfail=no
3239 (
3240 printf "%s\n" "24. $at_setup_line: testing $at_desc ..."
3241 $at_traceon
3242
3243
3244 cat >input.scm <<'_ATEOF'
3245 (use-modules ((mailutils mailutils))
3246 ((mailutils ancilla)))
3247 (mu-register-format "mbox")
3248 (exit (if (mu-message? (mu-message-create)) 0 1))
3249 _ATEOF
3250
3251
3252 { set +x
3253 printf "%s\n" "$at_srcdir/message-create.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3254 rc=\$?
3255 grep -v '^;;;' err>&2
3256 exit \$rc"
3257 at_fn_check_prepare_notrace 'an embedded newline' "message-create.at:9"
3258 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3259 rc=$?
3260 grep -v '^;;;' err>&2
3261 exit $rc
3262 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3263 at_status=$? at_failed=false
3264 $at_check_filter
3265 at_fn_diff_devnull "$at_stderr" || at_failed=:
3266 at_fn_diff_devnull "$at_stdout" || at_failed=:
3267 at_fn_check_status 0 $at_status "$at_srcdir/message-create.at:9"
3268 $at_failed && at_fn_log_failure
3269 $at_traceon; }
3270
3271 set +x
3272 $at_times_p && times >"$at_times_file"
3273 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3274 read at_status <"$at_status_file"
3275 #AT_STOP_24
3276 #AT_START_25
3277 at_fn_group_banner 25 'message-port-1.at:7' \
3278 "message port (body)" " " 2
3279 at_xfail=no
3280 (
3281 printf "%s\n" "25. $at_setup_line: testing $at_desc ..."
3282 $at_traceon
3283
3284
3285 cat >input.scm <<'_ATEOF'
3286 (use-modules ((mailutils mailutils))
3287 ((mailutils ancilla)))
3288 (mu-register-format "mbox")
3289
3290 (use-modules ((ice-9 binary-ports)))
3291
3292 (let ((msg (mu-message-create)))
3293 (display "writing\n")
3294 (let ((port (mu-message-get-port msg "w")))
3295 (with-output-to-port
3296 port
3297 (lambda ()
3298 (display "Test message\n")))
3299 (close-port port))
3300
3301 (message-format #t msg)
3302 (newline)
3303
3304 (display "reading\n")
3305 (let ((port (mu-message-get-port msg "r")))
3306 (do ((c (get-u8 port) (get-u8 port)))
3307 ((eof-object? c))
3308 (put-u8 (current-output-port) c))
3309 (close port)))
3310 _ATEOF
3311
3312
3313 { set +x
3314 printf "%s\n" "$at_srcdir/message-port-1.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3315 rc=\$?
3316 grep -v '^;;;' err>&2
3317 exit \$rc"
3318 at_fn_check_prepare_notrace 'an embedded newline' "message-port-1.at:9"
3319 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3320 rc=$?
3321 grep -v '^;;;' err>&2
3322 exit $rc
3323 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3324 at_status=$? at_failed=false
3325 $at_check_filter
3326 at_fn_diff_devnull "$at_stderr" || at_failed=:
3327 echo >>"$at_stdout"; printf "%s\n" "writing
3328 #<message \"X@Y\" \"Dow Mon Day HH:MM\" 2 14>
3329 reading
3330 Test message
3331 " | \
3332 $at_diff - "$at_stdout" || at_failed=:
3333 at_fn_check_status 0 $at_status "$at_srcdir/message-port-1.at:9"
3334 $at_failed && at_fn_log_failure
3335 $at_traceon; }
3336
3337 set +x
3338 $at_times_p && times >"$at_times_file"
3339 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3340 read at_status <"$at_status_file"
3341 #AT_STOP_25
3342 #AT_START_26
3343 at_fn_group_banner 26 'message-port-2.at:7' \
3344 "message port (full)" " " 2
3345 at_xfail=no
3346 (
3347 printf "%s\n" "26. $at_setup_line: testing $at_desc ..."
3348 $at_traceon
3349
3350
3351 cat >input.scm <<'_ATEOF'
3352 (use-modules ((mailutils mailutils))
3353 ((mailutils ancilla)))
3354 (mu-register-format "mbox")
3355
3356 (use-modules ((ice-9 binary-ports)))
3357
3358 (let ((msg (mu-message-create)))
3359 (display "writing\n")
3360 (mu-message-set-header msg "From" "[email protected]")
3361 (mu-message-set-header msg "Subject" "test")
3362 (let ((port (mu-message-get-port msg "w")))
3363 (with-output-to-port
3364 port
3365 (lambda ()
3366 (display "Test message\n")))
3367 (close-port port))
3368
3369 (message-format #t msg)
3370 (newline)
3371
3372 (display "reading\n")
3373 (let ((port (mu-message-get-port msg "r" #t)))
3374 (do ((c (get-u8 port) (get-u8 port)))
3375 ((eof-object? c))
3376 (put-u8 (current-output-port) c))
3377 (close port)))
3378 _ATEOF
3379
3380
3381 { set +x
3382 printf "%s\n" "$at_srcdir/message-port-2.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3383 rc=\$?
3384 grep -v '^;;;' err>&2
3385 exit \$rc"
3386 at_fn_check_prepare_notrace 'an embedded newline' "message-port-2.at:9"
3387 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3388 rc=$?
3389 grep -v '^;;;' err>&2
3390 exit $rc
3391 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3392 at_status=$? at_failed=false
3393 $at_check_filter
3394 at_fn_diff_devnull "$at_stderr" || at_failed=:
3395 echo >>"$at_stdout"; printf "%s\n" "writing
3396 #<message \"X@Y\" \"Dow Mon Day HH:MM\" 4 51>
3397 reading
3398 From: [email protected]
3399 Subject: test
3400
3401 Test message
3402 " | \
3403 $at_diff - "$at_stdout" || at_failed=:
3404 at_fn_check_status 0 $at_status "$at_srcdir/message-port-2.at:9"
3405 $at_failed && at_fn_log_failure
3406 $at_traceon; }
3407
3408 set +x
3409 $at_times_p && times >"$at_times_file"
3410 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3411 read at_status <"$at_status_file"
3412 #AT_STOP_26
3413 #AT_START_27
3414 at_fn_group_banner 27 'message-body.at:7' \
3415 "message body" " " 2
3416 at_xfail=no
3417 (
3418 printf "%s\n" "27. $at_setup_line: testing $at_desc ..."
3419 $at_traceon
3420
3421
3422 cat >input.scm <<'_ATEOF'
3423 (use-modules ((mailutils mailutils))
3424 ((mailutils ancilla)))
3425 (mu-register-format "mbox")
3426
3427 (use-modules ((ice-9 binary-ports)))
3428
3429 (let ((msg (mu-message-create)))
3430 (display "writing\n")
3431 (mu-message-set-header msg "From" "[email protected]")
3432 (mu-message-set-header msg "Subject" "test")
3433 (let ((port (mu-message-get-port msg "w")))
3434 (with-output-to-port
3435 port
3436 (lambda ()
3437 (display "Test message\n")))
3438 (close-port port))
3439
3440 (message-format #t msg)
3441 (newline)
3442
3443 (display "body\n")
3444 (let ((b (mu-message-get-body msg)))
3445 (display b)
3446 (newline)
3447 (do ((ln (mu-body-read-line b) (mu-body-read-line b)))
3448 ((eof-object? ln))
3449 (display ln))))
3450 _ATEOF
3451
3452
3453 { set +x
3454 printf "%s\n" "$at_srcdir/message-body.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3455 rc=\$?
3456 grep -v '^;;;' err>&2
3457 exit \$rc"
3458 at_fn_check_prepare_notrace 'an embedded newline' "message-body.at:9"
3459 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3460 rc=$?
3461 grep -v '^;;;' err>&2
3462 exit $rc
3463 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3464 at_status=$? at_failed=false
3465 $at_check_filter
3466 at_fn_diff_devnull "$at_stderr" || at_failed=:
3467 echo >>"$at_stdout"; printf "%s\n" "writing
3468 #<message \"X@Y\" \"Dow Mon Day HH:MM\" 4 51>
3469 body
3470 #<body 1 13>
3471 Test message
3472 " | \
3473 $at_diff - "$at_stdout" || at_failed=:
3474 at_fn_check_status 0 $at_status "$at_srcdir/message-body.at:9"
3475 $at_failed && at_fn_log_failure
3476 $at_traceon; }
3477
3478 set +x
3479 $at_times_p && times >"$at_times_file"
3480 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3481 read at_status <"$at_status_file"
3482 #AT_STOP_27
3483 #AT_START_28
3484 at_fn_group_banner 28 'bodyp.at:7' \
3485 "mu-body?" " " 2
3486 at_xfail=no
3487 (
3488 printf "%s\n" "28. $at_setup_line: testing $at_desc ..."
3489 $at_traceon
3490
3491
3492 cat >input.scm <<'_ATEOF'
3493 (use-modules ((mailutils mailutils))
3494 ((mailutils ancilla)))
3495 (mu-register-format "mbox")
3496
3497 (let ((msg (mu-message-create)))
3498 (if (mu-body? msg) (exit 1))
3499 (if (mu-body? (mu-message-get-body msg)) (exit 0))
3500 (exit 2))
3501 _ATEOF
3502
3503
3504 { set +x
3505 printf "%s\n" "$at_srcdir/bodyp.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3506 rc=\$?
3507 grep -v '^;;;' err>&2
3508 exit \$rc"
3509 at_fn_check_prepare_notrace 'an embedded newline' "bodyp.at:9"
3510 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3511 rc=$?
3512 grep -v '^;;;' err>&2
3513 exit $rc
3514 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3515 at_status=$? at_failed=false
3516 $at_check_filter
3517 at_fn_diff_devnull "$at_stderr" || at_failed=:
3518 at_fn_diff_devnull "$at_stdout" || at_failed=:
3519 at_fn_check_status 0 $at_status "$at_srcdir/bodyp.at:9"
3520 $at_failed && at_fn_log_failure
3521 $at_traceon; }
3522
3523 set +x
3524 $at_times_p && times >"$at_times_file"
3525 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3526 read at_status <"$at_status_file"
3527 #AT_STOP_28
3528 #AT_START_29
3529 at_fn_group_banner 29 'message-delete.at:7' \
3530 "mu-message-delete" " " 2
3531 at_xfail=no
3532 (
3533 printf "%s\n" "29. $at_setup_line: testing $at_desc ..."
3534 $at_traceon
3535
3536
3537 cat >input.scm <<'_ATEOF'
3538 (use-modules ((mailutils mailutils))
3539 ((mailutils ancilla)))
3540 (mu-register-format "mbox")
3541
3542 (let ((msg (test-message)))
3543 (display msg)(newline)
3544 (mu-message-delete msg)
3545 (display msg)(newline)
3546 (mu-message-delete msg #f)
3547 (display msg)(newline))
3548 _ATEOF
3549
3550
3551 { set +x
3552 printf "%s\n" "$at_srcdir/message-delete.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3553 rc=\$?
3554 grep -v '^;;;' err>&2
3555 exit \$rc"
3556 at_fn_check_prepare_notrace 'an embedded newline' "message-delete.at:9"
3557 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3558 rc=$?
3559 grep -v '^;;;' err>&2
3560 exit $rc
3561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3562 at_status=$? at_failed=false
3563 $at_check_filter
3564 at_fn_diff_devnull "$at_stderr" || at_failed=:
3565 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539>
3566 #<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539 D>
3567 #<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539>
3568 " | \
3569 $at_diff - "$at_stdout" || at_failed=:
3570 at_fn_check_status 0 $at_status "$at_srcdir/message-delete.at:9"
3571 $at_failed && at_fn_log_failure
3572 $at_traceon; }
3573
3574 set +x
3575 $at_times_p && times >"$at_times_file"
3576 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3577 read at_status <"$at_status_file"
3578 #AT_STOP_29
3579 #AT_START_30
3580 at_fn_group_banner 30 'mailbox-open.at:7' \
3581 "mu-mailbox-open" " " 3
3582 at_xfail=no
3583 (
3584 printf "%s\n" "30. $at_setup_line: testing $at_desc ..."
3585 $at_traceon
3586
3587
3588
3589 cat >input.scm <<'_ATEOF'
3590 (use-modules ((mailutils mailutils))
3591 ((mailutils ancilla)))
3592 (mu-register-format "mbox")
3593 (exit (if (mu-mailbox? (mu-mailbox-open "mbox" "r")) 0 1))
3594 _ATEOF
3595
3596
3597
3598
3599
3600 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
3601 if test -e mbox/mbox1; then
3602
3603 # First, set all modes to +w
3604 find mbox/mbox1 | xargs chmod +w
3605 # Then, remove executable bit from regular files
3606 find mbox/mbox1 -type f | xargs chmod -x
3607
3608 else
3609
3610 # First, set all modes to +w
3611 find mbox | xargs chmod +w
3612 # Then, remove executable bit from regular files
3613 find mbox -type f | xargs chmod -x
3614
3615 fi
3616
3617
3618
3619 { set +x
3620 printf "%s\n" "$at_srcdir/mailbox-open.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3621 rc=\$?
3622 grep -v '^;;;' err>&2
3623 exit \$rc"
3624 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-open.at:9"
3625 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3626 rc=$?
3627 grep -v '^;;;' err>&2
3628 exit $rc
3629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3630 at_status=$? at_failed=false
3631 $at_check_filter
3632 at_fn_diff_devnull "$at_stderr" || at_failed=:
3633 at_fn_diff_devnull "$at_stdout" || at_failed=:
3634 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-open.at:9"
3635 $at_failed && at_fn_log_failure
3636 $at_traceon; }
3637
3638
3639 set +x
3640 $at_times_p && times >"$at_times_file"
3641 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3642 read at_status <"$at_status_file"
3643 #AT_STOP_30
3644 #AT_START_31
3645 at_fn_group_banner 31 'mailbox-open-exc.at:7' \
3646 "mu-mailbox-open exception" " " 3
3647 at_xfail=no
3648 (
3649 printf "%s\n" "31. $at_setup_line: testing $at_desc ..."
3650 $at_traceon
3651
3652
3653 cat >input.scm <<'_ATEOF'
3654 (use-modules ((mailutils mailutils))
3655 ((mailutils ancilla)))
3656 (mu-register-format "mbox")
3657
3658 (catch 'mailutils-error
3659 (lambda ()
3660 (mu-mailbox-open "NONEXISTENT" "r"))
3661 (lambda (key . rest)
3662 (apply
3663 (lambda (func fmt args syserr)
3664 (apply format #t fmt args)
3665 (newline))
3666 rest)))
3667 _ATEOF
3668
3669
3670 { set +x
3671 printf "%s\n" "$at_srcdir/mailbox-open-exc.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3672 rc=\$?
3673 grep -v '^;;;' err>&2
3674 exit \$rc"
3675 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-open-exc.at:9"
3676 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3677 rc=$?
3678 grep -v '^;;;' err>&2
3679 exit $rc
3680 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3681 at_status=$? at_failed=false
3682 $at_check_filter
3683 at_fn_diff_devnull "$at_stderr" || at_failed=:
3684 echo >>"$at_stdout"; printf "%s\n" "Cannot open default mailbox NONEXISTENT
3685 " | \
3686 $at_diff - "$at_stdout" || at_failed=:
3687 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-open-exc.at:9"
3688 $at_failed && at_fn_log_failure
3689 $at_traceon; }
3690
3691 set +x
3692 $at_times_p && times >"$at_times_file"
3693 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3694 read at_status <"$at_status_file"
3695 #AT_STOP_31
3696 #AT_START_32
3697 at_fn_group_banner 32 'mailbox-print.at:7' \
3698 "mailbox print" " " 3
3699 at_xfail=no
3700 (
3701 printf "%s\n" "32. $at_setup_line: testing $at_desc ..."
3702 $at_traceon
3703
3704
3705
3706 cat >input.scm <<'_ATEOF'
3707 (use-modules ((mailutils mailutils))
3708 ((mailutils ancilla)))
3709 (mu-register-format "mbox")
3710
3711 (use-modules ((ice-9 regex)))
3712
3713 (let ((s (with-output-to-string
3714 (lambda ()
3715 (display (mu-mailbox-open "mbox" "r"))))))
3716 (cond
3717 ((string-match
3718 "^(#<mailbox[[:space:]]+).*/(mbox[[:space:]]+\\(5\\)>)$" s)
3719 (exit 0))
3720 (else
3721 (display s)(newline)
3722 (exit 1))))
3723 (newline)
3724 _ATEOF
3725
3726
3727
3728
3729
3730 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
3731 if test -e mbox/mbox1; then
3732
3733 # First, set all modes to +w
3734 find mbox/mbox1 | xargs chmod +w
3735 # Then, remove executable bit from regular files
3736 find mbox/mbox1 -type f | xargs chmod -x
3737
3738 else
3739
3740 # First, set all modes to +w
3741 find mbox | xargs chmod +w
3742 # Then, remove executable bit from regular files
3743 find mbox -type f | xargs chmod -x
3744
3745 fi
3746
3747
3748
3749 { set +x
3750 printf "%s\n" "$at_srcdir/mailbox-print.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3751 rc=\$?
3752 grep -v '^;;;' err>&2
3753 exit \$rc"
3754 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-print.at:9"
3755 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3756 rc=$?
3757 grep -v '^;;;' err>&2
3758 exit $rc
3759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3760 at_status=$? at_failed=false
3761 $at_check_filter
3762 at_fn_diff_devnull "$at_stderr" || at_failed=:
3763 at_fn_diff_devnull "$at_stdout" || at_failed=:
3764 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-print.at:9"
3765 $at_failed && at_fn_log_failure
3766 $at_traceon; }
3767
3768
3769
3770 set +x
3771 $at_times_p && times >"$at_times_file"
3772 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3773 read at_status <"$at_status_file"
3774 #AT_STOP_32
3775 #AT_START_33
3776 at_fn_group_banner 33 'mailbox-get-url.at:7' \
3777 "mu-mailbox-get-url" " " 3
3778 at_xfail=no
3779 (
3780 printf "%s\n" "33. $at_setup_line: testing $at_desc ..."
3781 $at_traceon
3782
3783
3784
3785 cat >input.scm <<'_ATEOF'
3786 (use-modules ((mailutils mailutils))
3787 ((mailutils ancilla)))
3788 (mu-register-format "mbox")
3789
3790 (use-modules ((ice-9 regex)))
3791
3792 (let ((s (mu-mailbox-get-url (mu-mailbox-open "mbox" "r"))))
3793 (cond
3794 ((string-match "^(.*/)?mbox$" s)
3795 (exit 0))
3796 (else
3797 (display s)
3798 (newline)
3799 (exit 1))))
3800 _ATEOF
3801
3802
3803
3804
3805
3806 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
3807 if test -e mbox/mbox1; then
3808
3809 # First, set all modes to +w
3810 find mbox/mbox1 | xargs chmod +w
3811 # Then, remove executable bit from regular files
3812 find mbox/mbox1 -type f | xargs chmod -x
3813
3814 else
3815
3816 # First, set all modes to +w
3817 find mbox | xargs chmod +w
3818 # Then, remove executable bit from regular files
3819 find mbox -type f | xargs chmod -x
3820
3821 fi
3822
3823
3824
3825 { set +x
3826 printf "%s\n" "$at_srcdir/mailbox-get-url.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3827 rc=\$?
3828 grep -v '^;;;' err>&2
3829 exit \$rc"
3830 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-get-url.at:9"
3831 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3832 rc=$?
3833 grep -v '^;;;' err>&2
3834 exit $rc
3835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3836 at_status=$? at_failed=false
3837 $at_check_filter
3838 at_fn_diff_devnull "$at_stderr" || at_failed=:
3839 at_fn_diff_devnull "$at_stdout" || at_failed=:
3840 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-get-url.at:9"
3841 $at_failed && at_fn_log_failure
3842 $at_traceon; }
3843
3844
3845
3846 set +x
3847 $at_times_p && times >"$at_times_file"
3848 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3849 read at_status <"$at_status_file"
3850 #AT_STOP_33
3851 #AT_START_34
3852 at_fn_group_banner 34 'mailbox-get-size.at:7' \
3853 "mu-mailbox-get-size" " " 3
3854 at_xfail=no
3855 (
3856 printf "%s\n" "34. $at_setup_line: testing $at_desc ..."
3857 $at_traceon
3858
3859
3860
3861 cat >input.scm <<'_ATEOF'
3862 (use-modules ((mailutils mailutils))
3863 ((mailutils ancilla)))
3864 (mu-register-format "mbox")
3865
3866 (display (mu-mailbox-get-size (mu-mailbox-open "mbox" "r")))
3867 (newline)
3868 _ATEOF
3869
3870
3871
3872
3873
3874 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
3875 if test -e mbox/mbox1; then
3876
3877 # First, set all modes to +w
3878 find mbox/mbox1 | xargs chmod +w
3879 # Then, remove executable bit from regular files
3880 find mbox/mbox1 -type f | xargs chmod -x
3881
3882 else
3883
3884 # First, set all modes to +w
3885 find mbox | xargs chmod +w
3886 # Then, remove executable bit from regular files
3887 find mbox -type f | xargs chmod -x
3888
3889 fi
3890
3891
3892
3893 { set +x
3894 printf "%s\n" "$at_srcdir/mailbox-get-size.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3895 rc=\$?
3896 grep -v '^;;;' err>&2
3897 exit \$rc"
3898 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-get-size.at:9"
3899 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3900 rc=$?
3901 grep -v '^;;;' err>&2
3902 exit $rc
3903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3904 at_status=$? at_failed=false
3905 $at_check_filter
3906 at_fn_diff_devnull "$at_stderr" || at_failed=:
3907 echo >>"$at_stdout"; printf "%s\n" "7862
3908 " | \
3909 $at_diff - "$at_stdout" || at_failed=:
3910 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-get-size.at:9"
3911 $at_failed && at_fn_log_failure
3912 $at_traceon; }
3913
3914
3915 set +x
3916 $at_times_p && times >"$at_times_file"
3917 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3918 read at_status <"$at_status_file"
3919 #AT_STOP_34
3920 #AT_START_35
3921 at_fn_group_banner 35 'mailbox-messages-count.at:7' \
3922 "mu-mailbox-messages-count" " " 3
3923 at_xfail=no
3924 (
3925 printf "%s\n" "35. $at_setup_line: testing $at_desc ..."
3926 $at_traceon
3927
3928
3929
3930 cat >input.scm <<'_ATEOF'
3931 (use-modules ((mailutils mailutils))
3932 ((mailutils ancilla)))
3933 (mu-register-format "mbox")
3934
3935 (display (mu-mailbox-messages-count (mu-mailbox-open "mbox" "r")))
3936 (newline)
3937
3938 _ATEOF
3939
3940
3941
3942
3943
3944 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
3945 if test -e mbox/mbox1; then
3946
3947 # First, set all modes to +w
3948 find mbox/mbox1 | xargs chmod +w
3949 # Then, remove executable bit from regular files
3950 find mbox/mbox1 -type f | xargs chmod -x
3951
3952 else
3953
3954 # First, set all modes to +w
3955 find mbox | xargs chmod +w
3956 # Then, remove executable bit from regular files
3957 find mbox -type f | xargs chmod -x
3958
3959 fi
3960
3961
3962
3963 { set +x
3964 printf "%s\n" "$at_srcdir/mailbox-messages-count.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
3965 rc=\$?
3966 grep -v '^;;;' err>&2
3967 exit \$rc"
3968 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-messages-count.at:9"
3969 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
3970 rc=$?
3971 grep -v '^;;;' err>&2
3972 exit $rc
3973 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3974 at_status=$? at_failed=false
3975 $at_check_filter
3976 at_fn_diff_devnull "$at_stderr" || at_failed=:
3977 echo >>"$at_stdout"; printf "%s\n" "5
3978 " | \
3979 $at_diff - "$at_stdout" || at_failed=:
3980 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-messages-count.at:9"
3981 $at_failed && at_fn_log_failure
3982 $at_traceon; }
3983
3984
3985 set +x
3986 $at_times_p && times >"$at_times_file"
3987 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3988 read at_status <"$at_status_file"
3989 #AT_STOP_35
3990 #AT_START_36
3991 at_fn_group_banner 36 'mailbox-get-message.at:7' \
3992 "mu-mailbox-get-message" " " 3
3993 at_xfail=no
3994 (
3995 printf "%s\n" "36. $at_setup_line: testing $at_desc ..."
3996 $at_traceon
3997
3998
3999
4000 cat >input.scm <<'_ATEOF'
4001 (use-modules ((mailutils mailutils))
4002 ((mailutils ancilla)))
4003 (mu-register-format "mbox")
4004
4005 (let ((mbox (mu-mailbox-open "mbox" "r")))
4006 (let ((n (mu-mailbox-messages-count mbox)))
4007 (do ((i 1 (1+ i)))
4008 ((> i n))
4009 (let ((msg (mu-mailbox-get-message mbox i)))
4010 (display msg)(newline)))))
4011 _ATEOF
4012
4013
4014
4015
4016
4017 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
4018 if test -e mbox/mbox1; then
4019
4020 # First, set all modes to +w
4021 find mbox/mbox1 | xargs chmod +w
4022 # Then, remove executable bit from regular files
4023 find mbox/mbox1 -type f | xargs chmod -x
4024
4025 else
4026
4027 # First, set all modes to +w
4028 find mbox | xargs chmod +w
4029 # Then, remove executable bit from regular files
4030 find mbox -type f | xargs chmod -x
4031
4032 fi
4033
4034
4035
4036 { set +x
4037 printf "%s\n" "$at_srcdir/mailbox-get-message.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4038 rc=\$?
4039 grep -v '^;;;' err>&2
4040 exit \$rc"
4041 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-get-message.at:9"
4042 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4043 rc=$?
4044 grep -v '^;;;' err>&2
4045 exit $rc
4046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4047 at_status=$? at_failed=false
4048 $at_check_filter
4049 at_fn_diff_devnull "$at_stderr" || at_failed=:
4050 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Dec 28 22:18\" 44 1254>
4051 #<message \"[email protected]\" \"Fri Dec 28 23:28\" 13 534>
4052 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 42 1569>
4053 #<message \"[email protected]\" \"Sat Jul 13 00:50\" 84 3399>
4054 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 27 857>
4055 " | \
4056 $at_diff - "$at_stdout" || at_failed=:
4057 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-get-message.at:9"
4058 $at_failed && at_fn_log_failure
4059 $at_traceon; }
4060
4061
4062 set +x
4063 $at_times_p && times >"$at_times_file"
4064 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4065 read at_status <"$at_status_file"
4066 #AT_STOP_36
4067 #AT_START_37
4068 at_fn_group_banner 37 'mailbox-iterate.at:7' \
4069 "mu-mailbox-first/next-message" " " 3
4070 at_xfail=no
4071 (
4072 printf "%s\n" "37. $at_setup_line: testing $at_desc ..."
4073 $at_traceon
4074
4075
4076
4077 cat >input.scm <<'_ATEOF'
4078 (use-modules ((mailutils mailutils))
4079 ((mailutils ancilla)))
4080 (mu-register-format "mbox")
4081
4082 (let ((mbox (mu-mailbox-open "mbox" "r")))
4083 (do ((msg (mu-mailbox-first-message mbox) (mu-mailbox-next-message mbox)))
4084 ((not (mu-mailbox-more-messages? mbox)))
4085 (display msg)(newline)))
4086 _ATEOF
4087
4088
4089
4090
4091
4092 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
4093 if test -e mbox/mbox1; then
4094
4095 # First, set all modes to +w
4096 find mbox/mbox1 | xargs chmod +w
4097 # Then, remove executable bit from regular files
4098 find mbox/mbox1 -type f | xargs chmod -x
4099
4100 else
4101
4102 # First, set all modes to +w
4103 find mbox | xargs chmod +w
4104 # Then, remove executable bit from regular files
4105 find mbox -type f | xargs chmod -x
4106
4107 fi
4108
4109
4110
4111 { set +x
4112 printf "%s\n" "$at_srcdir/mailbox-iterate.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4113 rc=\$?
4114 grep -v '^;;;' err>&2
4115 exit \$rc"
4116 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-iterate.at:9"
4117 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4118 rc=$?
4119 grep -v '^;;;' err>&2
4120 exit $rc
4121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4122 at_status=$? at_failed=false
4123 $at_check_filter
4124 at_fn_diff_devnull "$at_stderr" || at_failed=:
4125 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Dec 28 22:18\" 44 1254>
4126 #<message \"[email protected]\" \"Fri Dec 28 23:28\" 13 534>
4127 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 42 1569>
4128 #<message \"[email protected]\" \"Sat Jul 13 00:50\" 84 3399>
4129 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 27 857>
4130 " | \
4131 $at_diff - "$at_stdout" || at_failed=:
4132 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-iterate.at:9"
4133 $at_failed && at_fn_log_failure
4134 $at_traceon; }
4135
4136
4137 set +x
4138 $at_times_p && times >"$at_times_file"
4139 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4140 read at_status <"$at_status_file"
4141 #AT_STOP_37
4142 #AT_START_38
4143 at_fn_group_banner 38 'mailbox-append-message.at:7' \
4144 "mu-mailbox-append-message" " " 3
4145 at_xfail=no
4146 (
4147 printf "%s\n" "38. $at_setup_line: testing $at_desc ..."
4148 $at_traceon
4149
4150
4151
4152
4153
4154
4155 cat >input.scm <<'_ATEOF'
4156 (use-modules ((mailutils mailutils))
4157 ((mailutils ancilla)))
4158 (mu-register-format "mbox")
4159
4160 (use-modules ((ice-9 binary-ports)))
4161 (let ((mbox (mu-mailbox-open "mbox" "rw")))
4162 (mu-mailbox-append-message mbox (test-message))
4163 (mu-mailbox-close mbox))
4164 (let ((mbox (mu-mailbox-open "mbox" "r")))
4165 (do ((msg (mu-mailbox-first-message mbox) (mu-mailbox-next-message mbox)))
4166 ((not (mu-mailbox-more-messages? mbox)))
4167 (display msg)(newline))
4168 (let ((port (mu-message-get-port (mu-mailbox-get-message mbox 6) "r" #t)))
4169 (do ((c (get-u8 port) (get-u8 port)))
4170 ((eof-object? c))
4171 (put-u8 (current-output-port) c))
4172 (close port)))
4173 _ATEOF
4174
4175
4176
4177
4178
4179 cp -r $abs_top_srcdir/testsuite/spool/mbox1 mbox
4180 if test -e mbox/mbox1; then
4181
4182 # First, set all modes to +w
4183 find mbox/mbox1 | xargs chmod +w
4184 # Then, remove executable bit from regular files
4185 find mbox/mbox1 -type f | xargs chmod -x
4186
4187 else
4188
4189 # First, set all modes to +w
4190 find mbox | xargs chmod +w
4191 # Then, remove executable bit from regular files
4192 find mbox -type f | xargs chmod -x
4193
4194 fi
4195
4196
4197
4198 { set +x
4199 printf "%s\n" "$at_srcdir/mailbox-append-message.at:19: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err |sed -e '/#<message/s/ [0-9][0-9]* [0-9][0-9]*>/>/' \\
4200 -e /^X-UID:/d
4201
4202 rc=\$?
4203 grep -v '^;;;' err>&2
4204 exit \$rc"
4205 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-append-message.at:19"
4206 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err |sed -e '/#<message/s/ [0-9][0-9]* [0-9][0-9]*>/>/' \
4207 -e /^X-UID:/d
4208
4209 rc=$?
4210 grep -v '^;;;' err>&2
4211 exit $rc
4212 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4213 at_status=$? at_failed=false
4214 $at_check_filter
4215 at_fn_diff_devnull "$at_stderr" || at_failed=:
4216 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Dec 28 22:18\">
4217 #<message \"[email protected]\" \"Fri Dec 28 23:28\">
4218 #<message \"[email protected]\" \"Sat Jul 13 00:43\">
4219 #<message \"[email protected]\" \"Sat Jul 13 00:50\">
4220 #<message \"[email protected]\" \"Sat Jul 13 00:43\">
4221 #<message \"[email protected]\" \"Fri Jun 8 14:30\">
4222 From: [email protected]
4223 To: [email protected]
4224 Subject: De omnibus rebus et quibusdam aliis
4225
4226 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
4227 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
4228 quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
4229 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
4230 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
4231 non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4232 " | \
4233 $at_diff - "$at_stdout" || at_failed=:
4234 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-append-message.at:19"
4235 $at_failed && at_fn_log_failure
4236 $at_traceon; }
4237
4238
4239 set +x
4240 $at_times_p && times >"$at_times_file"
4241 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4242 read at_status <"$at_status_file"
4243 #AT_STOP_38
4244 #AT_START_39
4245 at_fn_group_banner 39 'mailbox-expunge.at:7' \
4246 "mailbox-expunge" " " 3
4247 at_xfail=no
4248 (
4249 printf "%s\n" "39. $at_setup_line: testing $at_desc ..."
4250 $at_traceon
4251
4252
4253
4254 cat >input.scm <<'_ATEOF'
4255 (use-modules ((mailutils mailutils))
4256 ((mailutils ancilla)))
4257 (mu-register-format "mbox")
4258
4259 (use-modules ((ice-9 binary-ports)))
4260 (define (mailbox-list mbox)
4261 (do ((msg (mu-mailbox-first-message mbox) (mu-mailbox-next-message mbox)))
4262 ((not (mu-mailbox-more-messages? mbox)))
4263 (display msg)(newline)))
4264 (let ((mbox (mu-mailbox-open "mbox" "rw")))
4265 (mu-message-delete (mu-mailbox-get-message mbox 3))
4266 (mu-mailbox-expunge mbox)
4267 (mailbox-list mbox)
4268 (mu-mailbox-close mbox))
4269 (let ((mbox (mu-mailbox-open "mbox" "r")))
4270 (display "; Revisited\n")
4271 (mailbox-list mbox))
4272 _ATEOF
4273
4274
4275
4276
4277
4278 cp -r $abs_top_srcdir/testsuite/spool/mbox2 mbox
4279 if test -e mbox/mbox2; then
4280
4281 # First, set all modes to +w
4282 find mbox/mbox2 | xargs chmod +w
4283 # Then, remove executable bit from regular files
4284 find mbox/mbox2 -type f | xargs chmod -x
4285
4286 else
4287
4288 # First, set all modes to +w
4289 find mbox | xargs chmod +w
4290 # Then, remove executable bit from regular files
4291 find mbox -type f | xargs chmod -x
4292
4293 fi
4294
4295
4296
4297 { set +x
4298 printf "%s\n" "$at_srcdir/mailbox-expunge.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4299 rc=\$?
4300 grep -v '^;;;' err>&2
4301 exit \$rc"
4302 at_fn_check_prepare_notrace 'an embedded newline' "mailbox-expunge.at:9"
4303 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4304 rc=$?
4305 grep -v '^;;;' err>&2
4306 exit $rc
4307 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4308 at_status=$? at_failed=false
4309 $at_check_filter
4310 at_fn_diff_devnull "$at_stderr" || at_failed=:
4311 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Dec 28 22:18\" 47 1297>
4312 #<message \"[email protected]\" \"Fri Dec 28 23:28\" 15 552>
4313 #<message \"[email protected]\" \"Sat Jul 13 00:50\" 86 3417>
4314 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 29 875>
4315 ; Revisited
4316 #<message \"[email protected]\" \"Fri Dec 28 22:18\" 47 1297>
4317 #<message \"[email protected]\" \"Fri Dec 28 23:28\" 15 552>
4318 #<message \"[email protected]\" \"Sat Jul 13 00:50\" 86 3417>
4319 #<message \"[email protected]\" \"Sat Jul 13 00:43\" 29 875>
4320 " | \
4321 $at_diff - "$at_stdout" || at_failed=:
4322 at_fn_check_status 0 $at_status "$at_srcdir/mailbox-expunge.at:9"
4323 $at_failed && at_fn_log_failure
4324 $at_traceon; }
4325
4326
4327 set +x
4328 $at_times_p && times >"$at_times_file"
4329 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4330 read at_status <"$at_status_file"
4331 #AT_STOP_39
4332 #AT_START_40
4333 at_fn_group_banner 40 'message-get-flag.at:7' \
4334 "mu-message-set/get-flag" " " 3
4335 at_xfail=no
4336 (
4337 printf "%s\n" "40. $at_setup_line: testing $at_desc ..."
4338 $at_traceon
4339
4340
4341 cat >input.scm <<'_ATEOF'
4342 (use-modules ((mailutils mailutils))
4343 ((mailutils ancilla)))
4344 (mu-register-format "mbox")
4345
4346 (let ((msg (test-message)))
4347 (display msg)(newline)
4348 (mu-message-set-flag msg (logior MU-ATTRIBUTE-READ MU-ATTRIBUTE-SEEN))
4349 (display msg)(newline)
4350 (mu-message-set-flag msg MU-ATTRIBUTE-READ #f)
4351 (display msg)(newline)
4352 (mu-message-set-flag msg MU-ATTRIBUTE-SEEN #f)
4353 (display msg)(newline))
4354 _ATEOF
4355
4356
4357 { set +x
4358 printf "%s\n" "$at_srcdir/message-get-flag.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4359 rc=\$?
4360 grep -v '^;;;' err>&2
4361 exit \$rc"
4362 at_fn_check_prepare_notrace 'an embedded newline' "message-get-flag.at:9"
4363 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4364 rc=$?
4365 grep -v '^;;;' err>&2
4366 exit $rc
4367 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4368 at_status=$? at_failed=false
4369 $at_check_filter
4370 at_fn_diff_devnull "$at_stderr" || at_failed=:
4371 echo >>"$at_stdout"; printf "%s\n" "#<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539>
4372 #<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539 OR>
4373 #<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539 O>
4374 #<message \"[email protected]\" \"Fri Jun 8 14:30\" 10 539>
4375 " | \
4376 $at_diff - "$at_stdout" || at_failed=:
4377 at_fn_check_status 0 $at_status "$at_srcdir/message-get-flag.at:9"
4378 $at_failed && at_fn_log_failure
4379 $at_traceon; }
4380
4381 set +x
4382 $at_times_p && times >"$at_times_file"
4383 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4384 read at_status <"$at_status_file"
4385 #AT_STOP_40
4386 #AT_START_41
4387 at_fn_group_banner 41 'mime-create.at:7' \
4388 "mu-mime-create (from file)" " " 4
4389 at_xfail=no
4390 (
4391 printf "%s\n" "41. $at_setup_line: testing $at_desc ..."
4392 $at_traceon
4393
4394
4395
4396 cat >input.scm <<'_ATEOF'
4397 (use-modules ((mailutils mailutils))
4398 ((mailutils ancilla)))
4399 (mu-register-format "mbox")
4400
4401 (let ((msg (file->message "mbox")))
4402 (let ((mime (mu-mime-create 0 msg)))
4403 (display mime)))
4404 _ATEOF
4405
4406
4407
4408
4409
4410 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4411 if test -e mbox/mime.msg; then
4412
4413 # First, set all modes to +w
4414 find mbox/mime.msg | xargs chmod +w
4415 # Then, remove executable bit from regular files
4416 find mbox/mime.msg -type f | xargs chmod -x
4417
4418 else
4419
4420 # First, set all modes to +w
4421 find mbox | xargs chmod +w
4422 # Then, remove executable bit from regular files
4423 find mbox -type f | xargs chmod -x
4424
4425 fi
4426
4427
4428
4429 { set +x
4430 printf "%s\n" "$at_srcdir/mime-create.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4431 rc=\$?
4432 grep -v '^;;;' err>&2
4433 exit \$rc"
4434 at_fn_check_prepare_notrace 'an embedded newline' "mime-create.at:9"
4435 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4436 rc=$?
4437 grep -v '^;;;' err>&2
4438 exit $rc
4439 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4440 at_status=$? at_failed=false
4441 $at_check_filter
4442 at_fn_diff_devnull "$at_stderr" || at_failed=:
4443 echo >>"$at_stdout"; printf "%s\n" "#<mime 2>" | \
4444 $at_diff - "$at_stdout" || at_failed=:
4445 at_fn_check_status 0 $at_status "$at_srcdir/mime-create.at:9"
4446 $at_failed && at_fn_log_failure
4447 $at_traceon; }
4448
4449
4450 set +x
4451 $at_times_p && times >"$at_times_file"
4452 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4453 read at_status <"$at_status_file"
4454 #AT_STOP_41
4455 #AT_START_42
4456 at_fn_group_banner 42 'mime-p.at:7' \
4457 "mu-mime?" " " 4
4458 at_xfail=no
4459 (
4460 printf "%s\n" "42. $at_setup_line: testing $at_desc ..."
4461 $at_traceon
4462
4463
4464
4465 cat >input.scm <<'_ATEOF'
4466 (use-modules ((mailutils mailutils))
4467 ((mailutils ancilla)))
4468 (mu-register-format "mbox")
4469 (exit (if (mu-mime? (mu-mime-create 0 (file->message "mbox"))) 0 1))
4470 _ATEOF
4471
4472
4473
4474
4475
4476 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4477 if test -e mbox/mime.msg; then
4478
4479 # First, set all modes to +w
4480 find mbox/mime.msg | xargs chmod +w
4481 # Then, remove executable bit from regular files
4482 find mbox/mime.msg -type f | xargs chmod -x
4483
4484 else
4485
4486 # First, set all modes to +w
4487 find mbox | xargs chmod +w
4488 # Then, remove executable bit from regular files
4489 find mbox -type f | xargs chmod -x
4490
4491 fi
4492
4493
4494
4495 { set +x
4496 printf "%s\n" "$at_srcdir/mime-p.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4497 rc=\$?
4498 grep -v '^;;;' err>&2
4499 exit \$rc"
4500 at_fn_check_prepare_notrace 'an embedded newline' "mime-p.at:9"
4501 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4502 rc=$?
4503 grep -v '^;;;' err>&2
4504 exit $rc
4505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4506 at_status=$? at_failed=false
4507 $at_check_filter
4508 at_fn_diff_devnull "$at_stderr" || at_failed=:
4509 at_fn_diff_devnull "$at_stdout" || at_failed=:
4510 at_fn_check_status 0 $at_status "$at_srcdir/mime-p.at:9"
4511 $at_failed && at_fn_log_failure
4512 $at_traceon; }
4513
4514
4515 set +x
4516 $at_times_p && times >"$at_times_file"
4517 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4518 read at_status <"$at_status_file"
4519 #AT_STOP_42
4520 #AT_START_43
4521 at_fn_group_banner 43 'mime-multipart-p.at:7' \
4522 "mu-mime-multipart?" " " 4
4523 at_xfail=no
4524 (
4525 printf "%s\n" "43. $at_setup_line: testing $at_desc ..."
4526 $at_traceon
4527
4528
4529
4530 cat >input.scm <<'_ATEOF'
4531 (use-modules ((mailutils mailutils))
4532 ((mailutils ancilla)))
4533 (mu-register-format "mbox")
4534
4535 (display (mu-mime-multipart? (mu-mime-create 0 (file->message "mbox"))))
4536 (display (mu-mime-multipart? (mu-mime-create 0 (test-message))))
4537 _ATEOF
4538
4539
4540
4541
4542
4543 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4544 if test -e mbox/mime.msg; then
4545
4546 # First, set all modes to +w
4547 find mbox/mime.msg | xargs chmod +w
4548 # Then, remove executable bit from regular files
4549 find mbox/mime.msg -type f | xargs chmod -x
4550
4551 else
4552
4553 # First, set all modes to +w
4554 find mbox | xargs chmod +w
4555 # Then, remove executable bit from regular files
4556 find mbox -type f | xargs chmod -x
4557
4558 fi
4559
4560
4561
4562 { set +x
4563 printf "%s\n" "$at_srcdir/mime-multipart-p.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4564 rc=\$?
4565 grep -v '^;;;' err>&2
4566 exit \$rc"
4567 at_fn_check_prepare_notrace 'an embedded newline' "mime-multipart-p.at:9"
4568 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4569 rc=$?
4570 grep -v '^;;;' err>&2
4571 exit $rc
4572 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4573 at_status=$? at_failed=false
4574 $at_check_filter
4575 at_fn_diff_devnull "$at_stderr" || at_failed=:
4576 echo >>"$at_stdout"; printf "%s\n" "#t#f" | \
4577 $at_diff - "$at_stdout" || at_failed=:
4578 at_fn_check_status 0 $at_status "$at_srcdir/mime-multipart-p.at:9"
4579 $at_failed && at_fn_log_failure
4580 $at_traceon; }
4581
4582
4583 set +x
4584 $at_times_p && times >"$at_times_file"
4585 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4586 read at_status <"$at_status_file"
4587 #AT_STOP_43
4588 #AT_START_44
4589 at_fn_group_banner 44 'mime-get-num-parts.at:7' \
4590 "mu-mime-get-num-parts" " " 4
4591 at_xfail=no
4592 (
4593 printf "%s\n" "44. $at_setup_line: testing $at_desc ..."
4594 $at_traceon
4595
4596
4597
4598 cat >input.scm <<'_ATEOF'
4599 (use-modules ((mailutils mailutils))
4600 ((mailutils ancilla)))
4601 (mu-register-format "mbox")
4602
4603 (display (mu-mime-get-num-parts (mu-mime-create 0 (file->message "mbox"))))
4604 _ATEOF
4605
4606
4607
4608
4609
4610 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4611 if test -e mbox/mime.msg; then
4612
4613 # First, set all modes to +w
4614 find mbox/mime.msg | xargs chmod +w
4615 # Then, remove executable bit from regular files
4616 find mbox/mime.msg -type f | xargs chmod -x
4617
4618 else
4619
4620 # First, set all modes to +w
4621 find mbox | xargs chmod +w
4622 # Then, remove executable bit from regular files
4623 find mbox -type f | xargs chmod -x
4624
4625 fi
4626
4627
4628
4629 { set +x
4630 printf "%s\n" "$at_srcdir/mime-get-num-parts.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4631 rc=\$?
4632 grep -v '^;;;' err>&2
4633 exit \$rc"
4634 at_fn_check_prepare_notrace 'an embedded newline' "mime-get-num-parts.at:9"
4635 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4636 rc=$?
4637 grep -v '^;;;' err>&2
4638 exit $rc
4639 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4640 at_status=$? at_failed=false
4641 $at_check_filter
4642 at_fn_diff_devnull "$at_stderr" || at_failed=:
4643 echo >>"$at_stdout"; printf "%s\n" "2" | \
4644 $at_diff - "$at_stdout" || at_failed=:
4645 at_fn_check_status 0 $at_status "$at_srcdir/mime-get-num-parts.at:9"
4646 $at_failed && at_fn_log_failure
4647 $at_traceon; }
4648
4649
4650 set +x
4651 $at_times_p && times >"$at_times_file"
4652 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4653 read at_status <"$at_status_file"
4654 #AT_STOP_44
4655 #AT_START_45
4656 at_fn_group_banner 45 'mime-get-part.at:7' \
4657 "mu-mime-get-part" " " 4
4658 at_xfail=no
4659 (
4660 printf "%s\n" "45. $at_setup_line: testing $at_desc ..."
4661 $at_traceon
4662
4663
4664
4665 cat >input.scm <<'_ATEOF'
4666 (use-modules ((mailutils mailutils))
4667 ((mailutils ancilla)))
4668 (mu-register-format "mbox")
4669
4670 (let ((msg (file->message "mbox")))
4671 (let* ((mime (mu-mime-create 0 msg))
4672 (part-1 (mu-mime-get-part mime 1))
4673 (part-2 (mu-mime-get-part mime 2)))
4674 (message-format #t part-1)
4675 (newline)
4676 (display (mu-message-get-header part-1 "Content-ID"))
4677 (newline)
4678 (message-format #t part-2)
4679 (newline)
4680 (display (mu-message-get-header part-2 "Content-ID"))
4681 (newline)))
4682 _ATEOF
4683
4684
4685
4686
4687
4688 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4689 if test -e mbox/mime.msg; then
4690
4691 # First, set all modes to +w
4692 find mbox/mime.msg | xargs chmod +w
4693 # Then, remove executable bit from regular files
4694 find mbox/mime.msg -type f | xargs chmod -x
4695
4696 else
4697
4698 # First, set all modes to +w
4699 find mbox | xargs chmod +w
4700 # Then, remove executable bit from regular files
4701 find mbox -type f | xargs chmod -x
4702
4703 fi
4704
4705
4706
4707 { set +x
4708 printf "%s\n" "$at_srcdir/mime-get-part.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4709 rc=\$?
4710 grep -v '^;;;' err>&2
4711 exit \$rc"
4712 at_fn_check_prepare_notrace 'an embedded newline' "mime-get-part.at:9"
4713 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4714 rc=$?
4715 grep -v '^;;;' err>&2
4716 exit $rc
4717 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4718 at_status=$? at_failed=false
4719 $at_check_filter
4720 at_fn_diff_devnull "$at_stderr" || at_failed=:
4721 echo >>"$at_stdout"; printf "%s\n" "#<message \"X@Y\" \"Dow Mon Day HH:MM\" 14 489>
4722 <[email protected]>
4723 #<message \"X@Y\" \"Dow Mon Day HH:MM\" 52 2343>
4724 <[email protected]>
4725 " | \
4726 $at_diff - "$at_stdout" || at_failed=:
4727 at_fn_check_status 0 $at_status "$at_srcdir/mime-get-part.at:9"
4728 $at_failed && at_fn_log_failure
4729 $at_traceon; }
4730
4731
4732 set +x
4733 $at_times_p && times >"$at_times_file"
4734 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4735 read at_status <"$at_status_file"
4736 #AT_STOP_45
4737 #AT_START_46
4738 at_fn_group_banner 46 'mime-add-part.at:7' \
4739 "mu-mime-add-part and mu-mime-get-message" " " 4
4740 at_xfail=no
4741 (
4742 printf "%s\n" "46. $at_setup_line: testing $at_desc ..."
4743 $at_traceon
4744
4745
4746
4747 cat >input.scm <<'_ATEOF'
4748 (use-modules ((mailutils mailutils))
4749 ((mailutils ancilla)))
4750 (mu-register-format "mbox")
4751
4752 (use-modules ((ice-9 regex))
4753 ((ice-9 binary-ports)))
4754
4755 (let ((mime (mu-mime-create)))
4756 (mu-mime-add-part mime (test-message))
4757 (mu-mime-add-part mime (test-message))
4758 (let ((msg (mu-mime-get-message mime)))
4759 (let* ((hdr (mu-message-get-header msg "Content-Type"))
4760 (m (string-match "^multipart/mixed; boundary=\"(.*)\"" hdr))
4761 (bnd (match:substring m 1)))
4762 (let ((s (with-output-to-string
4763 (lambda ()
4764 (let ((port (mu-message-get-port msg "r" #t)))
4765 (do ((c (get-u8 port) (get-u8 port)))
4766 ((eof-object? c))
4767 (put-u8 (current-output-port) c))
4768 (close port))))))
4769 (regexp-substitute/global
4770 (current-output-port)
4771 (make-regexp (regexp-quote bnd))
4772 s
4773 'pre "BOUNDARY" 'post)))))
4774 _ATEOF
4775
4776
4777
4778
4779
4780 cp -r $abs_top_srcdir/testsuite/spool/mime.msg mbox
4781 if test -e mbox/mime.msg; then
4782
4783 # First, set all modes to +w
4784 find mbox/mime.msg | xargs chmod +w
4785 # Then, remove executable bit from regular files
4786 find mbox/mime.msg -type f | xargs chmod -x
4787
4788 else
4789
4790 # First, set all modes to +w
4791 find mbox | xargs chmod +w
4792 # Then, remove executable bit from regular files
4793 find mbox -type f | xargs chmod -x
4794
4795 fi
4796
4797
4798
4799 { set +x
4800 printf "%s\n" "$at_srcdir/mime-add-part.at:9: TZ=0 guile -q --no-auto-compile -L \$LIBMU_SCM_ROOT -L \$LIBMU_SCM_SRCDIR -s input.scm 2>err
4801 rc=\$?
4802 grep -v '^;;;' err>&2
4803 exit \$rc"
4804 at_fn_check_prepare_notrace 'an embedded newline' "mime-add-part.at:9"
4805 ( $at_check_trace; TZ=0 guile -q --no-auto-compile -L $LIBMU_SCM_ROOT -L $LIBMU_SCM_SRCDIR -s input.scm 2>err
4806 rc=$?
4807 grep -v '^;;;' err>&2
4808 exit $rc
4809 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4810 at_status=$? at_failed=false
4811 $at_check_filter
4812 at_fn_diff_devnull "$at_stderr" || at_failed=:
4813 echo >>"$at_stdout"; printf "%s\n" "MIME-Version: 1.0
4814 Content-Type: multipart/mixed; boundary=\"BOUNDARY\"
4815
4816 --BOUNDARY
4817 From: [email protected]
4818 To: [email protected]
4819 Subject: De omnibus rebus et quibusdam aliis
4820
4821 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
4822 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
4823 quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
4824 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
4825 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
4826 non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4827
4828 --BOUNDARY
4829 From: [email protected]
4830 To: [email protected]
4831 Subject: De omnibus rebus et quibusdam aliis
4832
4833 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
4834 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
4835 quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
4836 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
4837 cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
4838 non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4839
4840 --BOUNDARY--
4841 " | \
4842 $at_diff - "$at_stdout" || at_failed=:
4843 at_fn_check_status 0 $at_status "$at_srcdir/mime-add-part.at:9"
4844 $at_failed && at_fn_log_failure
4845 $at_traceon; }
4846
4847
4848 set +x
4849 $at_times_p && times >"$at_times_file"
4850 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4851 read at_status <"$at_status_file"
4852 #AT_STOP_46