Debian Codegraph @

libproto/mbox/tests/testsuite

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