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='mail'
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;version.at:19;mail version;;
5942;nohome.at:17;reading mail with HOME unset;nohome;
5953;cols00.at:17;setting columns from environment;columns cols00;
5964;cols01.at:17;setting columns;columns cols01;
5975;copy00.at:17;copy to stdout;copy copy00;
5986;copy01.at:17;copy: % expansion;copy copy01;
5997;copy02.at:17;copy: + expansion;copy copy02;
6008;copy03.at:17;copy: & expansion;copy copy03;
6019;copy04.at:17;copy: # expansion;copy copy04;
60210;align.at:23;header alignment;header alignment;
60311;D.at:19;date formats;date format;
60412;hold.at:54;read (nohold);;
60513;hold.at:92;read (hold);;
60614;hold.at:130;touch (nohold);;
60715;hold.at:162;touch (hold);;
60816;hold.at:194;save (nohold nokeepsave);;
60917;hold.at:229;save (nohold keepsave);;
61018;hold.at:272;save (hold keepsave);;
61119;hold.at:315;save (hold nokeepsave);;
61220;send.at:17;send;;
61321;sendrec.at:17;send (record);;
61422;sendbyname.at:17;send -F;;
615"
616# List of the all the test groups.
617at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
618
619# at_fn_validate_ranges NAME...
620# -----------------------------
621# Validate and normalize the test group number contained in each variable
622# NAME. Leading zeroes are treated as decimal.
623at_fn_validate_ranges ()
624{
625  for at_grp
626  do
627    eval at_value=\$$at_grp
628    if test $at_value -lt 1 || test $at_value -gt 22; then
629      $as_echo "invalid test group: $at_value" >&2
630      exit 1
631    fi
632    case $at_value in
633      0*) # We want to treat leading 0 as decimal, like expr and test, but
634	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
635	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
636	  # expr fork, but it is not worth the effort to determine if the
637	  # shell supports XSI when the user can just avoid leading 0.
638	  eval $at_grp='`expr $at_value + 0`' ;;
639    esac
640  done
641}
642
643at_prev=
644for at_option
645do
646  # If the previous option needs an argument, assign it.
647  if test -n "$at_prev"; then
648    at_option=$at_prev=$at_option
649    at_prev=
650  fi
651
652  case $at_option in
653  *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
654  *)    at_optarg= ;;
655  esac
656
657  # Accept the important Cygnus configure options, so we can diagnose typos.
658
659  case $at_option in
660    --help | -h )
661	at_help_p=:
662	;;
663
664    --list | -l )
665	at_list_p=:
666	;;
667
668    --version | -V )
669	at_version_p=:
670	;;
671
672    --clean | -c )
673	at_clean=:
674	;;
675
676    --color )
677	at_color=always
678	;;
679    --color=* )
680	case $at_optarg in
681	no | never | none) at_color=never ;;
682	auto | tty | if-tty) at_color=auto ;;
683	always | yes | force) at_color=always ;;
684	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
685	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
686	esac
687	;;
688
689    --debug | -d )
690	at_debug_p=:
691	;;
692
693    --errexit | -e )
694	at_debug_p=:
695	at_errexit_p=:
696	;;
697
698    --verbose | -v )
699	at_verbose=; at_quiet=:
700	;;
701
702    --trace | -x )
703	at_traceon='set -x'
704	at_trace_echo=echo
705	at_check_filter_trace=at_fn_filter_trace
706	;;
707
708    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
709	at_fn_validate_ranges at_option
710	as_fn_append at_groups "$at_option$as_nl"
711	;;
712
713    # Ranges
714    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
715	at_range_start=`echo $at_option |tr -d X-`
716	at_fn_validate_ranges at_range_start
717	at_range=`$as_echo "$at_groups_all" | \
718	  sed -ne '/^'$at_range_start'$/,$p'`
719	as_fn_append at_groups "$at_range$as_nl"
720	;;
721
722    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
723	at_range_end=`echo $at_option |tr -d X-`
724	at_fn_validate_ranges at_range_end
725	at_range=`$as_echo "$at_groups_all" | \
726	  sed -ne '1,/^'$at_range_end'$/p'`
727	as_fn_append at_groups "$at_range$as_nl"
728	;;
729
730    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
731    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
732    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
733    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
734    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
735    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
736	at_range_start=`expr $at_option : '\(.*\)-'`
737	at_range_end=`expr $at_option : '.*-\(.*\)'`
738	if test $at_range_start -gt $at_range_end; then
739	  at_tmp=$at_range_end
740	  at_range_end=$at_range_start
741	  at_range_start=$at_tmp
742	fi
743	at_fn_validate_ranges at_range_start at_range_end
744	at_range=`$as_echo "$at_groups_all" | \
745	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
746	as_fn_append at_groups "$at_range$as_nl"
747	;;
748
749    # Directory selection.
750    --directory | -C )
751	at_prev=--directory
752	;;
753    --directory=* )
754	at_change_dir=:
755	at_dir=$at_optarg
756	if test x- = "x$at_dir" ; then
757	  at_dir=./-
758	fi
759	;;
760
761    # Parallel execution.
762    --jobs | -j )
763	at_jobs=0
764	;;
765    --jobs=* | -j[0-9]* )
766	if test -n "$at_optarg"; then
767	  at_jobs=$at_optarg
768	else
769	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
770	fi
771	case $at_jobs in *[!0-9]*)
772	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
773	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
774	esac
775	;;
776
777    # Keywords.
778    --keywords | -k )
779	at_prev=--keywords
780	;;
781    --keywords=* )
782	at_groups_selected=$at_help_all
783	at_save_IFS=$IFS
784	IFS=,
785	set X $at_optarg
786	shift
787	IFS=$at_save_IFS
788	for at_keyword
789	do
790	  at_invert=
791	  case $at_keyword in
792	  '!'*)
793	    at_invert="-v"
794	    at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
795	    ;;
796	  esac
797	  # It is on purpose that we match the test group titles too.
798	  at_groups_selected=`$as_echo "$at_groups_selected" |
799	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
800	done
801	# Smash the keywords.
802	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
803	as_fn_append at_groups "$at_groups_selected$as_nl"
804	;;
805    --recheck)
806	at_recheck=:
807	;;
808
809    *=*)
810	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
811	# Reject names that are not valid shell variable names.
812	case $at_envvar in
813	  '' | [0-9]* | *[!_$as_cr_alnum]* )
814	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
815	esac
816	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
817	# Export now, but save eval for later and for debug scripts.
818	export $at_envvar
819	as_fn_append at_debug_args " $at_envvar='$at_value'"
820	;;
821
822     *) $as_echo "$as_me: invalid option: $at_option" >&2
823	$as_echo "Try \`$0 --help' for more information." >&2
824	exit 1
825	;;
826  esac
827done
828
829# Verify our last option didn't require an argument
830if test -n "$at_prev"; then :
831  as_fn_error $? "\`$at_prev' requires an argument"
832fi
833
834# The file containing the suite.
835at_suite_log=$at_dir/$as_me.log
836
837# Selected test groups.
838if test -z "$at_groups$at_recheck"; then
839  at_groups=$at_groups_all
840else
841  if test -n "$at_recheck" && test -r "$at_suite_log"; then
842    at_oldfails=`sed -n '
843      /^Failed tests:$/,/^Skipped tests:$/{
844	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
845      }
846      /^Unexpected passes:$/,/^## Detailed failed tests/{
847	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
848      }
849      /^## Detailed failed tests/q
850      ' "$at_suite_log"`
851    as_fn_append at_groups "$at_oldfails$as_nl"
852  fi
853  # Sort the tests, removing duplicates.
854  at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
855fi
856
857if test x"$at_color" = xalways \
858   || { test x"$at_color" = xauto && test -t 1; }; then
859  at_red=`printf '\033[0;31m'`
860  at_grn=`printf '\033[0;32m'`
861  at_lgn=`printf '\033[1;32m'`
862  at_blu=`printf '\033[1;34m'`
863  at_std=`printf '\033[m'`
864else
865  at_red= at_grn= at_lgn= at_blu= at_std=
866fi
867
868# Help message.
869if $at_help_p; then
870  cat <<_ATEOF || at_write_fail=1
871Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
872
873Run all the tests, or the selected TESTS, given by numeric ranges, and
874save a detailed log file.  Upon failure, create debugging scripts.
875
876Do not change environment variables directly.  Instead, set them via
877command line arguments.  Set \`AUTOTEST_PATH' to select the executables
878to exercise.  Each relative directory is expanded as build and source
879directories relative to the top level of this distribution.
880E.g., from within the build directory /tmp/foo-1.0, invoking this:
881
882  $ $0 AUTOTEST_PATH=bin
883
884is equivalent to the following, assuming the source directory is /src/foo-1.0:
885
886  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
887_ATEOF
888cat <<_ATEOF || at_write_fail=1
889
890Operation modes:
891  -h, --help     print the help message, then exit
892  -V, --version  print version number, then exit
893  -c, --clean    remove all the files this test suite might create and exit
894  -l, --list     describes all the tests, or the selected TESTS
895_ATEOF
896cat <<_ATEOF || at_write_fail=1
897
898Execution tuning:
899  -C, --directory=DIR
900                 change to directory DIR before starting
901      --color[=never|auto|always]
902                 enable colored test results on terminal, or always
903  -j, --jobs[=N]
904                 Allow N jobs at once; infinite jobs with no arg (default 1)
905  -k, --keywords=KEYWORDS
906                 select the tests matching all the comma-separated KEYWORDS
907                 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
908      --recheck  select all tests that failed or passed unexpectedly last time
909  -e, --errexit  abort as soon as a test fails; implies --debug
910  -v, --verbose  force more detailed output
911                 default for debugging scripts
912  -d, --debug    inhibit clean up and top-level logging
913                 default for debugging scripts
914  -x, --trace    enable tests shell tracing
915_ATEOF
916cat <<_ATEOF || at_write_fail=1
917
918Report bugs to <bug-mailutils@gnu.org>.
919General help using GNU software: <http://www.gnu.org/gethelp/>.
920_ATEOF
921  exit $at_write_fail
922fi
923
924# List of tests.
925if $at_list_p; then
926  cat <<_ATEOF || at_write_fail=1
927GNU Mailutils 3.13 test suite test groups:
928
929 NUM: FILE-NAME:LINE     TEST-GROUP-NAME
930      KEYWORDS
931
932_ATEOF
933  # Pass an empty line as separator between selected groups and help.
934  $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
935    awk 'NF == 1 && FS != ";" {
936	   selected[$ 1] = 1
937	   next
938	 }
939	 /^$/ { FS = ";" }
940	 NF > 0 {
941	   if (selected[$ 1]) {
942	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
943	     if ($ 4) {
944	       lmax = 79
945	       indent = "     "
946	       line = indent
947	       len = length (line)
948	       n = split ($ 4, a, " ")
949	       for (i = 1; i <= n; i++) {
950		 l = length (a[i]) + 1
951		 if (i > 1 && len + l > lmax) {
952		   print line
953		   line = indent " " a[i]
954		   len = length (line)
955		 } else {
956		   line = line " " a[i]
957		   len += l
958		 }
959	       }
960	       if (n)
961		 print line
962	     }
963	   }
964	 }' || at_write_fail=1
965  exit $at_write_fail
966fi
967if $at_version_p; then
968  $as_echo "$as_me (GNU Mailutils 3.13)" &&
969  cat <<\_ATEOF || at_write_fail=1
970
971Copyright (C) 2012 Free Software Foundation, Inc.
972This test suite is free software; the Free Software Foundation gives
973unlimited permission to copy, distribute and modify it.
974_ATEOF
975  exit $at_write_fail
976fi
977
978# Should we print banners?  Yes if more than one test is run.
979case $at_groups in #(
980  *$as_nl* )
981      at_print_banners=: ;; #(
982  * ) at_print_banners=false ;;
983esac
984# Text for banner N, set to a single space once printed.
985# Banner 1. hold.at:52
986# Category starts at test group 12.
987at_banner_text_1="hold and keepsave variables"
988# Banner 2. testsuite.at:37
989# Category starts at test group 20.
990at_banner_text_2="Sending and replying"
991
992# Take any -C into account.
993if $at_change_dir ; then
994  test x != "x$at_dir" && cd "$at_dir" \
995    || as_fn_error $? "unable to change directory"
996  at_dir=`pwd`
997fi
998
999# Load the config files for any default variable assignments.
1000for at_file in atconfig atlocal
1001do
1002  test -r $at_file || continue
1003  . ./$at_file || as_fn_error $? "invalid content: $at_file"
1004done
1005
1006# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1007: "${at_top_build_prefix=$at_top_builddir}"
1008
1009# Perform any assignments requested during argument parsing.
1010eval "$at_debug_args"
1011
1012# atconfig delivers names relative to the directory the test suite is
1013# in, but the groups themselves are run in testsuite-dir/group-dir.
1014if test -n "$at_top_srcdir"; then
1015  builddir=../..
1016  for at_dir_var in srcdir top_srcdir top_build_prefix
1017  do
1018    eval at_val=\$at_$at_dir_var
1019    case $at_val in
1020      [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1021      *) at_prefix=../../ ;;
1022    esac
1023    eval "$at_dir_var=\$at_prefix\$at_val"
1024  done
1025fi
1026
1027## -------------------- ##
1028## Directory structure. ##
1029## -------------------- ##
1030
1031# This is the set of directories and files used by this script
1032# (non-literals are capitalized):
1033#
1034# TESTSUITE         - the testsuite
1035# TESTSUITE.log     - summarizes the complete testsuite run
1036# TESTSUITE.dir/    - created during a run, remains after -d or failed test
1037# + at-groups/      - during a run: status of all groups in run
1038# | + NNN/          - during a run: meta-data about test group NNN
1039# | | + check-line  - location (source file and line) of current AT_CHECK
1040# | | + status      - exit status of current AT_CHECK
1041# | | + stdout      - stdout of current AT_CHECK
1042# | | + stder1      - stderr, including trace
1043# | | + stderr      - stderr, with trace filtered out
1044# | | + test-source - portion of testsuite that defines group
1045# | | + times       - timestamps for computing duration
1046# | | + pass        - created if group passed
1047# | | + xpass       - created if group xpassed
1048# | | + fail        - created if group failed
1049# | | + xfail       - created if group xfailed
1050# | | + skip        - created if group skipped
1051# + at-stop         - during a run: end the run if this file exists
1052# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1053# + 0..NNN/         - created for each group NNN, remains after -d or failed test
1054# | + TESTSUITE.log - summarizes the group results
1055# | + ...           - files created during the group
1056
1057# The directory the whole suite works in.
1058# Should be absolute to let the user `cd' at will.
1059at_suite_dir=$at_dir/$as_me.dir
1060# The file containing the suite ($at_dir might have changed since earlier).
1061at_suite_log=$at_dir/$as_me.log
1062# The directory containing helper files per test group.
1063at_helper_dir=$at_suite_dir/at-groups
1064# Stop file: if it exists, do not start new jobs.
1065at_stop_file=$at_suite_dir/at-stop
1066# The fifo used for the job dispatcher.
1067at_job_fifo=$at_suite_dir/at-job-fifo
1068
1069if $at_clean; then
1070  test -d "$at_suite_dir" &&
1071    find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1072  rm -f -r "$at_suite_dir" "$at_suite_log"
1073  exit $?
1074fi
1075
1076# Don't take risks: use only absolute directories in PATH.
1077#
1078# For stand-alone test suites (ie. atconfig was not found),
1079# AUTOTEST_PATH is relative to `.'.
1080#
1081# For embedded test suites, AUTOTEST_PATH is relative to the top level
1082# of the package.  Then expand it into build/src parts, since users
1083# may create executables in both places.
1084AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1085at_path=
1086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1087for as_dir in $AUTOTEST_PATH $PATH
1088do
1089  IFS=$as_save_IFS
1090  test -z "$as_dir" && as_dir=.
1091    test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1092case $as_dir in
1093  [\\/]* | ?:[\\/]* )
1094    as_fn_append at_path "$as_dir"
1095    ;;
1096  * )
1097    if test -z "$at_top_build_prefix"; then
1098      # Stand-alone test suite.
1099      as_fn_append at_path "$as_dir"
1100    else
1101      # Embedded test suite.
1102      as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1103      as_fn_append at_path "$at_top_srcdir/$as_dir"
1104    fi
1105    ;;
1106esac
1107  done
1108IFS=$as_save_IFS
1109
1110
1111# Now build and simplify PATH.
1112#
1113# There might be directories that don't exist, but don't redirect
1114# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1115at_new_path=
1116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1117for as_dir in $at_path
1118do
1119  IFS=$as_save_IFS
1120  test -z "$as_dir" && as_dir=.
1121    test -d "$as_dir" || continue
1122case $as_dir in
1123  [\\/]* | ?:[\\/]* ) ;;
1124  * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1125esac
1126case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1127  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1128  $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1129  *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1130esac
1131  done
1132IFS=$as_save_IFS
1133
1134PATH=$at_new_path
1135export PATH
1136
1137# Setting up the FDs.
1138
1139
1140
1141# 5 is the log file.  Not to be overwritten if `-d'.
1142if $at_debug_p; then
1143  at_suite_log=/dev/null
1144else
1145  : >"$at_suite_log"
1146fi
1147exec 5>>"$at_suite_log"
1148
1149# Banners and logs.
1150$as_echo "## ------------------------------ ##
1151## GNU Mailutils 3.13 test suite. ##
1152## ------------------------------ ##"
1153{
1154  $as_echo "## ------------------------------ ##
1155## GNU Mailutils 3.13 test suite. ##
1156## ------------------------------ ##"
1157  echo
1158
1159  $as_echo "$as_me: command line was:"
1160  $as_echo "  \$ $0 $at_cli_args"
1161  echo
1162
1163  # If ChangeLog exists, list a few lines in case it might help determining
1164  # the exact version.
1165  if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1166    $as_echo "## ---------- ##
1167## ChangeLog. ##
1168## ---------- ##"
1169    echo
1170    sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1171    echo
1172  fi
1173
1174  {
1175cat <<_ASUNAME
1176## --------- ##
1177## Platform. ##
1178## --------- ##
1179
1180hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1181uname -m = `(uname -m) 2>/dev/null || echo unknown`
1182uname -r = `(uname -r) 2>/dev/null || echo unknown`
1183uname -s = `(uname -s) 2>/dev/null || echo unknown`
1184uname -v = `(uname -v) 2>/dev/null || echo unknown`
1185
1186/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1187/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1188
1189/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1190/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1191/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1192/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1193/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1194/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1195/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1196
1197_ASUNAME
1198
1199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1200for as_dir in $PATH
1201do
1202  IFS=$as_save_IFS
1203  test -z "$as_dir" && as_dir=.
1204    $as_echo "PATH: $as_dir"
1205  done
1206IFS=$as_save_IFS
1207
1208}
1209  echo
1210
1211  # Contents of the config files.
1212  for at_file in atconfig atlocal
1213  do
1214    test -r $at_file || continue
1215    $as_echo "$as_me: $at_file:"
1216    sed 's/^/| /' $at_file
1217    echo
1218  done
1219} >&5
1220
1221# This setting is needed on FreeBSD to ensure the LD_LIBRARY_PATH overrides
1222# the DT_RPATH tag in ELF header.  See
1223# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27510
1224# for details.
1225LD_LIBRARY_PATH_RPATH=y
1226export LD_LIBRARY_PATH_RPATH
1227
1228
1229## ------------------------- ##
1230## Autotest shell functions. ##
1231## ------------------------- ##
1232
1233# at_fn_banner NUMBER
1234# -------------------
1235# Output banner NUMBER, provided the testsuite is running multiple groups and
1236# this particular banner has not yet been printed.
1237at_fn_banner ()
1238{
1239  $at_print_banners || return 0
1240  eval at_banner_text=\$at_banner_text_$1
1241  test "x$at_banner_text" = "x " && return 0
1242  eval "at_banner_text_$1=\" \""
1243  if test -z "$at_banner_text"; then
1244    $at_first || echo
1245  else
1246    $as_echo "$as_nl$at_banner_text$as_nl"
1247  fi
1248} # at_fn_banner
1249
1250# at_fn_check_prepare_notrace REASON LINE
1251# ---------------------------------------
1252# Perform AT_CHECK preparations for the command at LINE for an untraceable
1253# command; REASON is the reason for disabling tracing.
1254at_fn_check_prepare_notrace ()
1255{
1256  $at_trace_echo "Not enabling shell tracing (command contains $1)"
1257  $as_echo "$2" >"$at_check_line_file"
1258  at_check_trace=: at_check_filter=:
1259  : >"$at_stdout"; : >"$at_stderr"
1260}
1261
1262# at_fn_check_prepare_trace LINE
1263# ------------------------------
1264# Perform AT_CHECK preparations for the command at LINE for a traceable
1265# command.
1266at_fn_check_prepare_trace ()
1267{
1268  $as_echo "$1" >"$at_check_line_file"
1269  at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1270  : >"$at_stdout"; : >"$at_stderr"
1271}
1272
1273# at_fn_check_prepare_dynamic COMMAND LINE
1274# ----------------------------------------
1275# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1276# preparation function.
1277at_fn_check_prepare_dynamic ()
1278{
1279  case $1 in
1280    *$as_nl*)
1281      at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1282    *)
1283      at_fn_check_prepare_trace "$2" ;;
1284  esac
1285}
1286
1287# at_fn_filter_trace
1288# ------------------
1289# Remove the lines in the file "$at_stderr" generated by "set -x" and print
1290# them to stderr.
1291at_fn_filter_trace ()
1292{
1293  mv "$at_stderr" "$at_stder1"
1294  grep '^ *+' "$at_stder1" >&2
1295  grep -v '^ *+' "$at_stder1" >"$at_stderr"
1296}
1297
1298# at_fn_log_failure FILE-LIST
1299# ---------------------------
1300# Copy the files in the list on stdout with a "> " prefix, and exit the shell
1301# with a failure exit code.
1302at_fn_log_failure ()
1303{
1304  for file
1305    do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1306  echo 1 > "$at_status_file"
1307  exit 1
1308}
1309
1310# at_fn_check_skip EXIT-CODE LINE
1311# -------------------------------
1312# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1313# the test group subshell with that same exit code. Use LINE in any report
1314# about test failure.
1315at_fn_check_skip ()
1316{
1317  case $1 in
1318    99) echo 99 > "$at_status_file"; at_failed=:
1319	$as_echo "$2: hard failure"; exit 99;;
1320    77) echo 77 > "$at_status_file"; exit 77;;
1321  esac
1322}
1323
1324# at_fn_check_status EXPECTED EXIT-CODE LINE
1325# ------------------------------------------
1326# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1327# Otherwise, if it is 77 or 99, exit the test group subshell with that same
1328# exit code; if it is anything else print an error message referring to LINE,
1329# and fail the test.
1330at_fn_check_status ()
1331{
1332  case $2 in
1333    $1 ) ;;
1334    77) echo 77 > "$at_status_file"; exit 77;;
1335    99) echo 99 > "$at_status_file"; at_failed=:
1336	$as_echo "$3: hard failure"; exit 99;;
1337    *) $as_echo "$3: exit code was $2, expected $1"
1338      at_failed=:;;
1339  esac
1340}
1341
1342# at_fn_diff_devnull FILE
1343# -----------------------
1344# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1345# invocations.
1346at_fn_diff_devnull ()
1347{
1348  test -s "$1" || return 0
1349  $at_diff "$at_devnull" "$1"
1350}
1351
1352# at_fn_test NUMBER
1353# -----------------
1354# Parse out test NUMBER from the tail of this file.
1355at_fn_test ()
1356{
1357  eval at_sed=\$at_sed$1
1358  sed "$at_sed" "$at_myself" > "$at_test_source"
1359}
1360
1361# at_fn_create_debugging_script
1362# -----------------------------
1363# Create the debugging script $at_group_dir/run which will reproduce the
1364# current test group.
1365at_fn_create_debugging_script ()
1366{
1367  {
1368    echo "#! /bin/sh" &&
1369    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1370    $as_echo "cd '$at_dir'" &&
1371    $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1372    echo 'exit 1'
1373  } >"$at_group_dir/run" &&
1374  chmod +x "$at_group_dir/run"
1375}
1376
1377## -------------------------------- ##
1378## End of autotest shell functions. ##
1379## -------------------------------- ##
1380{
1381  $as_echo "## ---------------- ##
1382## Tested programs. ##
1383## ---------------- ##"
1384  echo
1385} >&5
1386
1387# Report what programs are being tested.
1388for at_program in : $at_tested
1389do
1390  test "$at_program" = : && continue
1391  case $at_program in
1392    [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1393    * )
1394    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1395for as_dir in $PATH
1396do
1397  IFS=$as_save_IFS
1398  test -z "$as_dir" && as_dir=.
1399    test -f "$as_dir/$at_program" && break
1400  done
1401IFS=$as_save_IFS
1402
1403    at_program_=$as_dir/$at_program ;;
1404  esac
1405  if test -f "$at_program_"; then
1406    {
1407      $as_echo "$at_srcdir/testsuite.at:21: $at_program_ --version"
1408      "$at_program_" --version </dev/null
1409      echo
1410    } >&5 2>&1
1411  else
1412    as_fn_error $? "cannot find $at_program" "$LINENO" 5
1413  fi
1414done
1415
1416{
1417  $as_echo "## ------------------ ##
1418## Running the tests. ##
1419## ------------------ ##"
1420} >&5
1421
1422at_start_date=`date`
1423at_start_time=`date +%s 2>/dev/null`
1424$as_echo "$as_me: starting at: $at_start_date" >&5
1425
1426# Create the master directory if it doesn't already exist.
1427as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1428  as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1429
1430# Can we diff with `/dev/null'?  DU 5.0 refuses.
1431if diff /dev/null /dev/null >/dev/null 2>&1; then
1432  at_devnull=/dev/null
1433else
1434  at_devnull=$at_suite_dir/devnull
1435  >"$at_devnull"
1436fi
1437
1438# Use `diff -u' when possible.
1439if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1440then
1441  at_diff='diff -u'
1442else
1443  at_diff=diff
1444fi
1445
1446# Get the last needed group.
1447for at_group in : $at_groups; do :; done
1448
1449# Extract the start and end lines of each test group at the tail
1450# of this file
1451awk '
1452BEGIN { FS="" }
1453/^#AT_START_/ {
1454  start = NR
1455}
1456/^#AT_STOP_/ {
1457  test = substr ($ 0, 10)
1458  print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1459  if (test == "'"$at_group"'") exit
1460}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1461. "$at_suite_dir/at-source-lines" ||
1462  as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1463rm -f "$at_suite_dir/at-source-lines"
1464
1465# Set number of jobs for `-j'; avoid more jobs than test groups.
1466set X $at_groups; shift; at_max_jobs=$#
1467if test $at_max_jobs -eq 0; then
1468  at_jobs=1
1469fi
1470if test $at_jobs -ne 1 &&
1471   { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1472  at_jobs=$at_max_jobs
1473fi
1474
1475# If parallel mode, don't output banners, don't split summary lines.
1476if test $at_jobs -ne 1; then
1477  at_print_banners=false
1478  at_quiet=:
1479fi
1480
1481# Set up helper dirs.
1482rm -rf "$at_helper_dir" &&
1483mkdir "$at_helper_dir" &&
1484cd "$at_helper_dir" &&
1485{ test -z "$at_groups" || mkdir $at_groups; } ||
1486as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1487
1488# Functions for running a test group.  We leave the actual
1489# test group execution outside of a shell function in order
1490# to avoid hitting zsh 4.x exit status bugs.
1491
1492# at_fn_group_prepare
1493# -------------------
1494# Prepare for running a test group.
1495at_fn_group_prepare ()
1496{
1497  # The directory for additional per-group helper files.
1498  at_job_dir=$at_helper_dir/$at_group
1499  # The file containing the location of the last AT_CHECK.
1500  at_check_line_file=$at_job_dir/check-line
1501  # The file containing the exit status of the last command.
1502  at_status_file=$at_job_dir/status
1503  # The files containing the output of the tested commands.
1504  at_stdout=$at_job_dir/stdout
1505  at_stder1=$at_job_dir/stder1
1506  at_stderr=$at_job_dir/stderr
1507  # The file containing the code for a test group.
1508  at_test_source=$at_job_dir/test-source
1509  # The file containing dates.
1510  at_times_file=$at_job_dir/times
1511
1512  # Be sure to come back to the top test directory.
1513  cd "$at_suite_dir"
1514
1515  # Clearly separate the test groups when verbose.
1516  $at_first || $at_verbose echo
1517
1518  at_group_normalized=$at_group
1519
1520  eval 'while :; do
1521    case $at_group_normalized in #(
1522    '"$at_format"'*) break;;
1523    esac
1524    at_group_normalized=0$at_group_normalized
1525  done'
1526
1527
1528  # Create a fresh directory for the next test group, and enter.
1529  # If one already exists, the user may have invoked ./run from
1530  # within that directory; we remove the contents, but not the
1531  # directory itself, so that we aren't pulling the rug out from
1532  # under the shell's notion of the current directory.
1533  at_group_dir=$at_suite_dir/$at_group_normalized
1534  at_group_log=$at_group_dir/$as_me.log
1535  if test -d "$at_group_dir"; then
1536  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1537  rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1538fi ||
1539    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1540$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1541  # Be tolerant if the above `rm' was not able to remove the directory.
1542  as_dir="$at_group_dir"; as_fn_mkdir_p
1543
1544  echo 0 > "$at_status_file"
1545
1546  # In verbose mode, append to the log file *and* show on
1547  # the standard output; in quiet mode only write to the log.
1548  if test -z "$at_verbose"; then
1549    at_tee_pipe='tee -a "$at_group_log"'
1550  else
1551    at_tee_pipe='cat >> "$at_group_log"'
1552  fi
1553}
1554
1555# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1556# -------------------------------------------------
1557# Declare the test group ORDINAL, located at LINE with group description DESC,
1558# and residing under BANNER. Use PAD to align the status column.
1559at_fn_group_banner ()
1560{
1561  at_setup_line="$2"
1562  test -n "$5" && at_fn_banner $5
1563  at_desc="$3"
1564  case $1 in
1565    [0-9])      at_desc_line="  $1: ";;
1566    [0-9][0-9]) at_desc_line=" $1: " ;;
1567    *)          at_desc_line="$1: "  ;;
1568  esac
1569  as_fn_append at_desc_line "$3$4"
1570  $at_quiet $as_echo_n "$at_desc_line"
1571  echo "#                             -*- compilation -*-" >> "$at_group_log"
1572}
1573
1574# at_fn_group_postprocess
1575# -----------------------
1576# Perform cleanup after running a test group.
1577at_fn_group_postprocess ()
1578{
1579  # Be sure to come back to the suite directory, in particular
1580  # since below we might `rm' the group directory we are in currently.
1581  cd "$at_suite_dir"
1582
1583  if test ! -f "$at_check_line_file"; then
1584    sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1585      A failure happened in a test group before any test could be
1586      run. This means that test suite is improperly designed.  Please
1587      report this failure to <bug-mailutils@gnu.org>.
1588_ATEOF
1589    $as_echo "$at_setup_line" >"$at_check_line_file"
1590    at_status=99
1591  fi
1592  $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1593  $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1594  case $at_xfail:$at_status in
1595    yes:0)
1596	at_msg="UNEXPECTED PASS"
1597	at_res=xpass
1598	at_errexit=$at_errexit_p
1599	at_color=$at_red
1600	;;
1601    no:0)
1602	at_msg="ok"
1603	at_res=pass
1604	at_errexit=false
1605	at_color=$at_grn
1606	;;
1607    *:77)
1608	at_msg='skipped ('`cat "$at_check_line_file"`')'
1609	at_res=skip
1610	at_errexit=false
1611	at_color=$at_blu
1612	;;
1613    no:* | *:99)
1614	at_msg='FAILED ('`cat "$at_check_line_file"`')'
1615	at_res=fail
1616	at_errexit=$at_errexit_p
1617	at_color=$at_red
1618	;;
1619    yes:*)
1620	at_msg='expected failure ('`cat "$at_check_line_file"`')'
1621	at_res=xfail
1622	at_errexit=false
1623	at_color=$at_lgn
1624	;;
1625  esac
1626  echo "$at_res" > "$at_job_dir/$at_res"
1627  # In parallel mode, output the summary line only afterwards.
1628  if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1629    $as_echo "$at_desc_line $at_color$at_msg$at_std"
1630  else
1631    # Make sure there is a separator even with long titles.
1632    $as_echo " $at_color$at_msg$at_std"
1633  fi
1634  at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1635  case $at_status in
1636    0|77)
1637      # $at_times_file is only available if the group succeeded.
1638      # We're not including the group log, so the success message
1639      # is written in the global log separately.  But we also
1640      # write to the group log in case they're using -d.
1641      if test -f "$at_times_file"; then
1642	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1643	rm -f "$at_times_file"
1644      fi
1645      $as_echo "$at_log_msg" >> "$at_group_log"
1646      $as_echo "$at_log_msg" >&5
1647
1648      # Cleanup the group directory, unless the user wants the files
1649      # or the success was unexpected.
1650      if $at_debug_p || test $at_res = xpass; then
1651	at_fn_create_debugging_script
1652	if test $at_res = xpass && $at_errexit; then
1653	  echo stop > "$at_stop_file"
1654	fi
1655      else
1656	if test -d "$at_group_dir"; then
1657	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1658	  rm -fr "$at_group_dir"
1659	fi
1660	rm -f "$at_test_source"
1661      fi
1662      ;;
1663    *)
1664      # Upon failure, include the log into the testsuite's global
1665      # log.  The failure message is written in the group log.  It
1666      # is later included in the global log.
1667      $as_echo "$at_log_msg" >> "$at_group_log"
1668
1669      # Upon failure, keep the group directory for autopsy, and create
1670      # the debugging script.  With -e, do not start any further tests.
1671      at_fn_create_debugging_script
1672      if $at_errexit; then
1673	echo stop > "$at_stop_file"
1674      fi
1675      ;;
1676  esac
1677}
1678
1679
1680## ------------ ##
1681## Driver loop. ##
1682## ------------ ##
1683
1684
1685if (set -m && set +m && set +b) >/dev/null 2>&1; then
1686  set +b
1687  at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1688else
1689  at_job_control_on=: at_job_control_off=: at_job_group=
1690fi
1691
1692for at_signal in 1 2 15; do
1693  trap 'set +x; set +e
1694	$at_job_control_off
1695	at_signal='"$at_signal"'
1696	echo stop > "$at_stop_file"
1697	trap "" $at_signal
1698	at_pgids=
1699	for at_pgid in `jobs -p 2>/dev/null`; do
1700	  at_pgids="$at_pgids $at_job_group$at_pgid"
1701	done
1702	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1703	wait
1704	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1705	  echo >&2
1706	fi
1707	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1708	set x $at_signame
1709	test 0 -gt 2 && at_signame=$at_signal
1710	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1711$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1712	as_fn_arith 128 + $at_signal && exit_status=$as_val
1713	as_fn_exit $exit_status' $at_signal
1714done
1715
1716rm -f "$at_stop_file"
1717at_first=:
1718
1719if test $at_jobs -ne 1 &&
1720     rm -f "$at_job_fifo" &&
1721     test -n "$at_job_group" &&
1722     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1723then
1724  # FIFO job dispatcher.
1725
1726  trap 'at_pids=
1727	for at_pid in `jobs -p`; do
1728	  at_pids="$at_pids $at_job_group$at_pid"
1729	done
1730	if test -n "$at_pids"; then
1731	  at_sig=TSTP
1732	  test "${TMOUT+set}" = set && at_sig=STOP
1733	  kill -$at_sig $at_pids 2>/dev/null
1734	fi
1735	kill -STOP $$
1736	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1737
1738  echo
1739  # Turn jobs into a list of numbers, starting from 1.
1740  at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1741
1742  set X $at_joblist
1743  shift
1744  for at_group in $at_groups; do
1745    $at_job_control_on 2>/dev/null
1746    (
1747      # Start one test group.
1748      $at_job_control_off
1749      if $at_first; then
1750	exec 7>"$at_job_fifo"
1751      else
1752	exec 6<&-
1753      fi
1754      trap 'set +x; set +e
1755	    trap "" PIPE
1756	    echo stop > "$at_stop_file"
1757	    echo >&7
1758	    as_fn_exit 141' PIPE
1759      at_fn_group_prepare
1760      if cd "$at_group_dir" &&
1761	 at_fn_test $at_group &&
1762	 . "$at_test_source"
1763      then :; else
1764	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1765$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1766	at_failed=:
1767      fi
1768      at_fn_group_postprocess
1769      echo >&7
1770    ) &
1771    $at_job_control_off
1772    if $at_first; then
1773      at_first=false
1774      exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1775    fi
1776    shift # Consume one token.
1777    if test $# -gt 0; then :; else
1778      read at_token <&6 || break
1779      set x $*
1780    fi
1781    test -f "$at_stop_file" && break
1782  done
1783  exec 7>&-
1784  # Read back the remaining ($at_jobs - 1) tokens.
1785  set X $at_joblist
1786  shift
1787  if test $# -gt 0; then
1788    shift
1789    for at_job
1790    do
1791      read at_token
1792    done <&6
1793  fi
1794  exec 6<&-
1795  wait
1796else
1797  # Run serially, avoid forks and other potential surprises.
1798  for at_group in $at_groups; do
1799    at_fn_group_prepare
1800    if cd "$at_group_dir" &&
1801       at_fn_test $at_group &&
1802       . "$at_test_source"; then :; else
1803      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1804$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1805      at_failed=:
1806    fi
1807    at_fn_group_postprocess
1808    test -f "$at_stop_file" && break
1809    at_first=false
1810  done
1811fi
1812
1813# Wrap up the test suite with summary statistics.
1814cd "$at_helper_dir"
1815
1816# Use ?..???? when the list must remain sorted, the faster * otherwise.
1817at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1818at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1819at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1820at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1821		 echo $f; done | sed '/?/d; s,/xpass,,'`
1822at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1823		echo $f; done | sed '/?/d; s,/fail,,'`
1824
1825set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1826shift; at_group_count=$#
1827set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1828set X $at_xfail_list; shift; at_xfail_count=$#
1829set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1830set X $at_skip_list; shift; at_skip_count=$#
1831
1832as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1833as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1834as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1835
1836# Back to the top directory.
1837cd "$at_dir"
1838rm -rf "$at_helper_dir"
1839
1840# Compute the duration of the suite.
1841at_stop_date=`date`
1842at_stop_time=`date +%s 2>/dev/null`
1843$as_echo "$as_me: ending at: $at_stop_date" >&5
1844case $at_start_time,$at_stop_time in
1845  [0-9]*,[0-9]*)
1846    as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1847    as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1848    as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1849    as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1850    as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1851    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1852    $as_echo "$as_me: test suite duration: $at_duration" >&5
1853    ;;
1854esac
1855
1856echo
1857$as_echo "## ------------- ##
1858## Test results. ##
1859## ------------- ##"
1860echo
1861{
1862  echo
1863  $as_echo "## ------------- ##
1864## Test results. ##
1865## ------------- ##"
1866  echo
1867} >&5
1868
1869if test $at_run_count = 1; then
1870  at_result="1 test"
1871  at_were=was
1872else
1873  at_result="$at_run_count tests"
1874  at_were=were
1875fi
1876if $at_errexit_p && test $at_unexpected_count != 0; then
1877  if test $at_xpass_count = 1; then
1878    at_result="$at_result $at_were run, one passed"
1879  else
1880    at_result="$at_result $at_were run, one failed"
1881  fi
1882  at_result="$at_result unexpectedly and inhibited subsequent tests."
1883  at_color=$at_red
1884else
1885  # Don't you just love exponential explosion of the number of cases?
1886  at_color=$at_red
1887  case $at_xpass_count:$at_fail_count:$at_xfail_count in
1888    # So far, so good.
1889    0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1890    0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1891
1892    # Some unexpected failures
1893    0:*:0) at_result="$at_result $at_were run,
1894$at_fail_count failed unexpectedly." ;;
1895
1896    # Some failures, both expected and unexpected
1897    0:*:1) at_result="$at_result $at_were run,
1898$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1899    0:*:*) at_result="$at_result $at_were run,
1900$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1901
1902    # No unexpected failures, but some xpasses
1903    *:0:*) at_result="$at_result $at_were run,
1904$at_xpass_count passed unexpectedly." ;;
1905
1906    # No expected failures, but failures and xpasses
1907    *:1:0) at_result="$at_result $at_were run,
1908$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1909    *:*:0) at_result="$at_result $at_were run,
1910$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1911
1912    # All of them.
1913    *:*:1) at_result="$at_result $at_were run,
1914$at_xpass_count passed unexpectedly,
1915$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1916    *:*:*) at_result="$at_result $at_were run,
1917$at_xpass_count passed unexpectedly,
1918$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1919  esac
1920
1921  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1922    at_result="All $at_result"
1923  fi
1924fi
1925
1926# Now put skips in the mix.
1927case $at_skip_count in
1928  0) ;;
1929  1) at_result="$at_result
19301 test was skipped." ;;
1931  *) at_result="$at_result
1932$at_skip_count tests were skipped." ;;
1933esac
1934
1935if test $at_unexpected_count = 0; then
1936  echo "$at_color$at_result$at_std"
1937  echo "$at_result" >&5
1938else
1939  echo "${at_color}ERROR: $at_result$at_std" >&2
1940  echo "ERROR: $at_result" >&5
1941  {
1942    echo
1943    $as_echo "## ------------------------ ##
1944## Summary of the failures. ##
1945## ------------------------ ##"
1946
1947    # Summary of failed and skipped tests.
1948    if test $at_fail_count != 0; then
1949      echo "Failed tests:"
1950      $SHELL "$at_myself" $at_fail_list --list
1951      echo
1952    fi
1953    if test $at_skip_count != 0; then
1954      echo "Skipped tests:"
1955      $SHELL "$at_myself" $at_skip_list --list
1956      echo
1957    fi
1958    if test $at_xpass_count != 0; then
1959      echo "Unexpected passes:"
1960      $SHELL "$at_myself" $at_xpass_list --list
1961      echo
1962    fi
1963    if test $at_fail_count != 0; then
1964      $as_echo "## ---------------------- ##
1965## Detailed failed tests. ##
1966## ---------------------- ##"
1967      echo
1968      for at_group in $at_fail_list
1969      do
1970	at_group_normalized=$at_group
1971
1972  eval 'while :; do
1973    case $at_group_normalized in #(
1974    '"$at_format"'*) break;;
1975    esac
1976    at_group_normalized=0$at_group_normalized
1977  done'
1978
1979	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1980	echo
1981      done
1982      echo
1983    fi
1984    if test -n "$at_top_srcdir"; then
1985      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1986## ${at_top_build_prefix}config.log ##
1987_ASBOX
1988      sed 's/^/| /' ${at_top_build_prefix}config.log
1989      echo
1990    fi
1991  } >&5
1992
1993  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1994## $as_me.log was created. ##
1995_ASBOX
1996
1997  echo
1998  if $at_debug_p; then
1999    at_msg='per-test log files'
2000  else
2001    at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2002  fi
2003  $as_echo "Please send $at_msg and all information you think might help:
2004
2005   To: <bug-mailutils@gnu.org>
2006   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}
2007
2008You may investigate any problem if you feel able to do so, in which
2009case the test suite provides a good starting point.  Its output may
2010be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2011"
2012  exit 1
2013fi
2014
2015exit 0
2016
2017## ------------- ##
2018## Actual tests. ##
2019## ------------- ##
2020#AT_START_1
2021at_fn_group_banner 1 'version.at:19' \
2022  "mail version" "                                   "
2023at_xfail=no
2024(
2025  $as_echo "1. $at_setup_line: testing $at_desc ..."
2026  $at_traceon
2027
2028
2029{ set +x
2030$as_echo "$at_srcdir/version.at:19: mail --version | sed '1{s/-[0-9][0-9]* //;s/ *\\[.*\\]//;q;}' "
2031at_fn_check_prepare_notrace 'a shell pipeline' "version.at:19"
2032( $at_check_trace; mail --version | sed '1{s/-[0-9][0-9]* //;s/ *\[.*\]//;q;}'
2033) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2034at_status=$? at_failed=false
2035$at_check_filter
2036at_fn_diff_devnull "$at_stderr" || at_failed=:
2037echo >>"$at_stdout"; $as_echo "mail (GNU Mailutils) 3.13
2038" | \
2039  $at_diff - "$at_stdout" || at_failed=:
2040at_fn_check_status 0 $at_status "$at_srcdir/version.at:19"
2041$at_failed && at_fn_log_failure
2042$at_traceon; }
2043
2044
2045  set +x
2046  $at_times_p && times >"$at_times_file"
2047) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2048read at_status <"$at_status_file"
2049#AT_STOP_1
2050#AT_START_2
2051at_fn_group_banner 2 'nohome.at:17' \
2052  "reading mail with HOME unset" "                   "
2053at_xfail=no
2054(
2055  $as_echo "2. $at_setup_line: testing $at_desc ..."
2056  $at_traceon
2057
2058
2059
2060# Description: Unsetting HOME caused undesirable effects in mail
2061# Reported-By: Dan Jacobson <jidanni@jidanni.org>
2062# References: <87vbgemcc7.fsf@jidanni.org>,
2063#    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
2064
2065{ set +x
2066$as_echo "$at_srcdir/nohome.at:25:
2067
2068
2069
2070
2071cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2072if test -e ./mbox; then
2073
2074# First, set all modes to +w
2075find ./mbox | xargs chmod +w
2076# Then, remove executable bit from regular files
2077find ./mbox -type f | xargs chmod -x
2078
2079else
2080
2081# First, set all modes to +w
2082find . | xargs chmod +w
2083# Then, remove executable bit from regular files
2084find . -type f | xargs chmod -x
2085
2086fi
2087
2088
2089
2090unset HOME
2091MAIL=./mbox MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH
2092"
2093at_fn_check_prepare_notrace 'an embedded newline' "nohome.at:25"
2094( $at_check_trace;
2095
2096
2097
2098
2099cp -r $abs_top_srcdir/testsuite/spool/mbox .
2100if test -e ./mbox; then
2101
2102# First, set all modes to +w
2103find ./mbox | xargs chmod +w
2104# Then, remove executable bit from regular files
2105find ./mbox -type f | xargs chmod -x
2106
2107else
2108
2109# First, set all modes to +w
2110find . | xargs chmod +w
2111# Then, remove executable bit from regular files
2112find . -type f | xargs chmod -x
2113
2114fi
2115
2116
2117
2118unset HOME
2119MAIL=./mbox MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH
2120
2121) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2122at_status=$? at_failed=false
2123$at_check_filter
2124at_fn_diff_devnull "$at_stderr" || at_failed=:
2125echo >>"$at_stdout"; $as_echo ">N   1 Sergey Poznyakoff  Tue Jul 16 12:11  13/391   MBOX
2126" | \
2127  $at_diff - "$at_stdout" || at_failed=:
2128at_fn_check_status 0 $at_status "$at_srcdir/nohome.at:25"
2129$at_failed && at_fn_log_failure
2130$at_traceon; }
2131
2132
2133  set +x
2134  $at_times_p && times >"$at_times_file"
2135) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2136read at_status <"$at_status_file"
2137#AT_STOP_2
2138#AT_START_3
2139at_fn_group_banner 3 'cols00.at:17' \
2140  "setting columns from environment" "               "
2141at_xfail=no
2142(
2143  $as_echo "3. $at_setup_line: testing $at_desc ..."
2144  $at_traceon
2145
2146
2147
2148# Description: Check if COLUMNS setting is honored.
2149# Reported-By: Dan Jacobson <jidanni@jidanni.org>
2150# References: <87vbgemcc7.fsf@jidanni.org>,
2151#    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
2152
2153{ set +x
2154$as_echo "$at_srcdir/cols00.at:25:
2155
2156
2157
2158
2159cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2160if test -e ./mbox; then
2161
2162# First, set all modes to +w
2163find ./mbox | xargs chmod +w
2164# Then, remove executable bit from regular files
2165find ./mbox -type f | xargs chmod -x
2166
2167else
2168
2169# First, set all modes to +w
2170find . | xargs chmod +w
2171# Then, remove executable bit from regular files
2172find . -type f | xargs chmod -x
2173
2174fi
2175
2176
2177
2178COLUMNS=26 MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=26' -f ./mbox
2179COLUMNS=31 MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -f ./mbox
2180"
2181at_fn_check_prepare_notrace 'an embedded newline' "cols00.at:25"
2182( $at_check_trace;
2183
2184
2185
2186
2187cp -r $abs_top_srcdir/testsuite/spool/mbox .
2188if test -e ./mbox; then
2189
2190# First, set all modes to +w
2191find ./mbox | xargs chmod +w
2192# Then, remove executable bit from regular files
2193find ./mbox -type f | xargs chmod -x
2194
2195else
2196
2197# First, set all modes to +w
2198find . | xargs chmod +w
2199# Then, remove executable bit from regular files
2200find . -type f | xargs chmod -x
2201
2202fi
2203
2204
2205
2206COLUMNS=26 MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=26' -f ./mbox
2207COLUMNS=31 MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -f ./mbox
2208
2209) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2210at_status=$? at_failed=false
2211$at_check_filter
2212at_fn_diff_devnull "$at_stderr" || at_failed=:
2213echo >>"$at_stdout"; $as_echo ">N   1 Sergey Poznyakoff
2214>N   1 Sergey Poznyakoff  Tue
2215" | \
2216  $at_diff - "$at_stdout" || at_failed=:
2217at_fn_check_status 0 $at_status "$at_srcdir/cols00.at:25"
2218$at_failed && at_fn_log_failure
2219$at_traceon; }
2220
2221
2222  set +x
2223  $at_times_p && times >"$at_times_file"
2224) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2225read at_status <"$at_status_file"
2226#AT_STOP_3
2227#AT_START_4
2228at_fn_group_banner 4 'cols01.at:17' \
2229  "setting columns" "                                "
2230at_xfail=no
2231(
2232  $as_echo "4. $at_setup_line: testing $at_desc ..."
2233  $at_traceon
2234
2235
2236
2237# Description: Mailutils 2.99.98 ignored columns setting
2238# Reported-By: Dan Jacobson <jidanni@jidanni.org>
2239# References: <87pp6rumzl.fsf@jidanni.org>,
2240#   http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00000.html
2241
2242{ set +x
2243$as_echo "$at_srcdir/cols01.at:25:
2244
2245
2246
2247
2248cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2249if test -e ./mbox; then
2250
2251# First, set all modes to +w
2252find ./mbox | xargs chmod +w
2253# Then, remove executable bit from regular files
2254find ./mbox -type f | xargs chmod -x
2255
2256else
2257
2258# First, set all modes to +w
2259find . | xargs chmod +w
2260# Then, remove executable bit from regular files
2261find . -type f | xargs chmod -x
2262
2263fi
2264
2265
2266
2267MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=26' -f ./mbox
2268MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=31' -f ./mbox
2269"
2270at_fn_check_prepare_notrace 'an embedded newline' "cols01.at:25"
2271( $at_check_trace;
2272
2273
2274
2275
2276cp -r $abs_top_srcdir/testsuite/spool/mbox .
2277if test -e ./mbox; then
2278
2279# First, set all modes to +w
2280find ./mbox | xargs chmod +w
2281# Then, remove executable bit from regular files
2282find ./mbox -type f | xargs chmod -x
2283
2284else
2285
2286# First, set all modes to +w
2287find . | xargs chmod +w
2288# Then, remove executable bit from regular files
2289find . -type f | xargs chmod -x
2290
2291fi
2292
2293
2294
2295MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=26' -f ./mbox
2296MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -nH -E 'set columns=31' -f ./mbox
2297
2298) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2299at_status=$? at_failed=false
2300$at_check_filter
2301at_fn_diff_devnull "$at_stderr" || at_failed=:
2302echo >>"$at_stdout"; $as_echo ">N   1 Sergey Poznyakoff
2303>N   1 Sergey Poznyakoff  Tue
2304" | \
2305  $at_diff - "$at_stdout" || at_failed=:
2306at_fn_check_status 0 $at_status "$at_srcdir/cols01.at:25"
2307$at_failed && at_fn_log_failure
2308$at_traceon; }
2309
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_4
2316#AT_START_5
2317at_fn_group_banner 5 'copy00.at:17' \
2318  "copy to stdout" "                                 "
2319at_xfail=no
2320(
2321  $as_echo "5. $at_setup_line: testing $at_desc ..."
2322  $at_traceon
2323
2324
2325
2326# Description: Check if copying to /dev/stdout works.
2327# Reported-By: Dan Jacobson <jidanni@jidanni.org>
2328# References: <87wq0tazcr.fsf@jidanni.org>,
2329#    https://lists.gnu.org/archive/html/bug-mailutils/2015-05/msg00002.html
2330
2331{ set +x
2332$as_echo "$at_srcdir/copy00.at:25:
2333test -f /dev/stdout || exit 77
2334
2335
2336
2337
2338cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2339if test -e ./mbox; then
2340
2341# First, set all modes to +w
2342find ./mbox | xargs chmod +w
2343# Then, remove executable bit from regular files
2344find ./mbox -type f | xargs chmod -x
2345
2346else
2347
2348# First, set all modes to +w
2349find . | xargs chmod +w
2350# Then, remove executable bit from regular files
2351find . -type f | xargs chmod -x
2352
2353fi
2354
2355
2356
2357echo 'copy 1 /dev/stdout' | \\
2358  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E 'set readonly' -f ./mbox 2>err | \\
2359  sed -e 's/  *\$//' -e '/^Held 1 message/d'
2360
2361if test -s err; then
2362  # On OSX. /dev/stdout cannot be locked.
2363  # Reported by Chris Weichenberger on Thu, 11 Jul 2019 18:04:06 +0200
2364  # in private correspondence.  See <20190711160406.picxk2geuqxjh2mx@X>
2365  sed -e '/Cannot lock \\/dev\\/stdout/d' err >err2
2366  if test -s err2; then
2367    cat err2 >&2
2368  else
2369    exit 77
2370  fi
2371fi
2372"
2373at_fn_check_prepare_notrace 'an embedded newline' "copy00.at:25"
2374( $at_check_trace;
2375test -f /dev/stdout || exit 77
2376
2377
2378
2379
2380cp -r $abs_top_srcdir/testsuite/spool/mbox .
2381if test -e ./mbox; then
2382
2383# First, set all modes to +w
2384find ./mbox | xargs chmod +w
2385# Then, remove executable bit from regular files
2386find ./mbox -type f | xargs chmod -x
2387
2388else
2389
2390# First, set all modes to +w
2391find . | xargs chmod +w
2392# Then, remove executable bit from regular files
2393find . -type f | xargs chmod -x
2394
2395fi
2396
2397
2398
2399echo 'copy 1 /dev/stdout' | \
2400  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E 'set readonly' -f ./mbox 2>err | \
2401  sed -e 's/  *$//' -e '/^Held 1 message/d'
2402
2403if test -s err; then
2404  # On OSX. /dev/stdout cannot be locked.
2405  # Reported by Chris Weichenberger on Thu, 11 Jul 2019 18:04:06 +0200
2406  # in private correspondence.  See <20190711160406.picxk2geuqxjh2mx@X>
2407  sed -e '/Cannot lock \/dev\/stdout/d' err >err2
2408  if test -s err2; then
2409    cat err2 >&2
2410  else
2411    exit 77
2412  fi
2413fi
2414
2415) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2416at_status=$? at_failed=false
2417$at_check_filter
2418at_fn_diff_devnull "$at_stderr" || at_failed=:
2419echo >>"$at_stdout"; $as_echo "From gray@example.net Tue Jul 16 12:11:35 2002
2420Organization: Mailutils-tests
2421Received: from example.net (localhost [127.0.0.1])
2422	by example.net with ESMTP id g6G9BZb00791
2423	for <gray@example.net>; Tue, 16 Jul 2002 12:11:35 +0300
2424Message-Id: <200207160911.g6G9BZb00791@example.net>
2425To: Bar <bar@dontmailme.org>
2426Subject: MBOX
2427Date: Tue, 16 Jul 2002 12:11:35 +0300
2428From: Sergey Poznyakoff <gray@example.net>
2429
2430
2431This is a sample user's mbox.
2432
2433\"/dev/stdout\"  14/438
2434
2435" | \
2436  $at_diff - "$at_stdout" || at_failed=:
2437at_fn_check_status 0 $at_status "$at_srcdir/copy00.at:25"
2438$at_failed && at_fn_log_failure
2439$at_traceon; }
2440
2441
2442  set +x
2443  $at_times_p && times >"$at_times_file"
2444) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2445read at_status <"$at_status_file"
2446#AT_STOP_5
2447#AT_START_6
2448at_fn_group_banner 6 'copy01.at:17' \
2449  "copy: % expansion" "                              "
2450at_xfail=no
2451(
2452  $as_echo "6. $at_setup_line: testing $at_desc ..."
2453  $at_traceon
2454
2455
2456
2457# Description: Check whether special mailbox notations are correctly expanded
2458# in copy command.  This was broken by commit eea2c4aa.
2459#
2460# This testcase checks for expansion of "%".
2461
2462{ set +x
2463$as_echo "$at_srcdir/copy01.at:25:
2464
2465
2466
2467
2468cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2469if test -e ./mbox; then
2470
2471# First, set all modes to +w
2472find ./mbox | xargs chmod +w
2473# Then, remove executable bit from regular files
2474find ./mbox -type f | xargs chmod -x
2475
2476else
2477
2478# First, set all modes to +w
2479find . | xargs chmod +w
2480# Then, remove executable bit from regular files
2481find . -type f | xargs chmod -x
2482
2483fi
2484
2485
2486
2487mbox=\`pwd\`/user
2488echo 'copy 1 %' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -f ./mbox --set '|mailbox|mailbox-pattern'=\$mbox |  sed 's/  *\$//;/^Held 1 message/d;s|'\$mbox'|MBOX|'
2489cmp user \$abs_top_srcdir/testsuite/spool/mbox
2490"
2491at_fn_check_prepare_notrace 'a `...` command substitution' "copy01.at:25"
2492( $at_check_trace;
2493
2494
2495
2496
2497cp -r $abs_top_srcdir/testsuite/spool/mbox .
2498if test -e ./mbox; then
2499
2500# First, set all modes to +w
2501find ./mbox | xargs chmod +w
2502# Then, remove executable bit from regular files
2503find ./mbox -type f | xargs chmod -x
2504
2505else
2506
2507# First, set all modes to +w
2508find . | xargs chmod +w
2509# Then, remove executable bit from regular files
2510find . -type f | xargs chmod -x
2511
2512fi
2513
2514
2515
2516mbox=`pwd`/user
2517echo 'copy 1 %' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -f ./mbox --set '|mailbox|mailbox-pattern'=$mbox |  sed 's/  *$//;/^Held 1 message/d;s|'$mbox'|MBOX|'
2518cmp user $abs_top_srcdir/testsuite/spool/mbox
2519
2520) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2521at_status=$? at_failed=false
2522$at_check_filter
2523at_fn_diff_devnull "$at_stderr" || at_failed=:
2524echo >>"$at_stdout"; $as_echo "\"MBOX\"  14/438
2525
2526" | \
2527  $at_diff - "$at_stdout" || at_failed=:
2528at_fn_check_status 0 $at_status "$at_srcdir/copy01.at:25"
2529$at_failed && at_fn_log_failure
2530$at_traceon; }
2531
2532
2533  set +x
2534  $at_times_p && times >"$at_times_file"
2535) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2536read at_status <"$at_status_file"
2537#AT_STOP_6
2538#AT_START_7
2539at_fn_group_banner 7 'copy02.at:17' \
2540  "copy: + expansion" "                              "
2541at_xfail=no
2542(
2543  $as_echo "7. $at_setup_line: testing $at_desc ..."
2544  $at_traceon
2545
2546
2547
2548# Description: Check whether special mailbox notations are correctly expanded
2549# in copy command.  This was broken by commit eea2c4aa.
2550#
2551# This testcase checks for expansion of "+".
2552
2553{ set +x
2554$as_echo "$at_srcdir/copy02.at:25:
2555
2556
2557
2558
2559cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2560if test -e ./mbox; then
2561
2562# First, set all modes to +w
2563find ./mbox | xargs chmod +w
2564# Then, remove executable bit from regular files
2565find ./mbox -type f | xargs chmod -x
2566
2567else
2568
2569# First, set all modes to +w
2570find . | xargs chmod +w
2571# Then, remove executable bit from regular files
2572find . -type f | xargs chmod -x
2573
2574fi
2575
2576
2577
2578mkdir folder
2579folder=\`pwd\`/folder
2580echo 'copy 1 +saved' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\\\"\$folder\\\"\" -f ./mbox |  sed 's/  *\$//;/^Held 1 message/d;s|'\$folder/saved'|MBOX|'
2581test -f \$folder/saved || exit 1
2582cmp \$folder/saved \$abs_top_srcdir/testsuite/spool/mbox
2583"
2584at_fn_check_prepare_notrace 'a `...` command substitution' "copy02.at:25"
2585( $at_check_trace;
2586
2587
2588
2589
2590cp -r $abs_top_srcdir/testsuite/spool/mbox .
2591if test -e ./mbox; then
2592
2593# First, set all modes to +w
2594find ./mbox | xargs chmod +w
2595# Then, remove executable bit from regular files
2596find ./mbox -type f | xargs chmod -x
2597
2598else
2599
2600# First, set all modes to +w
2601find . | xargs chmod +w
2602# Then, remove executable bit from regular files
2603find . -type f | xargs chmod -x
2604
2605fi
2606
2607
2608
2609mkdir folder
2610folder=`pwd`/folder
2611echo 'copy 1 +saved' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=\"$folder\"" -f ./mbox |  sed 's/  *$//;/^Held 1 message/d;s|'$folder/saved'|MBOX|'
2612test -f $folder/saved || exit 1
2613cmp $folder/saved $abs_top_srcdir/testsuite/spool/mbox
2614
2615) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2616at_status=$? at_failed=false
2617$at_check_filter
2618at_fn_diff_devnull "$at_stderr" || at_failed=:
2619echo >>"$at_stdout"; $as_echo "\"MBOX\"  14/438
2620
2621" | \
2622  $at_diff - "$at_stdout" || at_failed=:
2623at_fn_check_status 0 $at_status "$at_srcdir/copy02.at:25"
2624$at_failed && at_fn_log_failure
2625$at_traceon; }
2626
2627
2628  set +x
2629  $at_times_p && times >"$at_times_file"
2630) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2631read at_status <"$at_status_file"
2632#AT_STOP_7
2633#AT_START_8
2634at_fn_group_banner 8 'copy03.at:17' \
2635  "copy: & expansion" "                              "
2636at_xfail=no
2637(
2638  $as_echo "8. $at_setup_line: testing $at_desc ..."
2639  $at_traceon
2640
2641
2642
2643# Description: Check whether special mailbox notations are correctly expanded
2644# in copy command.  This was broken by commit eea2c4aa.
2645#
2646# This testcase checks for expansion of "&".
2647
2648{ set +x
2649$as_echo "$at_srcdir/copy03.at:25:
2650
2651
2652
2653
2654cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2655if test -e ./mbox; then
2656
2657# First, set all modes to +w
2658find ./mbox | xargs chmod +w
2659# Then, remove executable bit from regular files
2660find ./mbox -type f | xargs chmod -x
2661
2662else
2663
2664# First, set all modes to +w
2665find . | xargs chmod +w
2666# Then, remove executable bit from regular files
2667find . -type f | xargs chmod -x
2668
2669fi
2670
2671
2672
2673mkdir folder
2674MBOX=\`pwd\`/COPY
2675export MBOX
2676echo 'copy 1 &' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\\\"\$folder\\\"\" -f ./mbox  |  sed -e 's/  *\$//' -e '/^Held 1 message/d' -e \"s|\$MBOX|MBOX|\"
2677test -f \$MBOX || exit 1
2678cmp \$MBOX \$abs_top_srcdir/testsuite/spool/mbox
2679"
2680at_fn_check_prepare_notrace 'a `...` command substitution' "copy03.at:25"
2681( $at_check_trace;
2682
2683
2684
2685
2686cp -r $abs_top_srcdir/testsuite/spool/mbox .
2687if test -e ./mbox; then
2688
2689# First, set all modes to +w
2690find ./mbox | xargs chmod +w
2691# Then, remove executable bit from regular files
2692find ./mbox -type f | xargs chmod -x
2693
2694else
2695
2696# First, set all modes to +w
2697find . | xargs chmod +w
2698# Then, remove executable bit from regular files
2699find . -type f | xargs chmod -x
2700
2701fi
2702
2703
2704
2705mkdir folder
2706MBOX=`pwd`/COPY
2707export MBOX
2708echo 'copy 1 &' |  MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=\"$folder\"" -f ./mbox  |  sed -e 's/  *$//' -e '/^Held 1 message/d' -e "s|$MBOX|MBOX|"
2709test -f $MBOX || exit 1
2710cmp $MBOX $abs_top_srcdir/testsuite/spool/mbox
2711
2712) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2713at_status=$? at_failed=false
2714$at_check_filter
2715at_fn_diff_devnull "$at_stderr" || at_failed=:
2716echo >>"$at_stdout"; $as_echo "\"MBOX\"  14/438
2717
2718" | \
2719  $at_diff - "$at_stdout" || at_failed=:
2720at_fn_check_status 0 $at_status "$at_srcdir/copy03.at:25"
2721$at_failed && at_fn_log_failure
2722$at_traceon; }
2723
2724
2725  set +x
2726  $at_times_p && times >"$at_times_file"
2727) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2728read at_status <"$at_status_file"
2729#AT_STOP_8
2730#AT_START_9
2731at_fn_group_banner 9 'copy04.at:17' \
2732  "copy: # expansion" "                              "
2733at_xfail=no
2734(
2735  $as_echo "9. $at_setup_line: testing $at_desc ..."
2736  $at_traceon
2737
2738
2739
2740# Description: Check whether special mailbox notations are correctly expanded
2741# in copy command.  This was broken by commit eea2c4aa.
2742#
2743# This testcase checks for expansion of "#".
2744
2745{ set +x
2746$as_echo "$at_srcdir/copy04.at:25:
2747
2748
2749
2750
2751cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2752if test -e ./mbox; then
2753
2754# First, set all modes to +w
2755find ./mbox | xargs chmod +w
2756# Then, remove executable bit from regular files
2757find ./mbox -type f | xargs chmod -x
2758
2759else
2760
2761# First, set all modes to +w
2762find . | xargs chmod +w
2763# Then, remove executable bit from regular files
2764find . -type f | xargs chmod -x
2765
2766fi
2767
2768
2769
2770folder=\`pwd\`
2771MBOX=\$folder/mbox
2772NEW=\$folder/new
2773>\$NEW
2774cat >script <<'_ATEOF'
2775file +new
2776file +mbox
2777copy 1 #
2778_ATEOF
2779
2780MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\\\"\$folder\\\"\" -f \$MBOX < script  |  sed -e 's/  *\$//' \\
2781     -e 's|'\$NEW'|NEW|'\\
2782     -e '/\"NEW\"  *[0-9]/s/[0-9][0-9]*/D/g'\\
2783     -e 's|'\$MBOX'|MBOX|'\\
2784
2785sed '/^X-IMAPbase:/d;/^Status:/d;/^X-UID/d' \$NEW | diff - \$abs_top_srcdir/testsuite/spool/mbox
2786"
2787at_fn_check_prepare_notrace 'a `...` command substitution' "copy04.at:25"
2788( $at_check_trace;
2789
2790
2791
2792
2793cp -r $abs_top_srcdir/testsuite/spool/mbox .
2794if test -e ./mbox; then
2795
2796# First, set all modes to +w
2797find ./mbox | xargs chmod +w
2798# Then, remove executable bit from regular files
2799find ./mbox -type f | xargs chmod -x
2800
2801else
2802
2803# First, set all modes to +w
2804find . | xargs chmod +w
2805# Then, remove executable bit from regular files
2806find . -type f | xargs chmod -x
2807
2808fi
2809
2810
2811
2812folder=`pwd`
2813MBOX=$folder/mbox
2814NEW=$folder/new
2815>$NEW
2816cat >script <<'_ATEOF'
2817file +new
2818file +mbox
2819copy 1 #
2820_ATEOF
2821
2822MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=\"$folder\"" -f $MBOX < script  |  sed -e 's/  *$//' \
2823     -e 's|'$NEW'|NEW|'\
2824     -e '/"NEW"  *[0-9]/s/[0-9][0-9]*/D/g'\
2825     -e 's|'$MBOX'|MBOX|'\
2826
2827sed '/^X-IMAPbase:/d;/^Status:/d;/^X-UID/d' $NEW | diff - $abs_top_srcdir/testsuite/spool/mbox
2828
2829) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2830at_status=$? at_failed=false
2831$at_check_filter
2832at_fn_diff_devnull "$at_stderr" || at_failed=:
2833echo >>"$at_stdout"; $as_echo "Held 1 message in MBOX
2834Held 0 messages in NEW
2835\"NEW\"  D/D
2836
2837Held 1 message in MBOX
2838" | \
2839  $at_diff - "$at_stdout" || at_failed=:
2840at_fn_check_status 0 $at_status "$at_srcdir/copy04.at:25"
2841$at_failed && at_fn_log_failure
2842$at_traceon; }
2843
2844
2845  set +x
2846  $at_times_p && times >"$at_times_file"
2847) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2848read at_status <"$at_status_file"
2849#AT_STOP_9
2850#AT_START_10
2851at_fn_group_banner 10 'align.at:23' \
2852  "header alignment" "                               "
2853at_xfail=no
2854(
2855  $as_echo "10. $at_setup_line: testing $at_desc ..."
2856  $at_traceon
2857
2858
2859
2860{ set +x
2861$as_echo "$at_srcdir/align.at:26:
2862
2863
2864
2865cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2866if test -e ./mbox; then
2867
2868# First, set all modes to +w
2869find ./mbox | xargs chmod +w
2870# Then, remove executable bit from regular files
2871find ./mbox -type f | xargs chmod -x
2872
2873else
2874
2875# First, set all modes to +w
2876find . | xargs chmod +w
2877# Then, remove executable bit from regular files
2878find . -type f | xargs chmod -x
2879
2880fi
2881
2882
2883
2884MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%20d<\"' --headers -f ./mbox"
2885at_fn_check_prepare_notrace 'an embedded newline' "align.at:26"
2886( $at_check_trace;
2887
2888
2889
2890cp -r $abs_top_srcdir/testsuite/spool/mbox .
2891if test -e ./mbox; then
2892
2893# First, set all modes to +w
2894find ./mbox | xargs chmod +w
2895# Then, remove executable bit from regular files
2896find ./mbox -type f | xargs chmod -x
2897
2898else
2899
2900# First, set all modes to +w
2901find . | xargs chmod +w
2902# Then, remove executable bit from regular files
2903find . -type f | xargs chmod -x
2904
2905fi
2906
2907
2908
2909MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%20d<"' --headers -f ./mbox
2910) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2911at_status=$? at_failed=false
2912$at_check_filter
2913at_fn_diff_devnull "$at_stderr" || at_failed=:
2914echo >>"$at_stdout"; $as_echo ">Tue Jul 16 12:11    <
2915" | \
2916  $at_diff - "$at_stdout" || at_failed=:
2917at_fn_check_status 0 $at_status "$at_srcdir/align.at:26"
2918$at_failed && at_fn_log_failure
2919$at_traceon; }
2920
2921{ set +x
2922$as_echo "$at_srcdir/align.at:31:
2923
2924
2925
2926cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2927if test -e ./mbox; then
2928
2929# First, set all modes to +w
2930find ./mbox | xargs chmod +w
2931# Then, remove executable bit from regular files
2932find ./mbox -type f | xargs chmod -x
2933
2934else
2935
2936# First, set all modes to +w
2937find . | xargs chmod +w
2938# Then, remove executable bit from regular files
2939find . -type f | xargs chmod -x
2940
2941fi
2942
2943
2944
2945MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%-20d<\"' --headers -f ./mbox"
2946at_fn_check_prepare_notrace 'an embedded newline' "align.at:31"
2947( $at_check_trace;
2948
2949
2950
2951cp -r $abs_top_srcdir/testsuite/spool/mbox .
2952if test -e ./mbox; then
2953
2954# First, set all modes to +w
2955find ./mbox | xargs chmod +w
2956# Then, remove executable bit from regular files
2957find ./mbox -type f | xargs chmod -x
2958
2959else
2960
2961# First, set all modes to +w
2962find . | xargs chmod +w
2963# Then, remove executable bit from regular files
2964find . -type f | xargs chmod -x
2965
2966fi
2967
2968
2969
2970MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%-20d<"' --headers -f ./mbox
2971) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2972at_status=$? at_failed=false
2973$at_check_filter
2974at_fn_diff_devnull "$at_stderr" || at_failed=:
2975echo >>"$at_stdout"; $as_echo ">Tue Jul 16 12:11    <
2976" | \
2977  $at_diff - "$at_stdout" || at_failed=:
2978at_fn_check_status 0 $at_status "$at_srcdir/align.at:31"
2979$at_failed && at_fn_log_failure
2980$at_traceon; }
2981
2982{ set +x
2983$as_echo "$at_srcdir/align.at:36:
2984
2985
2986
2987cp -r \$abs_top_srcdir/testsuite/spool/mbox .
2988if test -e ./mbox; then
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
2995else
2996
2997# First, set all modes to +w
2998find . | xargs chmod +w
2999# Then, remove executable bit from regular files
3000find . -type f | xargs chmod -x
3001
3002fi
3003
3004
3005
3006MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%+20d<\"' --headers -f ./mbox"
3007at_fn_check_prepare_notrace 'an embedded newline' "align.at:36"
3008( $at_check_trace;
3009
3010
3011
3012cp -r $abs_top_srcdir/testsuite/spool/mbox .
3013if test -e ./mbox; then
3014
3015# First, set all modes to +w
3016find ./mbox | xargs chmod +w
3017# Then, remove executable bit from regular files
3018find ./mbox -type f | xargs chmod -x
3019
3020else
3021
3022# First, set all modes to +w
3023find . | xargs chmod +w
3024# Then, remove executable bit from regular files
3025find . -type f | xargs chmod -x
3026
3027fi
3028
3029
3030
3031MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%+20d<"' --headers -f ./mbox
3032) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3033at_status=$? at_failed=false
3034$at_check_filter
3035at_fn_diff_devnull "$at_stderr" || at_failed=:
3036echo >>"$at_stdout"; $as_echo ">    Tue Jul 16 12:11<
3037" | \
3038  $at_diff - "$at_stdout" || at_failed=:
3039at_fn_check_status 0 $at_status "$at_srcdir/align.at:36"
3040$at_failed && at_fn_log_failure
3041$at_traceon; }
3042
3043{ set +x
3044$as_echo "$at_srcdir/align.at:41:
3045
3046
3047
3048cp -r \$abs_top_srcdir/testsuite/spool/mbox .
3049if test -e ./mbox; then
3050
3051# First, set all modes to +w
3052find ./mbox | xargs chmod +w
3053# Then, remove executable bit from regular files
3054find ./mbox -type f | xargs chmod -x
3055
3056else
3057
3058# First, set all modes to +w
3059find . | xargs chmod +w
3060# Then, remove executable bit from regular files
3061find . -type f | xargs chmod -x
3062
3063fi
3064
3065
3066
3067MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%20o<\"' --headers -f ./mbox"
3068at_fn_check_prepare_notrace 'an embedded newline' "align.at:41"
3069( $at_check_trace;
3070
3071
3072
3073cp -r $abs_top_srcdir/testsuite/spool/mbox .
3074if test -e ./mbox; then
3075
3076# First, set all modes to +w
3077find ./mbox | xargs chmod +w
3078# Then, remove executable bit from regular files
3079find ./mbox -type f | xargs chmod -x
3080
3081else
3082
3083# First, set all modes to +w
3084find . | xargs chmod +w
3085# Then, remove executable bit from regular files
3086find . -type f | xargs chmod -x
3087
3088fi
3089
3090
3091
3092MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%20o<"' --headers -f ./mbox
3093) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3094at_status=$? at_failed=false
3095$at_check_filter
3096at_fn_diff_devnull "$at_stderr" || at_failed=:
3097echo >>"$at_stdout"; $as_echo ">                 391<
3098" | \
3099  $at_diff - "$at_stdout" || at_failed=:
3100at_fn_check_status 0 $at_status "$at_srcdir/align.at:41"
3101$at_failed && at_fn_log_failure
3102$at_traceon; }
3103
3104{ set +x
3105$as_echo "$at_srcdir/align.at:46:
3106
3107
3108
3109cp -r \$abs_top_srcdir/testsuite/spool/mbox .
3110if test -e ./mbox; then
3111
3112# First, set all modes to +w
3113find ./mbox | xargs chmod +w
3114# Then, remove executable bit from regular files
3115find ./mbox -type f | xargs chmod -x
3116
3117else
3118
3119# First, set all modes to +w
3120find . | xargs chmod +w
3121# Then, remove executable bit from regular files
3122find . -type f | xargs chmod -x
3123
3124fi
3125
3126
3127
3128MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%-20o<\"' --headers -f ./mbox"
3129at_fn_check_prepare_notrace 'an embedded newline' "align.at:46"
3130( $at_check_trace;
3131
3132
3133
3134cp -r $abs_top_srcdir/testsuite/spool/mbox .
3135if test -e ./mbox; then
3136
3137# First, set all modes to +w
3138find ./mbox | xargs chmod +w
3139# Then, remove executable bit from regular files
3140find ./mbox -type f | xargs chmod -x
3141
3142else
3143
3144# First, set all modes to +w
3145find . | xargs chmod +w
3146# Then, remove executable bit from regular files
3147find . -type f | xargs chmod -x
3148
3149fi
3150
3151
3152
3153MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%-20o<"' --headers -f ./mbox
3154) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3155at_status=$? at_failed=false
3156$at_check_filter
3157at_fn_diff_devnull "$at_stderr" || at_failed=:
3158echo >>"$at_stdout"; $as_echo ">391                 <
3159" | \
3160  $at_diff - "$at_stdout" || at_failed=:
3161at_fn_check_status 0 $at_status "$at_srcdir/align.at:46"
3162$at_failed && at_fn_log_failure
3163$at_traceon; }
3164
3165{ set +x
3166$as_echo "$at_srcdir/align.at:51:
3167
3168
3169
3170cp -r \$abs_top_srcdir/testsuite/spool/mbox .
3171if test -e ./mbox; then
3172
3173# First, set all modes to +w
3174find ./mbox | xargs chmod +w
3175# Then, remove executable bit from regular files
3176find ./mbox -type f | xargs chmod -x
3177
3178else
3179
3180# First, set all modes to +w
3181find . | xargs chmod +w
3182# Then, remove executable bit from regular files
3183find . -type f | xargs chmod -x
3184
3185fi
3186
3187
3188
3189MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%+20o<\"' --headers -f ./mbox"
3190at_fn_check_prepare_notrace 'an embedded newline' "align.at:51"
3191( $at_check_trace;
3192
3193
3194
3195cp -r $abs_top_srcdir/testsuite/spool/mbox .
3196if test -e ./mbox; then
3197
3198# First, set all modes to +w
3199find ./mbox | xargs chmod +w
3200# Then, remove executable bit from regular files
3201find ./mbox -type f | xargs chmod -x
3202
3203else
3204
3205# First, set all modes to +w
3206find . | xargs chmod +w
3207# Then, remove executable bit from regular files
3208find . -type f | xargs chmod -x
3209
3210fi
3211
3212
3213
3214MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%+20o<"' --headers -f ./mbox
3215) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3216at_status=$? at_failed=false
3217$at_check_filter
3218at_fn_diff_devnull "$at_stderr" || at_failed=:
3219echo >>"$at_stdout"; $as_echo ">                 391<
3220" | \
3221  $at_diff - "$at_stdout" || at_failed=:
3222at_fn_check_status 0 $at_status "$at_srcdir/align.at:51"
3223$at_failed && at_fn_log_failure
3224$at_traceon; }
3225
3226  set +x
3227  $at_times_p && times >"$at_times_file"
3228) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3229read at_status <"$at_status_file"
3230#AT_STOP_10
3231#AT_START_11
3232at_fn_group_banner 11 'D.at:19' \
3233  "date formats" "                                   "
3234at_xfail=no
3235(
3236  $as_echo "11. $at_setup_line: testing $at_desc ..."
3237  $at_traceon
3238
3239
3240
3241{ set +x
3242$as_echo "$at_srcdir/D.at:22:
3243
3244
3245
3246
3247cp -r \$abs_top_srcdir/testsuite/spool/mbox .
3248if test -e ./mbox; then
3249
3250# First, set all modes to +w
3251find ./mbox | xargs chmod +w
3252# Then, remove executable bit from regular files
3253find ./mbox -type f | xargs chmod -x
3254
3255else
3256
3257# First, set all modes to +w
3258find . | xargs chmod +w
3259# Then, remove executable bit from regular files
3260find . -type f | xargs chmod -x
3261
3262fi
3263
3264
3265
3266MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%d<\"' --headers -f ./mbox
3267MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%DH<\"' --headers -f ./mbox
3268MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=\">%D{%Y-%m-%d \\{%H:%M:%S\\}}<\"' --headers -f ./mbox
3269"
3270at_fn_check_prepare_notrace 'an embedded newline' "D.at:22"
3271( $at_check_trace;
3272
3273
3274
3275
3276cp -r $abs_top_srcdir/testsuite/spool/mbox .
3277if test -e ./mbox; then
3278
3279# First, set all modes to +w
3280find ./mbox | xargs chmod +w
3281# Then, remove executable bit from regular files
3282find ./mbox -type f | xargs chmod -x
3283
3284else
3285
3286# First, set all modes to +w
3287find . | xargs chmod +w
3288# Then, remove executable bit from regular files
3289find . -type f | xargs chmod -x
3290
3291fi
3292
3293
3294
3295MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%d<"' --headers -f ./mbox
3296MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%DH<"' --headers -f ./mbox
3297MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  --exec='set headline=">%D{%Y-%m-%d \{%H:%M:%S\}}<"' --headers -f ./mbox
3298
3299) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3300at_status=$? at_failed=false
3301$at_check_filter
3302at_fn_diff_devnull "$at_stderr" || at_failed=:
3303echo >>"$at_stdout"; $as_echo ">Tue Jul 16 12:11<
3304>12<
3305>2002-07-16 {12:11:35}<
3306" | \
3307  $at_diff - "$at_stdout" || at_failed=:
3308at_fn_check_status 0 $at_status "$at_srcdir/D.at:22"
3309$at_failed && at_fn_log_failure
3310$at_traceon; }
3311
3312  set +x
3313  $at_times_p && times >"$at_times_file"
3314) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3315read at_status <"$at_status_file"
3316#AT_STOP_11
3317#AT_START_12
3318at_fn_group_banner 12 'hold.at:54' \
3319  "read (nohold)" "                                  " 1
3320at_xfail=no
3321(
3322  $as_echo "12. $at_setup_line: testing $at_desc ..."
3323  $at_traceon
3324
3325{ set +x
3326$as_echo "$at_srcdir/hold.at:54: cat >inbox <<'_ATEOF'
3327From hare@wonder.land Mon Jul 29 22:00:08 2002
3328From: March Hare  <hare@wonder.land>
3329To: Alice  <alice@wonder.land>
3330Subject: Invitation
3331
3332Have some wine
3333
3334From alice@wonder.land Mon Jul 29 22:00:09 2002
3335From: Alice  <alice@wonder.land>
3336To: March Hare  <hare@wonder.land>
3337Subject: Re: Invitation
3338
3339I don't see any wine
3340
3341_ATEOF
3342
3343cat >rc <<'_ATEOF'
3344set nohold nokeepsave
33451
3346quit
3347_ATEOF
3348
3349export MAIL=inbox
3350export MBOX=mbox
3351> \$MBOX
3352CWD=\$(pwd)
3353MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3354echo == inbox ==
3355catmbox inbox
3356echo == mbox ==
3357catmbox mbox
3358
3359"
3360at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:54"
3361( $at_check_trace; cat >inbox <<'_ATEOF'
3362From hare@wonder.land Mon Jul 29 22:00:08 2002
3363From: March Hare  <hare@wonder.land>
3364To: Alice  <alice@wonder.land>
3365Subject: Invitation
3366
3367Have some wine
3368
3369From alice@wonder.land Mon Jul 29 22:00:09 2002
3370From: Alice  <alice@wonder.land>
3371To: March Hare  <hare@wonder.land>
3372Subject: Re: Invitation
3373
3374I don't see any wine
3375
3376_ATEOF
3377
3378cat >rc <<'_ATEOF'
3379set nohold nokeepsave
33801
3381quit
3382_ATEOF
3383
3384export MAIL=inbox
3385export MBOX=mbox
3386> $MBOX
3387CWD=$(pwd)
3388MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3389echo == inbox ==
3390catmbox inbox
3391echo == mbox ==
3392catmbox mbox
3393
3394
3395) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3396at_status=$? at_failed=false
3397$at_check_filter
3398at_fn_diff_devnull "$at_stderr" || at_failed=:
3399echo >>"$at_stdout"; $as_echo "From: March Hare  <hare@wonder.land>
3400To: Alice  <alice@wonder.land>
3401Subject: Invitation
3402
3403Have some wine
3404
3405Saved 1 message in ./mbox
3406Held 1 message in ./inbox
3407== inbox ==
3408From alice@wonder.land Mon Jul 29 22:00:09 2002
3409From: Alice  <alice@wonder.land>
3410To: March Hare  <hare@wonder.land>
3411Subject: Re: Invitation
3412Status: O
3413
3414I don't see any wine
3415
3416== mbox ==
3417From hare@wonder.land Mon Jul 29 22:00:08 2002
3418From: March Hare  <hare@wonder.land>
3419To: Alice  <alice@wonder.land>
3420Subject: Invitation
3421
3422Have some wine
3423
3424" | \
3425  $at_diff - "$at_stdout" || at_failed=:
3426at_fn_check_status 0 $at_status "$at_srcdir/hold.at:54"
3427$at_failed && at_fn_log_failure
3428$at_traceon; }
3429
3430  set +x
3431  $at_times_p && times >"$at_times_file"
3432) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3433read at_status <"$at_status_file"
3434#AT_STOP_12
3435#AT_START_13
3436at_fn_group_banner 13 'hold.at:92' \
3437  "read (hold)" "                                    " 1
3438at_xfail=no
3439(
3440  $as_echo "13. $at_setup_line: testing $at_desc ..."
3441  $at_traceon
3442
3443{ set +x
3444$as_echo "$at_srcdir/hold.at:92: cat >inbox <<'_ATEOF'
3445From hare@wonder.land Mon Jul 29 22:00:08 2002
3446From: March Hare  <hare@wonder.land>
3447To: Alice  <alice@wonder.land>
3448Subject: Invitation
3449
3450Have some wine
3451
3452From alice@wonder.land Mon Jul 29 22:00:09 2002
3453From: Alice  <alice@wonder.land>
3454To: March Hare  <hare@wonder.land>
3455Subject: Re: Invitation
3456
3457I don't see any wine
3458
3459_ATEOF
3460
3461cat >rc <<'_ATEOF'
3462set hold
34631
3464quit
3465_ATEOF
3466
3467export MAIL=inbox
3468export MBOX=mbox
3469> \$MBOX
3470CWD=\$(pwd)
3471MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3472echo == inbox ==
3473catmbox inbox
3474echo == mbox ==
3475catmbox mbox
3476
3477"
3478at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:92"
3479( $at_check_trace; cat >inbox <<'_ATEOF'
3480From hare@wonder.land Mon Jul 29 22:00:08 2002
3481From: March Hare  <hare@wonder.land>
3482To: Alice  <alice@wonder.land>
3483Subject: Invitation
3484
3485Have some wine
3486
3487From alice@wonder.land Mon Jul 29 22:00:09 2002
3488From: Alice  <alice@wonder.land>
3489To: March Hare  <hare@wonder.land>
3490Subject: Re: Invitation
3491
3492I don't see any wine
3493
3494_ATEOF
3495
3496cat >rc <<'_ATEOF'
3497set hold
34981
3499quit
3500_ATEOF
3501
3502export MAIL=inbox
3503export MBOX=mbox
3504> $MBOX
3505CWD=$(pwd)
3506MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3507echo == inbox ==
3508catmbox inbox
3509echo == mbox ==
3510catmbox mbox
3511
3512
3513) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3514at_status=$? at_failed=false
3515$at_check_filter
3516at_fn_diff_devnull "$at_stderr" || at_failed=:
3517echo >>"$at_stdout"; $as_echo "From: March Hare  <hare@wonder.land>
3518To: Alice  <alice@wonder.land>
3519Subject: Invitation
3520
3521Have some wine
3522
3523Held 2 messages in ./inbox
3524== inbox ==
3525From hare@wonder.land Mon Jul 29 22:00:08 2002
3526From: March Hare  <hare@wonder.land>
3527To: Alice  <alice@wonder.land>
3528Subject: Invitation
3529Status: OR
3530
3531Have some wine
3532
3533From alice@wonder.land Mon Jul 29 22:00:09 2002
3534From: Alice  <alice@wonder.land>
3535To: March Hare  <hare@wonder.land>
3536Subject: Re: Invitation
3537Status: O
3538
3539I don't see any wine
3540
3541== mbox ==
3542" | \
3543  $at_diff - "$at_stdout" || at_failed=:
3544at_fn_check_status 0 $at_status "$at_srcdir/hold.at:92"
3545$at_failed && at_fn_log_failure
3546$at_traceon; }
3547
3548  set +x
3549  $at_times_p && times >"$at_times_file"
3550) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3551read at_status <"$at_status_file"
3552#AT_STOP_13
3553#AT_START_14
3554at_fn_group_banner 14 'hold.at:130' \
3555  "touch (nohold)" "                                 " 1
3556at_xfail=no
3557(
3558  $as_echo "14. $at_setup_line: testing $at_desc ..."
3559  $at_traceon
3560
3561{ set +x
3562$as_echo "$at_srcdir/hold.at:130: cat >inbox <<'_ATEOF'
3563From hare@wonder.land Mon Jul 29 22:00:08 2002
3564From: March Hare  <hare@wonder.land>
3565To: Alice  <alice@wonder.land>
3566Subject: Invitation
3567
3568Have some wine
3569
3570From alice@wonder.land Mon Jul 29 22:00:09 2002
3571From: Alice  <alice@wonder.land>
3572To: March Hare  <hare@wonder.land>
3573Subject: Re: Invitation
3574
3575I don't see any wine
3576
3577_ATEOF
3578
3579cat >rc <<'_ATEOF'
3580set nohold
3581touch 1
3582quit
3583_ATEOF
3584
3585export MAIL=inbox
3586export MBOX=mbox
3587> \$MBOX
3588CWD=\$(pwd)
3589MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3590echo == inbox ==
3591catmbox inbox
3592echo == mbox ==
3593catmbox mbox
3594
3595"
3596at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:130"
3597( $at_check_trace; cat >inbox <<'_ATEOF'
3598From hare@wonder.land Mon Jul 29 22:00:08 2002
3599From: March Hare  <hare@wonder.land>
3600To: Alice  <alice@wonder.land>
3601Subject: Invitation
3602
3603Have some wine
3604
3605From alice@wonder.land Mon Jul 29 22:00:09 2002
3606From: Alice  <alice@wonder.land>
3607To: March Hare  <hare@wonder.land>
3608Subject: Re: Invitation
3609
3610I don't see any wine
3611
3612_ATEOF
3613
3614cat >rc <<'_ATEOF'
3615set nohold
3616touch 1
3617quit
3618_ATEOF
3619
3620export MAIL=inbox
3621export MBOX=mbox
3622> $MBOX
3623CWD=$(pwd)
3624MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3625echo == inbox ==
3626catmbox inbox
3627echo == mbox ==
3628catmbox mbox
3629
3630
3631) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3632at_status=$? at_failed=false
3633$at_check_filter
3634at_fn_diff_devnull "$at_stderr" || at_failed=:
3635echo >>"$at_stdout"; $as_echo "Saved 1 message in ./mbox
3636Held 1 message in ./inbox
3637== inbox ==
3638From alice@wonder.land Mon Jul 29 22:00:09 2002
3639From: Alice  <alice@wonder.land>
3640To: March Hare  <hare@wonder.land>
3641Subject: Re: Invitation
3642Status: O
3643
3644I don't see any wine
3645
3646== mbox ==
3647From hare@wonder.land Mon Jul 29 22:00:08 2002
3648From: March Hare  <hare@wonder.land>
3649To: Alice  <alice@wonder.land>
3650Subject: Invitation
3651
3652Have some wine
3653
3654" | \
3655  $at_diff - "$at_stdout" || at_failed=:
3656at_fn_check_status 0 $at_status "$at_srcdir/hold.at:130"
3657$at_failed && at_fn_log_failure
3658$at_traceon; }
3659
3660  set +x
3661  $at_times_p && times >"$at_times_file"
3662) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3663read at_status <"$at_status_file"
3664#AT_STOP_14
3665#AT_START_15
3666at_fn_group_banner 15 'hold.at:162' \
3667  "touch (hold)" "                                   " 1
3668at_xfail=no
3669(
3670  $as_echo "15. $at_setup_line: testing $at_desc ..."
3671  $at_traceon
3672
3673{ set +x
3674$as_echo "$at_srcdir/hold.at:162: cat >inbox <<'_ATEOF'
3675From hare@wonder.land Mon Jul 29 22:00:08 2002
3676From: March Hare  <hare@wonder.land>
3677To: Alice  <alice@wonder.land>
3678Subject: Invitation
3679
3680Have some wine
3681
3682From alice@wonder.land Mon Jul 29 22:00:09 2002
3683From: Alice  <alice@wonder.land>
3684To: March Hare  <hare@wonder.land>
3685Subject: Re: Invitation
3686
3687I don't see any wine
3688
3689_ATEOF
3690
3691cat >rc <<'_ATEOF'
3692set hold
3693touch 1
3694quit
3695_ATEOF
3696
3697export MAIL=inbox
3698export MBOX=mbox
3699> \$MBOX
3700CWD=\$(pwd)
3701MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3702echo == inbox ==
3703catmbox inbox
3704echo == mbox ==
3705catmbox mbox
3706
3707"
3708at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:162"
3709( $at_check_trace; cat >inbox <<'_ATEOF'
3710From hare@wonder.land Mon Jul 29 22:00:08 2002
3711From: March Hare  <hare@wonder.land>
3712To: Alice  <alice@wonder.land>
3713Subject: Invitation
3714
3715Have some wine
3716
3717From alice@wonder.land Mon Jul 29 22:00:09 2002
3718From: Alice  <alice@wonder.land>
3719To: March Hare  <hare@wonder.land>
3720Subject: Re: Invitation
3721
3722I don't see any wine
3723
3724_ATEOF
3725
3726cat >rc <<'_ATEOF'
3727set hold
3728touch 1
3729quit
3730_ATEOF
3731
3732export MAIL=inbox
3733export MBOX=mbox
3734> $MBOX
3735CWD=$(pwd)
3736MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3737echo == inbox ==
3738catmbox inbox
3739echo == mbox ==
3740catmbox mbox
3741
3742
3743) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3744at_status=$? at_failed=false
3745$at_check_filter
3746at_fn_diff_devnull "$at_stderr" || at_failed=:
3747echo >>"$at_stdout"; $as_echo "Held 2 messages in ./inbox
3748== inbox ==
3749From hare@wonder.land Mon Jul 29 22:00:08 2002
3750From: March Hare  <hare@wonder.land>
3751To: Alice  <alice@wonder.land>
3752Subject: Invitation
3753Status: O
3754
3755Have some wine
3756
3757From alice@wonder.land Mon Jul 29 22:00:09 2002
3758From: Alice  <alice@wonder.land>
3759To: March Hare  <hare@wonder.land>
3760Subject: Re: Invitation
3761Status: O
3762
3763I don't see any wine
3764
3765== mbox ==
3766" | \
3767  $at_diff - "$at_stdout" || at_failed=:
3768at_fn_check_status 0 $at_status "$at_srcdir/hold.at:162"
3769$at_failed && at_fn_log_failure
3770$at_traceon; }
3771
3772  set +x
3773  $at_times_p && times >"$at_times_file"
3774) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3775read at_status <"$at_status_file"
3776#AT_STOP_15
3777#AT_START_16
3778at_fn_group_banner 16 'hold.at:194' \
3779  "save (nohold nokeepsave)" "                       " 1
3780at_xfail=no
3781(
3782  $as_echo "16. $at_setup_line: testing $at_desc ..."
3783  $at_traceon
3784
3785{ set +x
3786$as_echo "$at_srcdir/hold.at:194: cat >inbox <<'_ATEOF'
3787From hare@wonder.land Mon Jul 29 22:00:08 2002
3788From: March Hare  <hare@wonder.land>
3789To: Alice  <alice@wonder.land>
3790Subject: Invitation
3791
3792Have some wine
3793
3794From alice@wonder.land Mon Jul 29 22:00:09 2002
3795From: Alice  <alice@wonder.land>
3796To: March Hare  <hare@wonder.land>
3797Subject: Re: Invitation
3798
3799I don't see any wine
3800
3801_ATEOF
3802
3803cat >rc <<'_ATEOF'
3804set nohold nokeepsave
3805save 1 +dest
3806quit
3807_ATEOF
3808
3809export MAIL=inbox
3810export MBOX=mbox
3811> \$MBOX
3812CWD=\$(pwd)
3813MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3814echo == inbox ==
3815catmbox inbox
3816echo == mbox ==
3817catmbox mbox
3818echo == dest ==
3819catmbox dest
3820
3821"
3822at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:194"
3823( $at_check_trace; cat >inbox <<'_ATEOF'
3824From hare@wonder.land Mon Jul 29 22:00:08 2002
3825From: March Hare  <hare@wonder.land>
3826To: Alice  <alice@wonder.land>
3827Subject: Invitation
3828
3829Have some wine
3830
3831From alice@wonder.land Mon Jul 29 22:00:09 2002
3832From: Alice  <alice@wonder.land>
3833To: March Hare  <hare@wonder.land>
3834Subject: Re: Invitation
3835
3836I don't see any wine
3837
3838_ATEOF
3839
3840cat >rc <<'_ATEOF'
3841set nohold nokeepsave
3842save 1 +dest
3843quit
3844_ATEOF
3845
3846export MAIL=inbox
3847export MBOX=mbox
3848> $MBOX
3849CWD=$(pwd)
3850MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3851echo == inbox ==
3852catmbox inbox
3853echo == mbox ==
3854catmbox mbox
3855echo == dest ==
3856catmbox dest
3857
3858
3859) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3860at_status=$? at_failed=false
3861$at_check_filter
3862at_fn_diff_devnull "$at_stderr" || at_failed=:
3863echo >>"$at_stdout"; $as_echo "\"./dest\"   7/152
3864Held 1 message in ./inbox
3865== inbox ==
3866From alice@wonder.land Mon Jul 29 22:00:09 2002
3867From: Alice  <alice@wonder.land>
3868To: March Hare  <hare@wonder.land>
3869Subject: Re: Invitation
3870Status: O
3871
3872I don't see any wine
3873
3874== mbox ==
3875== dest ==
3876From hare@wonder.land Mon Jul 29 22:00:08 2002
3877From: March Hare  <hare@wonder.land>
3878To: Alice  <alice@wonder.land>
3879Subject: Invitation
3880
3881Have some wine
3882
3883" | \
3884  $at_diff - "$at_stdout" || at_failed=:
3885at_fn_check_status 0 $at_status "$at_srcdir/hold.at:194"
3886$at_failed && at_fn_log_failure
3887$at_traceon; }
3888
3889  set +x
3890  $at_times_p && times >"$at_times_file"
3891) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3892read at_status <"$at_status_file"
3893#AT_STOP_16
3894#AT_START_17
3895at_fn_group_banner 17 'hold.at:229' \
3896  "save (nohold keepsave)" "                         " 1
3897at_xfail=no
3898(
3899  $as_echo "17. $at_setup_line: testing $at_desc ..."
3900  $at_traceon
3901
3902{ set +x
3903$as_echo "$at_srcdir/hold.at:229: cat >inbox <<'_ATEOF'
3904From hare@wonder.land Mon Jul 29 22:00:08 2002
3905From: March Hare  <hare@wonder.land>
3906To: Alice  <alice@wonder.land>
3907Subject: Invitation
3908
3909Have some wine
3910
3911From alice@wonder.land Mon Jul 29 22:00:09 2002
3912From: Alice  <alice@wonder.land>
3913To: March Hare  <hare@wonder.land>
3914Subject: Re: Invitation
3915
3916I don't see any wine
3917
3918_ATEOF
3919
3920cat >rc <<'_ATEOF'
3921set nohold keepsave
3922save 1 +dest
3923quit
3924_ATEOF
3925
3926export MAIL=inbox
3927export MBOX=mbox
3928> \$MBOX
3929CWD=\$(pwd)
3930MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
3931echo == inbox ==
3932catmbox inbox
3933echo == mbox ==
3934catmbox mbox
3935echo == dest ==
3936catmbox dest
3937
3938"
3939at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:229"
3940( $at_check_trace; cat >inbox <<'_ATEOF'
3941From hare@wonder.land Mon Jul 29 22:00:08 2002
3942From: March Hare  <hare@wonder.land>
3943To: Alice  <alice@wonder.land>
3944Subject: Invitation
3945
3946Have some wine
3947
3948From alice@wonder.land Mon Jul 29 22:00:09 2002
3949From: Alice  <alice@wonder.land>
3950To: March Hare  <hare@wonder.land>
3951Subject: Re: Invitation
3952
3953I don't see any wine
3954
3955_ATEOF
3956
3957cat >rc <<'_ATEOF'
3958set nohold keepsave
3959save 1 +dest
3960quit
3961_ATEOF
3962
3963export MAIL=inbox
3964export MBOX=mbox
3965> $MBOX
3966CWD=$(pwd)
3967MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
3968echo == inbox ==
3969catmbox inbox
3970echo == mbox ==
3971catmbox mbox
3972echo == dest ==
3973catmbox dest
3974
3975
3976) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3977at_status=$? at_failed=false
3978$at_check_filter
3979at_fn_diff_devnull "$at_stderr" || at_failed=:
3980echo >>"$at_stdout"; $as_echo "\"./dest\"   7/152
3981Saved 1 message in ./mbox
3982Held 1 message in ./inbox
3983== inbox ==
3984From alice@wonder.land Mon Jul 29 22:00:09 2002
3985From: Alice  <alice@wonder.land>
3986To: March Hare  <hare@wonder.land>
3987Subject: Re: Invitation
3988Status: O
3989
3990I don't see any wine
3991
3992== mbox ==
3993From hare@wonder.land Mon Jul 29 22:00:08 2002
3994From: March Hare  <hare@wonder.land>
3995To: Alice  <alice@wonder.land>
3996Subject: Invitation
3997
3998Have some wine
3999
4000== dest ==
4001From hare@wonder.land Mon Jul 29 22:00:08 2002
4002From: March Hare  <hare@wonder.land>
4003To: Alice  <alice@wonder.land>
4004Subject: Invitation
4005
4006Have some wine
4007
4008" | \
4009  $at_diff - "$at_stdout" || at_failed=:
4010at_fn_check_status 0 $at_status "$at_srcdir/hold.at:229"
4011$at_failed && at_fn_log_failure
4012$at_traceon; }
4013
4014  set +x
4015  $at_times_p && times >"$at_times_file"
4016) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4017read at_status <"$at_status_file"
4018#AT_STOP_17
4019#AT_START_18
4020at_fn_group_banner 18 'hold.at:272' \
4021  "save (hold keepsave)" "                           " 1
4022at_xfail=no
4023(
4024  $as_echo "18. $at_setup_line: testing $at_desc ..."
4025  $at_traceon
4026
4027{ set +x
4028$as_echo "$at_srcdir/hold.at:272: cat >inbox <<'_ATEOF'
4029From hare@wonder.land Mon Jul 29 22:00:08 2002
4030From: March Hare  <hare@wonder.land>
4031To: Alice  <alice@wonder.land>
4032Subject: Invitation
4033
4034Have some wine
4035
4036From alice@wonder.land Mon Jul 29 22:00:09 2002
4037From: Alice  <alice@wonder.land>
4038To: March Hare  <hare@wonder.land>
4039Subject: Re: Invitation
4040
4041I don't see any wine
4042
4043_ATEOF
4044
4045cat >rc <<'_ATEOF'
4046set hold keepsave
4047save 1 +dest
4048quit
4049_ATEOF
4050
4051export MAIL=inbox
4052export MBOX=mbox
4053> \$MBOX
4054CWD=\$(pwd)
4055MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
4056echo == inbox ==
4057catmbox inbox
4058echo == mbox ==
4059catmbox mbox
4060echo == dest ==
4061catmbox dest
4062
4063"
4064at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:272"
4065( $at_check_trace; cat >inbox <<'_ATEOF'
4066From hare@wonder.land Mon Jul 29 22:00:08 2002
4067From: March Hare  <hare@wonder.land>
4068To: Alice  <alice@wonder.land>
4069Subject: Invitation
4070
4071Have some wine
4072
4073From alice@wonder.land Mon Jul 29 22:00:09 2002
4074From: Alice  <alice@wonder.land>
4075To: March Hare  <hare@wonder.land>
4076Subject: Re: Invitation
4077
4078I don't see any wine
4079
4080_ATEOF
4081
4082cat >rc <<'_ATEOF'
4083set hold keepsave
4084save 1 +dest
4085quit
4086_ATEOF
4087
4088export MAIL=inbox
4089export MBOX=mbox
4090> $MBOX
4091CWD=$(pwd)
4092MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
4093echo == inbox ==
4094catmbox inbox
4095echo == mbox ==
4096catmbox mbox
4097echo == dest ==
4098catmbox dest
4099
4100
4101) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4102at_status=$? at_failed=false
4103$at_check_filter
4104at_fn_diff_devnull "$at_stderr" || at_failed=:
4105echo >>"$at_stdout"; $as_echo "\"./dest\"   7/152
4106Held 2 messages in ./inbox
4107== inbox ==
4108From hare@wonder.land Mon Jul 29 22:00:08 2002
4109From: March Hare  <hare@wonder.land>
4110To: Alice  <alice@wonder.land>
4111Subject: Invitation
4112Status: O
4113
4114Have some wine
4115
4116From alice@wonder.land Mon Jul 29 22:00:09 2002
4117From: Alice  <alice@wonder.land>
4118To: March Hare  <hare@wonder.land>
4119Subject: Re: Invitation
4120Status: O
4121
4122I don't see any wine
4123
4124== mbox ==
4125== dest ==
4126From hare@wonder.land Mon Jul 29 22:00:08 2002
4127From: March Hare  <hare@wonder.land>
4128To: Alice  <alice@wonder.land>
4129Subject: Invitation
4130
4131Have some wine
4132
4133" | \
4134  $at_diff - "$at_stdout" || at_failed=:
4135at_fn_check_status 0 $at_status "$at_srcdir/hold.at:272"
4136$at_failed && at_fn_log_failure
4137$at_traceon; }
4138
4139  set +x
4140  $at_times_p && times >"$at_times_file"
4141) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4142read at_status <"$at_status_file"
4143#AT_STOP_18
4144#AT_START_19
4145at_fn_group_banner 19 'hold.at:315' \
4146  "save (hold nokeepsave)" "                         " 1
4147at_xfail=no
4148(
4149  $as_echo "19. $at_setup_line: testing $at_desc ..."
4150  $at_traceon
4151
4152{ set +x
4153$as_echo "$at_srcdir/hold.at:315: cat >inbox <<'_ATEOF'
4154From hare@wonder.land Mon Jul 29 22:00:08 2002
4155From: March Hare  <hare@wonder.land>
4156To: Alice  <alice@wonder.land>
4157Subject: Invitation
4158
4159Have some wine
4160
4161From alice@wonder.land Mon Jul 29 22:00:09 2002
4162From: Alice  <alice@wonder.land>
4163To: March Hare  <hare@wonder.land>
4164Subject: Re: Invitation
4165
4166I don't see any wine
4167
4168_ATEOF
4169
4170cat >rc <<'_ATEOF'
4171set hold nokeepsave
4172save 1 +dest
4173quit
4174_ATEOF
4175
4176export MAIL=inbox
4177export MBOX=mbox
4178> \$MBOX
4179CWD=\$(pwd)
4180MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E \"set folder=\$CWD\" < rc | cwdrepl | sed -e 's/  *\$//'
4181echo == inbox ==
4182catmbox inbox
4183echo == mbox ==
4184catmbox mbox
4185echo == dest ==
4186catmbox dest
4187
4188"
4189at_fn_check_prepare_notrace 'a $(...) command substitution' "hold.at:315"
4190( $at_check_trace; cat >inbox <<'_ATEOF'
4191From hare@wonder.land Mon Jul 29 22:00:08 2002
4192From: March Hare  <hare@wonder.land>
4193To: Alice  <alice@wonder.land>
4194Subject: Invitation
4195
4196Have some wine
4197
4198From alice@wonder.land Mon Jul 29 22:00:09 2002
4199From: Alice  <alice@wonder.land>
4200To: March Hare  <hare@wonder.land>
4201Subject: Re: Invitation
4202
4203I don't see any wine
4204
4205_ATEOF
4206
4207cat >rc <<'_ATEOF'
4208set hold nokeepsave
4209save 1 +dest
4210quit
4211_ATEOF
4212
4213export MAIL=inbox
4214export MBOX=mbox
4215> $MBOX
4216CWD=$(pwd)
4217MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -N -E "set folder=$CWD" < rc | cwdrepl | sed -e 's/  *$//'
4218echo == inbox ==
4219catmbox inbox
4220echo == mbox ==
4221catmbox mbox
4222echo == dest ==
4223catmbox dest
4224
4225
4226) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4227at_status=$? at_failed=false
4228$at_check_filter
4229at_fn_diff_devnull "$at_stderr" || at_failed=:
4230echo >>"$at_stdout"; $as_echo "\"./dest\"   7/152
4231Held 1 message in ./inbox
4232== inbox ==
4233From alice@wonder.land Mon Jul 29 22:00:09 2002
4234From: Alice  <alice@wonder.land>
4235To: March Hare  <hare@wonder.land>
4236Subject: Re: Invitation
4237Status: O
4238
4239I don't see any wine
4240
4241== mbox ==
4242== dest ==
4243From hare@wonder.land Mon Jul 29 22:00:08 2002
4244From: March Hare  <hare@wonder.land>
4245To: Alice  <alice@wonder.land>
4246Subject: Invitation
4247
4248Have some wine
4249
4250" | \
4251  $at_diff - "$at_stdout" || at_failed=:
4252at_fn_check_status 0 $at_status "$at_srcdir/hold.at:315"
4253$at_failed && at_fn_log_failure
4254$at_traceon; }
4255
4256  set +x
4257  $at_times_p && times >"$at_times_file"
4258) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4259read at_status <"$at_status_file"
4260#AT_STOP_19
4261#AT_START_20
4262at_fn_group_banner 20 'send.at:17' \
4263  "send" "                                           " 2
4264at_xfail=no
4265(
4266  $as_echo "20. $at_setup_line: testing $at_desc ..."
4267  $at_traceon
4268
4269
4270cat >text <<'_ATEOF'
4271Test message.
4272Bye.
4273_ATEOF
4274
4275
4276{ set +x
4277$as_echo "$at_srcdir/send.at:24: unset MAIL_DUMP
4278MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E \"set sendmail=\$MAILER\" -s 'Test 22.1' gray@example.org < text
4279sed -e '/^SENDER:/d' \\
4280    -e '/^LENGTH:/d' \\
4281    -e '/^Date:/d' \\
4282    -e '/^User-Agent:/d' mail.dump"
4283at_fn_check_prepare_notrace 'an embedded newline' "send.at:24"
4284( $at_check_trace; unset MAIL_DUMP
4285MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E "set sendmail=$MAILER" -s 'Test 22.1' gray@example.org < text
4286sed -e '/^SENDER:/d' \
4287    -e '/^LENGTH:/d' \
4288    -e '/^Date:/d' \
4289    -e '/^User-Agent:/d' mail.dump
4290) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4291at_status=$? at_failed=false
4292$at_check_filter
4293at_fn_diff_devnull "$at_stderr" || at_failed=:
4294echo >>"$at_stdout"; $as_echo "MSGID: 0001
4295NRCPT: 1
4296RCPT[0]: <gray@example.org>
4297Subject: Test 22.1
4298To: <gray@example.org>
4299
4300Test message.
4301Bye.
4302
4303" | \
4304  $at_diff - "$at_stdout" || at_failed=:
4305at_fn_check_status 0 $at_status "$at_srcdir/send.at:24"
4306$at_failed && at_fn_log_failure
4307$at_traceon; }
4308
4309
4310  set +x
4311  $at_times_p && times >"$at_times_file"
4312) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4313read at_status <"$at_status_file"
4314#AT_STOP_20
4315#AT_START_21
4316at_fn_group_banner 21 'sendrec.at:17' \
4317  "send (record)" "                                  " 2
4318at_xfail=no
4319(
4320  $as_echo "21. $at_setup_line: testing $at_desc ..."
4321  $at_traceon
4322
4323
4324cat >text <<'_ATEOF'
4325Test message.
4326Bye.
4327_ATEOF
4328
4329
4330#
4331# Send with record
4332#
4333{ set +x
4334$as_echo "$at_srcdir/sendrec.at:27: unset MAIL_DUMP
4335RECORD=\$(pwd)/record
4336MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E \"set sendmail=\$MAILER\" -E \"set record=\$RECORD\" -s 'Test 22.2' gray@example.org < text
4337"
4338at_fn_check_prepare_notrace 'a $(...) command substitution' "sendrec.at:27"
4339( $at_check_trace; unset MAIL_DUMP
4340RECORD=$(pwd)/record
4341MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E "set sendmail=$MAILER" -E "set record=$RECORD" -s 'Test 22.2' gray@example.org < text
4342
4343) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4344at_status=$? at_failed=false
4345$at_check_filter
4346at_fn_diff_devnull "$at_stderr" || at_failed=:
4347at_fn_diff_devnull "$at_stdout" || at_failed=:
4348at_fn_check_status 0 $at_status "$at_srcdir/sendrec.at:27"
4349$at_failed && at_fn_log_failure
4350$at_traceon; }
4351
4352
4353{ set +x
4354$as_echo "$at_srcdir/sendrec.at:32:
4355sed -e '/^SENDER:/d' \\
4356    -e '/^LENGTH:/d' \\
4357    -e '/^Date:/d' \\
4358    -e '/^User-Agent:/d' mail.dump"
4359at_fn_check_prepare_notrace 'an embedded newline' "sendrec.at:32"
4360( $at_check_trace;
4361sed -e '/^SENDER:/d' \
4362    -e '/^LENGTH:/d' \
4363    -e '/^Date:/d' \
4364    -e '/^User-Agent:/d' mail.dump
4365) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4366at_status=$? at_failed=false
4367$at_check_filter
4368at_fn_diff_devnull "$at_stderr" || at_failed=:
4369echo >>"$at_stdout"; $as_echo "MSGID: 0001
4370NRCPT: 1
4371RCPT[0]: <gray@example.org>
4372Subject: Test 22.2
4373To: <gray@example.org>
4374
4375Test message.
4376Bye.
4377
4378" | \
4379  $at_diff - "$at_stdout" || at_failed=:
4380at_fn_check_status 0 $at_status "$at_srcdir/sendrec.at:32"
4381$at_failed && at_fn_log_failure
4382$at_traceon; }
4383
4384
4385{ set +x
4386$as_echo "$at_srcdir/sendrec.at:49:
4387sed -e '1s/^From .*/Envelope/' \\
4388    -e '/^X-[a-zA-Z]*:/d' \\
4389    -e '/^User-Agent:/d' \\
4390    -e '/^Date:/d' record"
4391at_fn_check_prepare_notrace 'an embedded newline' "sendrec.at:49"
4392( $at_check_trace;
4393sed -e '1s/^From .*/Envelope/' \
4394    -e '/^X-[a-zA-Z]*:/d' \
4395    -e '/^User-Agent:/d' \
4396    -e '/^Date:/d' record
4397) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4398at_status=$? at_failed=false
4399$at_check_filter
4400at_fn_diff_devnull "$at_stderr" || at_failed=:
4401echo >>"$at_stdout"; $as_echo "Envelope
4402Subject: Test 22.2
4403To: <gray@example.org>
4404
4405Test message.
4406Bye.
4407
4408" | \
4409  $at_diff - "$at_stdout" || at_failed=:
4410at_fn_check_status 0 $at_status "$at_srcdir/sendrec.at:49"
4411$at_failed && at_fn_log_failure
4412$at_traceon; }
4413
4414
4415  set +x
4416  $at_times_p && times >"$at_times_file"
4417) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4418read at_status <"$at_status_file"
4419#AT_STOP_21
4420#AT_START_22
4421at_fn_group_banner 22 'sendbyname.at:17' \
4422  "send -F" "                                        " 2
4423at_xfail=no
4424(
4425  $as_echo "22. $at_setup_line: testing $at_desc ..."
4426  $at_traceon
4427
4428
4429cat >text <<'_ATEOF'
4430Test message.
4431Bye.
4432_ATEOF
4433
4434
4435#
4436# Send with record by name
4437#
4438{ set +x
4439$as_echo "$at_srcdir/sendbyname.at:27: touch record
4440mkdir folder outfolder
4441"
4442at_fn_check_prepare_notrace 'an embedded newline' "sendbyname.at:27"
4443( $at_check_trace; touch record
4444mkdir folder outfolder
4445
4446) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4447at_status=$? at_failed=false
4448$at_check_filter
4449at_fn_diff_devnull "$at_stderr" || at_failed=:
4450at_fn_diff_devnull "$at_stdout" || at_failed=:
4451at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:27"
4452$at_failed && at_fn_log_failure
4453$at_traceon; }
4454
4455
4456{ set +x
4457$as_echo "$at_srcdir/sendbyname.at:31: unset MAIL_DUMP
4458MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E \"set sendmail=\$MAILER\" \\
4459             -E \"set record=\$(pwd)/record\" \\
4460	     -E \"set folder=\$(pwd)/folder\" \\
4461	     -E \"set outfolder\" \\
4462	     -F \\
4463	     -s 'Test 22.3' gray@example.org < text
4464"
4465at_fn_check_prepare_notrace 'a $(...) command substitution' "sendbyname.at:31"
4466( $at_check_trace; unset MAIL_DUMP
4467MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E "set sendmail=$MAILER" \
4468             -E "set record=$(pwd)/record" \
4469	     -E "set folder=$(pwd)/folder" \
4470	     -E "set outfolder" \
4471	     -F \
4472	     -s 'Test 22.3' gray@example.org < text
4473
4474) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4475at_status=$? at_failed=false
4476$at_check_filter
4477at_fn_diff_devnull "$at_stderr" || at_failed=:
4478at_fn_diff_devnull "$at_stdout" || at_failed=:
4479at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:31"
4480$at_failed && at_fn_log_failure
4481$at_traceon; }
4482
4483
4484{ set +x
4485$as_echo "$at_srcdir/sendbyname.at:40:
4486sed -e '/^SENDER:/d' \\
4487    -e '/^LENGTH:/d' \\
4488    -e '/^Date:/d' \\
4489    -e '/^User-Agent:/d' mail.dump"
4490at_fn_check_prepare_notrace 'an embedded newline' "sendbyname.at:40"
4491( $at_check_trace;
4492sed -e '/^SENDER:/d' \
4493    -e '/^LENGTH:/d' \
4494    -e '/^Date:/d' \
4495    -e '/^User-Agent:/d' mail.dump
4496) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4497at_status=$? at_failed=false
4498$at_check_filter
4499at_fn_diff_devnull "$at_stderr" || at_failed=:
4500echo >>"$at_stdout"; $as_echo "MSGID: 0001
4501NRCPT: 1
4502RCPT[0]: <gray@example.org>
4503Subject: Test 22.3
4504To: <gray@example.org>
4505
4506Test message.
4507Bye.
4508
4509" | \
4510  $at_diff - "$at_stdout" || at_failed=:
4511at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:40"
4512$at_failed && at_fn_log_failure
4513$at_traceon; }
4514
4515
4516{ set +x
4517$as_echo "$at_srcdir/sendbyname.at:57: cat record"
4518at_fn_check_prepare_trace "sendbyname.at:57"
4519( $at_check_trace; cat record
4520) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4521at_status=$? at_failed=false
4522$at_check_filter
4523at_fn_diff_devnull "$at_stderr" || at_failed=:
4524at_fn_diff_devnull "$at_stdout" || at_failed=:
4525at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:57"
4526$at_failed && at_fn_log_failure
4527$at_traceon; }
4528
4529
4530{ set +x
4531$as_echo "$at_srcdir/sendbyname.at:59:
4532sed -e '1s/^From .*/Envelope/' \\
4533    -e '/^X-[a-zA-Z]*:/d' \\
4534    -e '/^User-Agent:/d' \\
4535    -e '/^Date:/d' folder/gray"
4536at_fn_check_prepare_notrace 'an embedded newline' "sendbyname.at:59"
4537( $at_check_trace;
4538sed -e '1s/^From .*/Envelope/' \
4539    -e '/^X-[a-zA-Z]*:/d' \
4540    -e '/^User-Agent:/d' \
4541    -e '/^Date:/d' folder/gray
4542) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4543at_status=$? at_failed=false
4544$at_check_filter
4545at_fn_diff_devnull "$at_stderr" || at_failed=:
4546echo >>"$at_stdout"; $as_echo "Envelope
4547Subject: Test 22.3
4548To: <gray@example.org>
4549
4550Test message.
4551Bye.
4552
4553" | \
4554  $at_diff - "$at_stdout" || at_failed=:
4555at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:59"
4556$at_failed && at_fn_log_failure
4557$at_traceon; }
4558
4559
4560#
4561# Send with record by name
4562#
4563{ set +x
4564$as_echo "$at_srcdir/sendbyname.at:77: unset MAIL_DUMP
4565MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E \"set sendmail=\$MAILER\" \\
4566             -E \"set record=\$(pwd)/record\" \\
4567	     -E \"set folder=\$(pwd)/folder\" \\
4568	     -E \"set outfolder=\$(pwd)/outfolder\" \\
4569	     -F \\
4570	     -s 'Test 22.3' gray@example.org < text
4571"
4572at_fn_check_prepare_notrace 'a $(...) command substitution' "sendbyname.at:77"
4573( $at_check_trace; unset MAIL_DUMP
4574MAILRC=/dev/null mail  --no-config  --set '.mailbox.mailbox-type=mbox'  -E "set sendmail=$MAILER" \
4575             -E "set record=$(pwd)/record" \
4576	     -E "set folder=$(pwd)/folder" \
4577	     -E "set outfolder=$(pwd)/outfolder" \
4578	     -F \
4579	     -s 'Test 22.3' gray@example.org < text
4580
4581) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4582at_status=$? at_failed=false
4583$at_check_filter
4584at_fn_diff_devnull "$at_stderr" || at_failed=:
4585at_fn_diff_devnull "$at_stdout" || at_failed=:
4586at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:77"
4587$at_failed && at_fn_log_failure
4588$at_traceon; }
4589
4590
4591{ set +x
4592$as_echo "$at_srcdir/sendbyname.at:86:
4593sed -e '/^SENDER:/d' \\
4594    -e '/^LENGTH:/d' \\
4595    -e '/^Date:/d' \\
4596    -e '/^User-Agent:/d' mail.dump"
4597at_fn_check_prepare_notrace 'an embedded newline' "sendbyname.at:86"
4598( $at_check_trace;
4599sed -e '/^SENDER:/d' \
4600    -e '/^LENGTH:/d' \
4601    -e '/^Date:/d' \
4602    -e '/^User-Agent:/d' mail.dump
4603) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4604at_status=$? at_failed=false
4605$at_check_filter
4606at_fn_diff_devnull "$at_stderr" || at_failed=:
4607echo >>"$at_stdout"; $as_echo "MSGID: 0001
4608NRCPT: 1
4609RCPT[0]: <gray@example.org>
4610Subject: Test 22.3
4611To: <gray@example.org>
4612
4613Test message.
4614Bye.
4615
4616" | \
4617  $at_diff - "$at_stdout" || at_failed=:
4618at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:86"
4619$at_failed && at_fn_log_failure
4620$at_traceon; }
4621
4622
4623{ set +x
4624$as_echo "$at_srcdir/sendbyname.at:103: cat record"
4625at_fn_check_prepare_trace "sendbyname.at:103"
4626( $at_check_trace; cat record
4627) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4628at_status=$? at_failed=false
4629$at_check_filter
4630at_fn_diff_devnull "$at_stderr" || at_failed=:
4631at_fn_diff_devnull "$at_stdout" || at_failed=:
4632at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:103"
4633$at_failed && at_fn_log_failure
4634$at_traceon; }
4635
4636
4637{ set +x
4638$as_echo "$at_srcdir/sendbyname.at:105:
4639sed -e '1s/^From .*/Envelope/' \\
4640    -e '/^X-[a-zA-Z]*:/d' \\
4641    -e '/^User-Agent:/d' \\
4642    -e '/^Date:/d' outfolder/gray record"
4643at_fn_check_prepare_notrace 'an embedded newline' "sendbyname.at:105"
4644( $at_check_trace;
4645sed -e '1s/^From .*/Envelope/' \
4646    -e '/^X-[a-zA-Z]*:/d' \
4647    -e '/^User-Agent:/d' \
4648    -e '/^Date:/d' outfolder/gray record
4649) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4650at_status=$? at_failed=false
4651$at_check_filter
4652at_fn_diff_devnull "$at_stderr" || at_failed=:
4653echo >>"$at_stdout"; $as_echo "Envelope
4654Subject: Test 22.3
4655To: <gray@example.org>
4656
4657Test message.
4658Bye.
4659
4660" | \
4661  $at_diff - "$at_stdout" || at_failed=:
4662at_fn_check_status 0 $at_status "$at_srcdir/sendbyname.at:105"
4663$at_failed && at_fn_log_failure
4664$at_traceon; }
4665
4666
4667  set +x
4668  $at_times_p && times >"$at_times_file"
4669) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4670read at_status <"$at_status_file"
4671#AT_STOP_22
4672