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