Debian Codegraph @

libproto/maildir/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:16;format detection;autodetect;
614 2;count.at:17;message count;;
615 3;attr.at:17;attributes;;
616 4;envelope.at:17;envelope;;
617 5;header.at:17;header;;
618 6;body.at:17;body;;
619 7;uid.at:17;uid;;
620 8;uidvalidity.at:17;uidvalidity;;
621 9;qget.at:17;qget access;;
622 10;new.at:17;deliver messages from new;;
623 11;append.at:17;append;;
624 12;notify.at:17;append notification;;
625 13;delete.at:17;delete;;
626 14;uidnext.at:17;UID monotonicity;;
627 15;attfixup.at:17;attribute fixup;;
628 16;uidfixup.at:17;uid fixup;;
629 17;isyncread.at:17;isync: reading;isync isyncread;
630 18;isyncwrite.at:17;isync: writing;isync isyncwrite;
631 19;isynccreat.at:17;isync: creating;isync isynccreat;
632 "
633 # List of the all the test groups.
634 at_groups_all=`printf "%s\n" "$at_help_all" | sed 's/;.*//'`
635
636 # at_fn_validate_ranges NAME...
637 # -----------------------------
638 # Validate and normalize the test group number contained in each variable
639 # NAME. Leading zeroes are treated as decimal.
640 at_fn_validate_ranges ()
641 {
642 for at_grp
643 do
644 eval at_value=\$$at_grp
645 if test $at_value -lt 1 || test $at_value -gt 19; then
646 printf "%s\n" "invalid test group: $at_value" >&2
647 exit 1
648 fi
649 case $at_value in
650 0*) # We want to treat leading 0 as decimal, like expr and test, but
651 # AS_VAR_ARITH treats it as octal if it uses $(( )).
652 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
653 # expr fork, but it is not worth the effort to determine if the
654 # shell supports XSI when the user can just avoid leading 0.
655 eval $at_grp='`expr $at_value + 0`' ;;
656 esac
657 done
658 }
659
660 at_prev=
661 for at_option
662 do
663 # If the previous option needs an argument, assign it.
664 if test -n "$at_prev"; then
665 at_option=$at_prev=$at_option
666 at_prev=
667 fi
668
669 case $at_option in
670 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
671 *) at_optarg= ;;
672 esac
673
674 case $at_option in
675 --help | -h )
676 at_help_p=:
677 ;;
678
679 --list | -l )
680 at_list_p=:
681 ;;
682
683 --version | -V )
684 at_version_p=:
685 ;;
686
687 --clean | -c )
688 at_clean=:
689 ;;
690
691 --color )
692 at_color=always
693 ;;
694 --color=* )
695 case $at_optarg in
696 no | never | none) at_color=never ;;
697 auto | tty | if-tty) at_color=auto ;;
698 always | yes | force) at_color=always ;;
699 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
700 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
701 esac
702 ;;
703
704 --debug | -d )
705 at_debug_p=:
706 ;;
707
708 --errexit | -e )
709 at_debug_p=:
710 at_errexit_p=:
711 ;;
712
713 --verbose | -v )
714 at_verbose=; at_quiet=:
715 ;;
716
717 --trace | -x )
718 at_traceon='set -x'
719 at_trace_echo=echo
720 at_check_filter_trace=at_fn_filter_trace
721 ;;
722
723 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
724 at_fn_validate_ranges at_option
725 as_fn_append at_groups "$at_option$as_nl"
726 ;;
727
728 # Ranges
729 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
730 at_range_start=`echo $at_option |tr -d X-`
731 at_fn_validate_ranges at_range_start
732 at_range=`printf "%s\n" "$at_groups_all" | \
733 sed -ne '/^'$at_range_start'$/,$p'`
734 as_fn_append at_groups "$at_range$as_nl"
735 ;;
736
737 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
738 at_range_end=`echo $at_option |tr -d X-`
739 at_fn_validate_ranges at_range_end
740 at_range=`printf "%s\n" "$at_groups_all" | \
741 sed -ne '1,/^'$at_range_end'$/p'`
742 as_fn_append at_groups "$at_range$as_nl"
743 ;;
744
745 [0-9]-[0-9] | [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][0-9] | \
747 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
748 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
749 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
750 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
751 at_range_start=`expr $at_option : '\(.*\)-'`
752 at_range_end=`expr $at_option : '.*-\(.*\)'`
753 if test $at_range_start -gt $at_range_end; then
754 at_tmp=$at_range_end
755 at_range_end=$at_range_start
756 at_range_start=$at_tmp
757 fi
758 at_fn_validate_ranges at_range_start at_range_end
759 at_range=`printf "%s\n" "$at_groups_all" | \
760 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
761 as_fn_append at_groups "$at_range$as_nl"
762 ;;
763
764 # Directory selection.
765 --directory | -C )
766 at_prev=--directory
767 ;;
768 --directory=* )
769 at_change_dir=:
770 at_dir=$at_optarg
771 if test x- = "x$at_dir" ; then
772 at_dir=./-
773 fi
774 ;;
775
776 # Parallel execution.
777 --jobs | -j )
778 at_jobs=0
779 ;;
780 --jobs=* | -j[0-9]* )
781 if test -n "$at_optarg"; then
782 at_jobs=$at_optarg
783 else
784 at_jobs=`expr X$at_option : 'X-j\(.*\)'`
785 fi
786 case $at_jobs in *[!0-9]*)
787 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
788 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
789 esac
790 ;;
791
792 # Keywords.
793 --keywords | -k )
794 at_prev=--keywords
795 ;;
796 --keywords=* )
797 at_groups_selected=$at_help_all
798 at_save_IFS=$IFS
799 IFS=,
800 set X $at_optarg
801 shift
802 IFS=$at_save_IFS
803 for at_keyword
804 do
805 at_invert=
806 case $at_keyword in
807 '!'*)
808 at_invert="-v"
809 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
810 ;;
811 esac
812 # It is on purpose that we match the test group titles too.
813 at_groups_selected=`printf "%s\n" "$at_groups_selected" |
814 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
815 done
816 # Smash the keywords.
817 at_groups_selected=`printf "%s\n" "$at_groups_selected" | sed 's/;.*//'`
818 as_fn_append at_groups "$at_groups_selected$as_nl"
819 ;;
820 --recheck)
821 at_recheck=:
822 ;;
823
824 *=*)
825 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
826 # Reject names that are not valid shell variable names.
827 case $at_envvar in
828 '' | [0-9]* | *[!_$as_cr_alnum]* )
829 as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
830 esac
831 at_value=`printf "%s\n" "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
832 # Export now, but save eval for later and for debug scripts.
833 export $at_envvar
834 as_fn_append at_debug_args " $at_envvar='$at_value'"
835 ;;
836
837 *) printf "%s\n" "$as_me: invalid option: $at_option" >&2
838 printf "%s\n" "Try \`$0 --help' for more information." >&2
839 exit 1
840 ;;
841 esac
842 done
843
844 # Verify our last option didn't require an argument
845 if test -n "$at_prev"
846 then :
847 as_fn_error $? "\`$at_prev' requires an argument"
848 fi
849
850 # The file containing the suite.
851 at_suite_log=$at_dir/$as_me.log
852
853 # Selected test groups.
854 if test -z "$at_groups$at_recheck"; then
855 at_groups=$at_groups_all
856 else
857 if test -n "$at_recheck" && test -r "$at_suite_log"; then
858 at_oldfails=`sed -n '
859 /^Failed tests:$/,/^Skipped tests:$/{
860 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
861 }
862 /^Unexpected passes:$/,/^## Detailed failed tests/{
863 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
864 }
865 /^## Detailed failed tests/q
866 ' "$at_suite_log"`
867 as_fn_append at_groups "$at_oldfails$as_nl"
868 fi
869 # Sort the tests, removing duplicates.
870 at_groups=`printf "%s\n" "$at_groups" | sort -nu | sed '/^$/d'`
871 fi
872
873 if test x"$at_color" = xalways \
874 || { test x"$at_color" = xauto && test -t 1; }; then
875 at_red=`printf '\033[0;31m'`
876 at_grn=`printf '\033[0;32m'`
877 at_lgn=`printf '\033[1;32m'`
878 at_blu=`printf '\033[1;34m'`
879 at_std=`printf '\033[m'`
880 else
881 at_red= at_grn= at_lgn= at_blu= at_std=
882 fi
883
884 # Help message.
885 if $at_help_p; then
886 cat <<_ATEOF || at_write_fail=1
887 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
888
889 Run all the tests, or the selected TESTS, given by numeric ranges, and
890 save a detailed log file. Upon failure, create debugging scripts.
891
892 Do not change environment variables directly. Instead, set them via
893 command line arguments. Set \`AUTOTEST_PATH' to select the executables
894 to exercise. Each relative directory is expanded as build and source
895 directories relative to the top level of this distribution.
896 E.g., from within the build directory /tmp/foo-1.0, invoking this:
897
898 $ $0 AUTOTEST_PATH=bin
899
900 is equivalent to the following, assuming the source directory is /src/foo-1.0:
901
902 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
903 _ATEOF
904 cat <<_ATEOF || at_write_fail=1
905
906 Operation modes:
907 -h, --help print the help message, then exit
908 -V, --version print version number, then exit
909 -c, --clean remove all the files this test suite might create and exit
910 -l, --list describes all the tests, or the selected TESTS
911 _ATEOF
912 cat <<_ATEOF || at_write_fail=1
913
914 Execution tuning:
915 -C, --directory=DIR
916 change to directory DIR before starting
917 --color[=never|auto|always]
918 enable colored test results on terminal, or always
919 -j, --jobs[=N]
920 Allow N jobs at once; infinite jobs with no arg (default 1)
921 -k, --keywords=KEYWORDS
922 select the tests matching all the comma-separated KEYWORDS
923 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
924 --recheck select all tests that failed or passed unexpectedly last time
925 -e, --errexit abort as soon as a test fails; implies --debug
926 -v, --verbose force more detailed output
927 default for debugging scripts
928 -d, --debug inhibit clean up and top-level logging
929 default for debugging scripts
930 -x, --trace enable tests shell tracing
931 _ATEOF
932 cat <<_ATEOF || at_write_fail=1
933
934 Report bugs to <[email protected]>.
935 General help using GNU software: <https://www.gnu.org/gethelp/>.
936 _ATEOF
937 exit $at_write_fail
938 fi
939
940 # List of tests.
941 if $at_list_p; then
942 cat <<_ATEOF || at_write_fail=1
943 GNU Mailutils 3.20 test suite test groups:
944
945 NUM: FILE-NAME:LINE TEST-GROUP-NAME
946 KEYWORDS
947
948 _ATEOF
949 # Pass an empty line as separator between selected groups and help.
950 printf "%s\n" "$at_groups$as_nl$as_nl$at_help_all" |
951 awk 'NF == 1 && FS != ";" {
952 selected[$ 1] = 1
953 next
954 }
955 /^$/ { FS = ";" }
956 NF > 0 {
957 if (selected[$ 1]) {
958 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
959 if ($ 4) {
960 lmax = 79
961 indent = " "
962 line = indent
963 len = length (line)
964 n = split ($ 4, a, " ")
965 for (i = 1; i <= n; i++) {
966 l = length (a[i]) + 1
967 if (i > 1 && len + l > lmax) {
968 print line
969 line = indent " " a[i]
970 len = length (line)
971 } else {
972 line = line " " a[i]
973 len += l
974 }
975 }
976 if (n)
977 print line
978 }
979 }
980 }' || at_write_fail=1
981 exit $at_write_fail
982 fi
983 if $at_version_p; then
984 printf "%s\n" "$as_me (GNU Mailutils 3.20)" &&
985 cat <<\_ATEOF || at_write_fail=1
986
987 Copyright (C) 2021 Free Software Foundation, Inc.
988 This test suite is free software; the Free Software Foundation gives
989 unlimited permission to copy, distribute and modify it.
990 _ATEOF
991 exit $at_write_fail
992 fi
993
994 # Should we print banners? Yes if more than one test is run.
995 case $at_groups in #(
996 *$as_nl* )
997 at_print_banners=: ;; #(
998 * ) at_print_banners=false ;;
999 esac
1000 # Text for banner N, set to a single space once printed.
1001 # Banner 1. testsuite.at:42
1002 # Category starts at test group 17.
1003 at_banner_text_1="Compatibility mode"
1004
1005 # Take any -C into account.
1006 if $at_change_dir ; then
1007 test x != "x$at_dir" && cd "$at_dir" \
1008 || as_fn_error $? "unable to change directory"
1009 at_dir=`pwd`
1010 fi
1011
1012 # Load the config files for any default variable assignments.
1013 for at_file in atconfig atlocal
1014 do
1015 test -r $at_file || continue
1016 . ./$at_file || as_fn_error $? "invalid content: $at_file"
1017 done
1018
1019 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1020 : "${at_top_build_prefix=$at_top_builddir}"
1021
1022 # Perform any assignments requested during argument parsing.
1023 eval "$at_debug_args"
1024
1025 # atconfig delivers names relative to the directory the test suite is
1026 # in, but the groups themselves are run in testsuite-dir/group-dir.
1027 if test -n "$at_top_srcdir"; then
1028 builddir=../..
1029 for at_dir_var in srcdir top_srcdir top_build_prefix
1030 do
1031 eval at_val=\$at_$at_dir_var
1032 case $at_val in
1033 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1034 *) at_prefix=../../ ;;
1035 esac
1036 eval "$at_dir_var=\$at_prefix\$at_val"
1037 done
1038 fi
1039
1040 ## -------------------- ##
1041 ## Directory structure. ##
1042 ## -------------------- ##
1043
1044 # This is the set of directories and files used by this script
1045 # (non-literals are capitalized):
1046 #
1047 # TESTSUITE - the testsuite
1048 # TESTSUITE.log - summarizes the complete testsuite run
1049 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1050 # + at-groups/ - during a run: status of all groups in run
1051 # | + NNN/ - during a run: meta-data about test group NNN
1052 # | | + check-line - location (source file and line) of current AT_CHECK
1053 # | | + status - exit status of current AT_CHECK
1054 # | | + stdout - stdout of current AT_CHECK
1055 # | | + stder1 - stderr, including trace
1056 # | | + stderr - stderr, with trace filtered out
1057 # | | + test-source - portion of testsuite that defines group
1058 # | | + times - timestamps for computing duration
1059 # | | + pass - created if group passed
1060 # | | + xpass - created if group xpassed
1061 # | | + fail - created if group failed
1062 # | | + xfail - created if group xfailed
1063 # | | + skip - created if group skipped
1064 # + at-stop - during a run: end the run if this file exists
1065 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1066 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1067 # | + TESTSUITE.log - summarizes the group results
1068 # | + ... - files created during the group
1069
1070 # The directory the whole suite works in.
1071 # Should be absolute to let the user `cd' at will.
1072 at_suite_dir=$at_dir/$as_me.dir
1073 # The file containing the suite ($at_dir might have changed since earlier).
1074 at_suite_log=$at_dir/$as_me.log
1075 # The directory containing helper files per test group.
1076 at_helper_dir=$at_suite_dir/at-groups
1077 # Stop file: if it exists, do not start new jobs.
1078 at_stop_file=$at_suite_dir/at-stop
1079 # The fifo used for the job dispatcher.
1080 at_job_fifo=$at_suite_dir/at-job-fifo
1081
1082 if $at_clean; then
1083 test -d "$at_suite_dir" &&
1084 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1085 rm -f -r "$at_suite_dir" "$at_suite_log"
1086 exit $?
1087 fi
1088
1089 # Don't take risks: use only absolute directories in PATH.
1090 #
1091 # For stand-alone test suites (ie. atconfig was not found),
1092 # AUTOTEST_PATH is relative to `.'.
1093 #
1094 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1095 # of the package. Then expand it into build/src parts, since users
1096 # may create executables in both places.
1097 AUTOTEST_PATH=`printf "%s\n" "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1098 at_path=
1099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1100 for as_dir in $AUTOTEST_PATH $PATH
1101 do
1102 IFS=$as_save_IFS
1103 case $as_dir in #(((
1104 '') as_dir=./ ;;
1105 */) ;;
1106 *) as_dir=$as_dir/ ;;
1107 esac
1108 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1109 case $as_dir in
1110 [\\/]* | ?:[\\/]* )
1111 as_fn_append at_path "$as_dir"
1112 ;;
1113 * )
1114 if test -z "$at_top_build_prefix"; then
1115 # Stand-alone test suite.
1116 as_fn_append at_path "$as_dir"
1117 else
1118 # Embedded test suite.
1119 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1120 as_fn_append at_path "$at_top_srcdir/$as_dir"
1121 fi
1122 ;;
1123 esac
1124 done
1125 IFS=$as_save_IFS
1126
1127
1128 # Now build and simplify PATH.
1129 #
1130 # There might be directories that don't exist, but don't redirect
1131 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1132 at_new_path=
1133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1134 for as_dir in $at_path
1135 do
1136 IFS=$as_save_IFS
1137 case $as_dir in #(((
1138 '') as_dir=./ ;;
1139 */) ;;
1140 *) as_dir=$as_dir/ ;;
1141 esac
1142 test -d "$as_dir" || continue
1143 case $as_dir in
1144 [\\/]* | ?:[\\/]* ) ;;
1145 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1146 esac
1147 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1148 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1149 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1150 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1151 esac
1152 done
1153 IFS=$as_save_IFS
1154
1155 PATH=$at_new_path
1156 export PATH
1157
1158 # Setting up the FDs.
1159
1160
1161
1162 # 5 is the log file. Not to be overwritten if `-d'.
1163 if $at_debug_p; then
1164 at_suite_log=/dev/null
1165 else
1166 : >"$at_suite_log"
1167 fi
1168 exec 5>>"$at_suite_log"
1169
1170 # Banners and logs.
1171 printf "%s\n" "## ------------------------------ ##
1172 ## GNU Mailutils 3.20 test suite. ##
1173 ## ------------------------------ ##"
1174 {
1175 printf "%s\n" "## ------------------------------ ##
1176 ## GNU Mailutils 3.20 test suite. ##
1177 ## ------------------------------ ##"
1178 echo
1179
1180 printf "%s\n" "$as_me: command line was:"
1181 printf "%s\n" " \$ $0 $at_cli_args"
1182 echo
1183
1184 # If ChangeLog exists, list a few lines in case it might help determining
1185 # the exact version.
1186 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1187 printf "%s\n" "## ---------- ##
1188 ## ChangeLog. ##
1189 ## ---------- ##"
1190 echo
1191 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1192 echo
1193 fi
1194
1195 {
1196 cat <<_ASUNAME
1197 ## --------- ##
1198 ## Platform. ##
1199 ## --------- ##
1200
1201 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1202 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1203 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1204 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1205 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1206
1207 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1208 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1209
1210 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1211 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1212 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1213 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1214 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1215 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1216 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1217
1218 _ASUNAME
1219
1220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1221 for as_dir in $PATH
1222 do
1223 IFS=$as_save_IFS
1224 case $as_dir in #(((
1225 '') as_dir=./ ;;
1226 */) ;;
1227 *) as_dir=$as_dir/ ;;
1228 esac
1229 printf "%s\n" "PATH: $as_dir"
1230 done
1231 IFS=$as_save_IFS
1232
1233 }
1234 echo
1235
1236 # Contents of the config files.
1237 for at_file in atconfig atlocal
1238 do
1239 test -r $at_file || continue
1240 printf "%s\n" "$as_me: $at_file:"
1241 sed 's/^/| /' $at_file
1242 echo
1243 done
1244 } >&5
1245
1246 # This setting is needed on FreeBSD to ensure the LD_LIBRARY_PATH overrides
1247 # the DT_RPATH tag in ELF header. See
1248 # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27510
1249 # for details.
1250 LD_LIBRARY_PATH_RPATH=y
1251 export LD_LIBRARY_PATH_RPATH
1252
1253
1254 ## ------------------------- ##
1255 ## Autotest shell functions. ##
1256 ## ------------------------- ##
1257
1258 # at_fn_banner NUMBER
1259 # -------------------
1260 # Output banner NUMBER, provided the testsuite is running multiple groups and
1261 # this particular banner has not yet been printed.
1262 at_fn_banner ()
1263 {
1264 $at_print_banners || return 0
1265 eval at_banner_text=\$at_banner_text_$1
1266 test "x$at_banner_text" = "x " && return 0
1267 eval "at_banner_text_$1=\" \""
1268 if test -z "$at_banner_text"; then
1269 $at_first || echo
1270 else
1271 printf "%s\n" "$as_nl$at_banner_text$as_nl"
1272 fi
1273 } # at_fn_banner
1274
1275 # at_fn_check_prepare_notrace REASON LINE
1276 # ---------------------------------------
1277 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1278 # command; REASON is the reason for disabling tracing.
1279 at_fn_check_prepare_notrace ()
1280 {
1281 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1282 printf "%s\n" "$2" >"$at_check_line_file"
1283 at_check_trace=: at_check_filter=:
1284 : >"$at_stdout"; : >"$at_stderr"
1285 }
1286
1287 # at_fn_check_prepare_trace LINE
1288 # ------------------------------
1289 # Perform AT_CHECK preparations for the command at LINE for a traceable
1290 # command.
1291 at_fn_check_prepare_trace ()
1292 {
1293 printf "%s\n" "$1" >"$at_check_line_file"
1294 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1295 : >"$at_stdout"; : >"$at_stderr"
1296 }
1297
1298 # at_fn_check_prepare_dynamic COMMAND LINE
1299 # ----------------------------------------
1300 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1301 # preparation function.
1302 at_fn_check_prepare_dynamic ()
1303 {
1304 case $1 in
1305 *$as_nl*)
1306 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1307 *)
1308 at_fn_check_prepare_trace "$2" ;;
1309 esac
1310 }
1311
1312 # at_fn_filter_trace
1313 # ------------------
1314 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1315 # them to stderr.
1316 at_fn_filter_trace ()
1317 {
1318 mv "$at_stderr" "$at_stder1"
1319 grep '^ *+' "$at_stder1" >&2
1320 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1321 }
1322
1323 # at_fn_log_failure FILE-LIST
1324 # ---------------------------
1325 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1326 # with a failure exit code.
1327 at_fn_log_failure ()
1328 {
1329 for file
1330 do printf "%s\n" "$file:"; sed 's/^/> /' "$file"; done
1331 echo 1 > "$at_status_file"
1332 exit 1
1333 }
1334
1335 # at_fn_check_skip EXIT-CODE LINE
1336 # -------------------------------
1337 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1338 # the test group subshell with that same exit code. Use LINE in any report
1339 # about test failure.
1340 at_fn_check_skip ()
1341 {
1342 case $1 in
1343 99) echo 99 > "$at_status_file"; at_failed=:
1344 printf "%s\n" "$2: hard failure"; exit 99;;
1345 77) echo 77 > "$at_status_file"; exit 77;;
1346 esac
1347 }
1348
1349 # at_fn_check_status EXPECTED EXIT-CODE LINE
1350 # ------------------------------------------
1351 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1352 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1353 # exit code; if it is anything else print an error message referring to LINE,
1354 # and fail the test.
1355 at_fn_check_status ()
1356 {
1357 case $2 in
1358 $1 ) ;;
1359 77) echo 77 > "$at_status_file"; exit 77;;
1360 99) echo 99 > "$at_status_file"; at_failed=:
1361 printf "%s\n" "$3: hard failure"; exit 99;;
1362 *) printf "%s\n" "$3: exit code was $2, expected $1"
1363 at_failed=:;;
1364 esac
1365 }
1366
1367 # at_fn_diff_devnull FILE
1368 # -----------------------
1369 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1370 # invocations.
1371 at_fn_diff_devnull ()
1372 {
1373 test -s "$1" || return 0
1374 $at_diff "$at_devnull" "$1"
1375 }
1376
1377 # at_fn_test NUMBER
1378 # -----------------
1379 # Parse out test NUMBER from the tail of this file.
1380 at_fn_test ()
1381 {
1382 eval at_sed=\$at_sed$1
1383 sed "$at_sed" "$at_myself" > "$at_test_source"
1384 }
1385
1386 # at_fn_create_debugging_script
1387 # -----------------------------
1388 # Create the debugging script $at_group_dir/run which will reproduce the
1389 # current test group.
1390 at_fn_create_debugging_script ()
1391 {
1392 {
1393 echo "#! /bin/sh" &&
1394 echo 'test ${ZSH_VERSION+y} && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1395 printf "%s\n" "cd '$at_dir'" &&
1396 printf "%s\n" "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1397 echo 'exit 1'
1398 } >"$at_group_dir/run" &&
1399 chmod +x "$at_group_dir/run"
1400 }
1401
1402 ## -------------------------------- ##
1403 ## End of autotest shell functions. ##
1404 ## -------------------------------- ##
1405 {
1406 printf "%s\n" "## ------------------ ##
1407 ## Running the tests. ##
1408 ## ------------------ ##"
1409 } >&5
1410
1411 at_start_date=`date`
1412 at_start_time=`date +%s 2>/dev/null`
1413 printf "%s\n" "$as_me: starting at: $at_start_date" >&5
1414
1415 # Create the master directory if it doesn't already exist.
1416 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1417 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1418
1419 # Can we diff with `/dev/null'? DU 5.0 refuses.
1420 if diff /dev/null /dev/null >/dev/null 2>&1; then
1421 at_devnull=/dev/null
1422 else
1423 at_devnull=$at_suite_dir/devnull
1424 >"$at_devnull"
1425 fi
1426
1427 # Use `diff -u' when possible.
1428 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1429 then
1430 at_diff='diff -u'
1431 else
1432 at_diff=diff
1433 fi
1434
1435 # Get the last needed group.
1436 for at_group in : $at_groups; do :; done
1437
1438 # Extract the start and end lines of each test group at the tail
1439 # of this file
1440 awk '
1441 BEGIN { FS="" }
1442 /^#AT_START_/ {
1443 start = NR
1444 }
1445 /^#AT_STOP_/ {
1446 test = substr ($ 0, 10)
1447 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1448 if (test == "'"$at_group"'") exit
1449 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1450 . "$at_suite_dir/at-source-lines" ||
1451 as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1452 rm -f "$at_suite_dir/at-source-lines"
1453
1454 # Set number of jobs for `-j'; avoid more jobs than test groups.
1455 set X $at_groups; shift; at_max_jobs=$#
1456 if test $at_max_jobs -eq 0; then
1457 at_jobs=1
1458 fi
1459 if test $at_jobs -ne 1 &&
1460 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1461 at_jobs=$at_max_jobs
1462 fi
1463
1464 # If parallel mode, don't output banners, don't split summary lines.
1465 if test $at_jobs -ne 1; then
1466 at_print_banners=false
1467 at_quiet=:
1468 fi
1469
1470 # Set up helper dirs.
1471 rm -rf "$at_helper_dir" &&
1472 mkdir "$at_helper_dir" &&
1473 cd "$at_helper_dir" &&
1474 { test -z "$at_groups" || mkdir $at_groups; } ||
1475 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1476
1477 # Functions for running a test group. We leave the actual
1478 # test group execution outside of a shell function in order
1479 # to avoid hitting zsh 4.x exit status bugs.
1480
1481 # at_fn_group_prepare
1482 # -------------------
1483 # Prepare for running a test group.
1484 at_fn_group_prepare ()
1485 {
1486 # The directory for additional per-group helper files.
1487 at_job_dir=$at_helper_dir/$at_group
1488 # The file containing the location of the last AT_CHECK.
1489 at_check_line_file=$at_job_dir/check-line
1490 # The file containing the exit status of the last command.
1491 at_status_file=$at_job_dir/status
1492 # The files containing the output of the tested commands.
1493 at_stdout=$at_job_dir/stdout
1494 at_stder1=$at_job_dir/stder1
1495 at_stderr=$at_job_dir/stderr
1496 # The file containing the code for a test group.
1497 at_test_source=$at_job_dir/test-source
1498 # The file containing dates.
1499 at_times_file=$at_job_dir/times
1500
1501 # Be sure to come back to the top test directory.
1502 cd "$at_suite_dir"
1503
1504 # Clearly separate the test groups when verbose.
1505 $at_first || $at_verbose echo
1506
1507 at_group_normalized=$at_group
1508
1509 eval 'while :; do
1510 case $at_group_normalized in #(
1511 '"$at_format"'*) break;;
1512 esac
1513 at_group_normalized=0$at_group_normalized
1514 done'
1515
1516
1517 # Create a fresh directory for the next test group, and enter.
1518 # If one already exists, the user may have invoked ./run from
1519 # within that directory; we remove the contents, but not the
1520 # directory itself, so that we aren't pulling the rug out from
1521 # under the shell's notion of the current directory.
1522 at_group_dir=$at_suite_dir/$at_group_normalized
1523 at_group_log=$at_group_dir/$as_me.log
1524 if test -d "$at_group_dir"
1525 then
1526 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1527 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1528 fi ||
1529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1530 printf "%s\n" "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1531 # Be tolerant if the above `rm' was not able to remove the directory.
1532 as_dir="$at_group_dir"; as_fn_mkdir_p
1533
1534 echo 0 > "$at_status_file"
1535
1536 # In verbose mode, append to the log file *and* show on
1537 # the standard output; in quiet mode only write to the log.
1538 if test -z "$at_verbose"; then
1539 at_tee_pipe='tee -a "$at_group_log"'
1540 else
1541 at_tee_pipe='cat >> "$at_group_log"'
1542 fi
1543 }
1544
1545 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1546 # -------------------------------------------------
1547 # Declare the test group ORDINAL, located at LINE with group description DESC,
1548 # and residing under BANNER. Use PAD to align the status column.
1549 at_fn_group_banner ()
1550 {
1551 at_setup_line="$2"
1552 test -n "$5" && at_fn_banner $5
1553 at_desc="$3"
1554 case $1 in
1555 [0-9]) at_desc_line=" $1: ";;
1556 [0-9][0-9]) at_desc_line=" $1: " ;;
1557 *) at_desc_line="$1: " ;;
1558 esac
1559 as_fn_append at_desc_line "$3$4"
1560 $at_quiet printf %s "$at_desc_line"
1561 echo "# -*- compilation -*-" >> "$at_group_log"
1562 }
1563
1564 # at_fn_group_postprocess
1565 # -----------------------
1566 # Perform cleanup after running a test group.
1567 at_fn_group_postprocess ()
1568 {
1569 # Be sure to come back to the suite directory, in particular
1570 # since below we might `rm' the group directory we are in currently.
1571 cd "$at_suite_dir"
1572
1573 if test ! -f "$at_check_line_file"; then
1574 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1575 A failure happened in a test group before any test could be
1576 run. This means that test suite is improperly designed. Please
1577 report this failure to <[email protected]>.
1578 _ATEOF
1579 printf "%s\n" "$at_setup_line" >"$at_check_line_file"
1580 at_status=99
1581 fi
1582 $at_verbose printf %s "$at_group. $at_setup_line: "
1583 printf %s "$at_group. $at_setup_line: " >> "$at_group_log"
1584 case $at_xfail:$at_status in
1585 yes:0)
1586 at_msg="UNEXPECTED PASS"
1587 at_res=xpass
1588 at_errexit=$at_errexit_p
1589 at_color=$at_red
1590 ;;
1591 no:0)
1592 at_msg="ok"
1593 at_res=pass
1594 at_errexit=false
1595 at_color=$at_grn
1596 ;;
1597 *:77)
1598 at_msg='skipped ('`cat "$at_check_line_file"`')'
1599 at_res=skip
1600 at_errexit=false
1601 at_color=$at_blu
1602 ;;
1603 no:* | *:99)
1604 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1605 at_res=fail
1606 at_errexit=$at_errexit_p
1607 at_color=$at_red
1608 ;;
1609 yes:*)
1610 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1611 at_res=xfail
1612 at_errexit=false
1613 at_color=$at_lgn
1614 ;;
1615 esac
1616 echo "$at_res" > "$at_job_dir/$at_res"
1617 # In parallel mode, output the summary line only afterwards.
1618 if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1619 printf "%s\n" "$at_desc_line $at_color$at_msg$at_std"
1620 else
1621 # Make sure there is a separator even with long titles.
1622 printf "%s\n" " $at_color$at_msg$at_std"
1623 fi
1624 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1625 case $at_status in
1626 0|77)
1627 # $at_times_file is only available if the group succeeded.
1628 # We're not including the group log, so the success message
1629 # is written in the global log separately. But we also
1630 # write to the group log in case they're using -d.
1631 if test -f "$at_times_file"; then
1632 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1633 rm -f "$at_times_file"
1634 fi
1635 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1636 printf "%s\n" "$at_log_msg" >&5
1637
1638 # Cleanup the group directory, unless the user wants the files
1639 # or the success was unexpected.
1640 if $at_debug_p || test $at_res = xpass; then
1641 at_fn_create_debugging_script
1642 if test $at_res = xpass && $at_errexit; then
1643 echo stop > "$at_stop_file"
1644 fi
1645 else
1646 if test -d "$at_group_dir"; then
1647 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1648 rm -fr "$at_group_dir"
1649 fi
1650 rm -f "$at_test_source"
1651 fi
1652 ;;
1653 *)
1654 # Upon failure, include the log into the testsuite's global
1655 # log. The failure message is written in the group log. It
1656 # is later included in the global log.
1657 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1658
1659 # Upon failure, keep the group directory for autopsy, and create
1660 # the debugging script. With -e, do not start any further tests.
1661 at_fn_create_debugging_script
1662 if $at_errexit; then
1663 echo stop > "$at_stop_file"
1664 fi
1665 ;;
1666 esac
1667 }
1668
1669
1670 ## ------------ ##
1671 ## Driver loop. ##
1672 ## ------------ ##
1673
1674
1675 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1676 set +b
1677 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1678 else
1679 at_job_control_on=: at_job_control_off=: at_job_group=
1680 fi
1681
1682 for at_signal in 1 2 15; do
1683 trap 'set +x; set +e
1684 $at_job_control_off
1685 at_signal='"$at_signal"'
1686 echo stop > "$at_stop_file"
1687 trap "" $at_signal
1688 at_pgids=
1689 for at_pgid in `jobs -p 2>/dev/null`; do
1690 at_pgids="$at_pgids $at_job_group$at_pgid"
1691 done
1692 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1693 wait
1694 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1695 echo >&2
1696 fi
1697 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1698 set x $at_signame
1699 test 0 -gt 2 && at_signame=$at_signal
1700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1701 printf "%s\n" "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1702 as_fn_arith 128 + $at_signal && exit_status=$as_val
1703 as_fn_exit $exit_status' $at_signal
1704 done
1705
1706 rm -f "$at_stop_file"
1707 at_first=:
1708
1709 if test $at_jobs -ne 1 &&
1710 rm -f "$at_job_fifo" &&
1711 test -n "$at_job_group" &&
1712 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1713 then
1714 # FIFO job dispatcher.
1715
1716 trap 'at_pids=
1717 for at_pid in `jobs -p`; do
1718 at_pids="$at_pids $at_job_group$at_pid"
1719 done
1720 if test -n "$at_pids"; then
1721 at_sig=TSTP
1722 test ${TMOUT+y} && at_sig=STOP
1723 kill -$at_sig $at_pids 2>/dev/null
1724 fi
1725 kill -STOP $$
1726 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1727
1728 echo
1729 # Turn jobs into a list of numbers, starting from 1.
1730 at_joblist=`printf "%s\n" "$at_groups" | sed -n 1,${at_jobs}p`
1731
1732 set X $at_joblist
1733 shift
1734 for at_group in $at_groups; do
1735 $at_job_control_on 2>/dev/null
1736 (
1737 # Start one test group.
1738 $at_job_control_off
1739 if $at_first; then
1740 exec 7>"$at_job_fifo"
1741 else
1742 exec 6<&-
1743 fi
1744 trap 'set +x; set +e
1745 trap "" PIPE
1746 echo stop > "$at_stop_file"
1747 echo >&7
1748 as_fn_exit 141' PIPE
1749 at_fn_group_prepare
1750 if cd "$at_group_dir" &&
1751 at_fn_test $at_group &&
1752 . "$at_test_source"
1753 then :; else
1754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1755 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1756 at_failed=:
1757 fi
1758 at_fn_group_postprocess
1759 echo >&7
1760 ) &
1761 $at_job_control_off
1762 if $at_first; then
1763 at_first=false
1764 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1765 fi
1766 shift # Consume one token.
1767 if test $# -gt 0; then :; else
1768 read at_token <&6 || break
1769 set x $*
1770 fi
1771 test -f "$at_stop_file" && break
1772 done
1773 exec 7>&-
1774 # Read back the remaining ($at_jobs - 1) tokens.
1775 set X $at_joblist
1776 shift
1777 if test $# -gt 0; then
1778 shift
1779 for at_job
1780 do
1781 read at_token
1782 done <&6
1783 fi
1784 exec 6<&-
1785 wait
1786 else
1787 # Run serially, avoid forks and other potential surprises.
1788 for at_group in $at_groups; do
1789 at_fn_group_prepare
1790 if cd "$at_group_dir" &&
1791 at_fn_test $at_group &&
1792 . "$at_test_source"; then :; else
1793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1794 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1795 at_failed=:
1796 fi
1797 at_fn_group_postprocess
1798 test -f "$at_stop_file" && break
1799 at_first=false
1800 done
1801 fi
1802
1803 # Wrap up the test suite with summary statistics.
1804 cd "$at_helper_dir"
1805
1806 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1807 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1808 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1809 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1810 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1811 echo $f; done | sed '/?/d; s,/xpass,,'`
1812 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1813 echo $f; done | sed '/?/d; s,/fail,,'`
1814
1815 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1816 shift; at_group_count=$#
1817 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1818 set X $at_xfail_list; shift; at_xfail_count=$#
1819 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1820 set X $at_skip_list; shift; at_skip_count=$#
1821
1822 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1823 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1824 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1825
1826 # Back to the top directory.
1827 cd "$at_dir"
1828 rm -rf "$at_helper_dir"
1829
1830 # Compute the duration of the suite.
1831 at_stop_date=`date`
1832 at_stop_time=`date +%s 2>/dev/null`
1833 printf "%s\n" "$as_me: ending at: $at_stop_date" >&5
1834 case $at_start_time,$at_stop_time in
1835 [0-9]*,[0-9]*)
1836 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1837 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1838 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1839 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1840 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1841 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1842 printf "%s\n" "$as_me: test suite duration: $at_duration" >&5
1843 ;;
1844 esac
1845
1846 echo
1847 printf "%s\n" "## ------------- ##
1848 ## Test results. ##
1849 ## ------------- ##"
1850 echo
1851 {
1852 echo
1853 printf "%s\n" "## ------------- ##
1854 ## Test results. ##
1855 ## ------------- ##"
1856 echo
1857 } >&5
1858
1859 if test $at_run_count = 1; then
1860 at_result="1 test"
1861 at_were=was
1862 else
1863 at_result="$at_run_count tests"
1864 at_were=were
1865 fi
1866 if $at_errexit_p && test $at_unexpected_count != 0; then
1867 if test $at_xpass_count = 1; then
1868 at_result="$at_result $at_were run, one passed"
1869 else
1870 at_result="$at_result $at_were run, one failed"
1871 fi
1872 at_result="$at_result unexpectedly and inhibited subsequent tests."
1873 at_color=$at_red
1874 else
1875 # Don't you just love exponential explosion of the number of cases?
1876 at_color=$at_red
1877 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1878 # So far, so good.
1879 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1880 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1881
1882 # Some unexpected failures
1883 0:*:0) at_result="$at_result $at_were run,
1884 $at_fail_count failed unexpectedly." ;;
1885
1886 # Some failures, both expected and unexpected
1887 0:*:1) at_result="$at_result $at_were run,
1888 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1889 0:*:*) at_result="$at_result $at_were run,
1890 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1891
1892 # No unexpected failures, but some xpasses
1893 *:0:*) at_result="$at_result $at_were run,
1894 $at_xpass_count passed unexpectedly." ;;
1895
1896 # No expected failures, but failures and xpasses
1897 *:1:0) at_result="$at_result $at_were run,
1898 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1899 *:*:0) at_result="$at_result $at_were run,
1900 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1901
1902 # All of them.
1903 *:*:1) at_result="$at_result $at_were run,
1904 $at_xpass_count passed unexpectedly,
1905 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1906 *:*:*) at_result="$at_result $at_were run,
1907 $at_xpass_count passed unexpectedly,
1908 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1909 esac
1910
1911 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1912 at_result="All $at_result"
1913 fi
1914 fi
1915
1916 # Now put skips in the mix.
1917 case $at_skip_count in
1918 0) ;;
1919 1) at_result="$at_result
1920 1 test was skipped." ;;
1921 *) at_result="$at_result
1922 $at_skip_count tests were skipped." ;;
1923 esac
1924
1925 if test $at_unexpected_count = 0; then
1926 echo "$at_color$at_result$at_std"
1927 echo "$at_result" >&5
1928 else
1929 echo "${at_color}ERROR: $at_result$at_std" >&2
1930 echo "ERROR: $at_result" >&5
1931 {
1932 echo
1933 printf "%s\n" "## ------------------------ ##
1934 ## Summary of the failures. ##
1935 ## ------------------------ ##"
1936
1937 # Summary of failed and skipped tests.
1938 if test $at_fail_count != 0; then
1939 echo "Failed tests:"
1940 $SHELL "$at_myself" $at_fail_list --list
1941 echo
1942 fi
1943 if test $at_skip_count != 0; then
1944 echo "Skipped tests:"
1945 $SHELL "$at_myself" $at_skip_list --list
1946 echo
1947 fi
1948 if test $at_xpass_count != 0; then
1949 echo "Unexpected passes:"
1950 $SHELL "$at_myself" $at_xpass_list --list
1951 echo
1952 fi
1953 if test $at_fail_count != 0; then
1954 printf "%s\n" "## ---------------------- ##
1955 ## Detailed failed tests. ##
1956 ## ---------------------- ##"
1957 echo
1958 for at_group in $at_fail_list
1959 do
1960 at_group_normalized=$at_group
1961
1962 eval 'while :; do
1963 case $at_group_normalized in #(
1964 '"$at_format"'*) break;;
1965 esac
1966 at_group_normalized=0$at_group_normalized
1967 done'
1968
1969 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1970 echo
1971 done
1972 echo
1973 fi
1974 if test -n "$at_top_srcdir"; then
1975 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1976 ## ${at_top_build_prefix}config.log ##
1977 _ASBOX
1978 sed 's/^/| /' ${at_top_build_prefix}config.log
1979 echo
1980 fi
1981 } >&5
1982
1983 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1984 ## $as_me.log was created. ##
1985 _ASBOX
1986
1987 echo
1988 if $at_debug_p; then
1989 at_msg='per-test log files'
1990 else
1991 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
1992 fi
1993 at_msg1a=${at_xpass_list:+', '}
1994 at_msg1=$at_fail_list${at_fail_list:+" failed$at_msg1a"}
1995 at_msg2=$at_xpass_list${at_xpass_list:+" passed unexpectedly"}
1996
1997 printf "%s\n" "Please send $at_msg and all information you think might help:
1998
1999 To: <[email protected]>
2000 Subject: [GNU Mailutils 3.20] $as_me: $at_msg1$at_msg2
2001
2002 You may investigate any problem if you feel able to do so, in which
2003 case the test suite provides a good starting point. Its output may
2004 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2005 "
2006 exit 1
2007 fi
2008
2009 exit 0
2010
2011 ## ------------- ##
2012 ## Actual tests. ##
2013 ## ------------- ##
2014 #AT_START_1
2015 at_fn_group_banner 1 'autodetect.at:16' \
2016 "format detection" " "
2017 at_xfail=no
2018 (
2019 printf "%s\n" "1. $at_setup_line: testing $at_desc ..."
2020 $at_traceon
2021
2022
2023 { set +x
2024 printf "%s\n" "$at_srcdir/autodetect.at:18:
2025 mkdir inbox inbox/cur inbox/new
2026 mbop -m inbox --detect
2027 "
2028 at_fn_check_prepare_notrace 'an embedded newline' "autodetect.at:18"
2029 ( $at_check_trace;
2030 mkdir inbox inbox/cur inbox/new
2031 mbop -m inbox --detect
2032
2033 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2034 at_status=$? at_failed=false
2035 $at_check_filter
2036 at_fn_diff_devnull "$at_stderr" || at_failed=:
2037 echo >>"$at_stdout"; printf "%s\n" "inbox: 0
2038 " | \
2039 $at_diff - "$at_stdout" || at_failed=:
2040 at_fn_check_status 1 $at_status "$at_srcdir/autodetect.at:18"
2041 $at_failed && at_fn_log_failure
2042 $at_traceon; }
2043
2044 { set +x
2045 printf "%s\n" "$at_srcdir/autodetect.at:25:
2046 mkdir inbox/tmp
2047 mbop -m inbox --detect
2048 "
2049 at_fn_check_prepare_notrace 'an embedded newline' "autodetect.at:25"
2050 ( $at_check_trace;
2051 mkdir inbox/tmp
2052 mbop -m inbox --detect
2053
2054 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2055 at_status=$? at_failed=false
2056 $at_check_filter
2057 at_fn_diff_devnull "$at_stderr" || at_failed=:
2058 echo >>"$at_stdout"; printf "%s\n" "inbox: 2
2059 " | \
2060 $at_diff - "$at_stdout" || at_failed=:
2061 at_fn_check_status 0 $at_status "$at_srcdir/autodetect.at:25"
2062 $at_failed && at_fn_log_failure
2063 $at_traceon; }
2064
2065 set +x
2066 $at_times_p && times >"$at_times_file"
2067 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2068 read at_status <"$at_status_file"
2069 #AT_STOP_1
2070 #AT_START_2
2071 at_fn_group_banner 2 'count.at:17' \
2072 "message count" " "
2073 at_xfail=no
2074 (
2075 printf "%s\n" "2. $at_setup_line: testing $at_desc ..."
2076 $at_traceon
2077
2078 { set +x
2079 printf "%s\n" "$at_srcdir/count.at:18: mbox2dir inbox \$spooldir/mbox1"
2080 at_fn_check_prepare_dynamic "mbox2dir inbox $spooldir/mbox1" "count.at:18"
2081 ( $at_check_trace; mbox2dir inbox $spooldir/mbox1
2082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2083 at_status=$? at_failed=false
2084 $at_check_filter
2085 at_fn_diff_devnull "$at_stderr" || at_failed=:
2086 at_fn_diff_devnull "$at_stdout" || at_failed=:
2087 at_fn_check_status 0 $at_status "$at_srcdir/count.at:18"
2088 $at_failed && at_fn_log_failure
2089 $at_traceon; }
2090
2091
2092 { set +x
2093 printf "%s\n" "$at_srcdir/count.at:20:
2094 mbop -m inbox count
2095 "
2096 at_fn_check_prepare_notrace 'an embedded newline' "count.at:20"
2097 ( $at_check_trace;
2098 mbop -m inbox count
2099
2100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2101 at_status=$? at_failed=false
2102 $at_check_filter
2103 at_fn_diff_devnull "$at_stderr" || at_failed=:
2104 echo >>"$at_stdout"; printf "%s\n" "count: 5
2105 " | \
2106 $at_diff - "$at_stdout" || at_failed=:
2107 at_fn_check_status 0 $at_status "$at_srcdir/count.at:20"
2108 $at_failed && at_fn_log_failure
2109 $at_traceon; }
2110
2111 set +x
2112 $at_times_p && times >"$at_times_file"
2113 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2114 read at_status <"$at_status_file"
2115 #AT_STOP_2
2116 #AT_START_3
2117 at_fn_group_banner 3 'attr.at:17' \
2118 "attributes" " "
2119 at_xfail=no
2120 (
2121 printf "%s\n" "3. $at_setup_line: testing $at_desc ..."
2122 $at_traceon
2123
2124 cat >names <<'_ATEOF'
2125 cur/1284628225.M17468P3883Q0.Trurl,a=O,u=1:2,
2126 cur/1284628225.M19181P3883Q1.Trurl,a=O,u=20:2,S
2127 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2128 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2129 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
2130 _ATEOF
2131
2132 { set +x
2133 printf "%s\n" "$at_srcdir/attr.at:25: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2134 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "attr.at:25"
2135 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2137 at_status=$? at_failed=false
2138 $at_check_filter
2139 at_fn_diff_devnull "$at_stderr" || at_failed=:
2140 at_fn_diff_devnull "$at_stdout" || at_failed=:
2141 at_fn_check_status 0 $at_status "$at_srcdir/attr.at:25"
2142 $at_failed && at_fn_log_failure
2143 $at_traceon; }
2144
2145
2146 { set +x
2147 printf "%s\n" "$at_srcdir/attr.at:27:
2148 mbop -m inbox 1 \\; attr \\; 2 \\; attr
2149 "
2150 at_fn_check_prepare_notrace 'an embedded newline' "attr.at:27"
2151 ( $at_check_trace;
2152 mbop -m inbox 1 \; attr \; 2 \; attr
2153
2154 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2155 at_status=$? at_failed=false
2156 $at_check_filter
2157 at_fn_diff_devnull "$at_stderr" || at_failed=:
2158 echo >>"$at_stdout"; printf "%s\n" "1 current message
2159 1 attr: O
2160 2 current message
2161 2 attr: OR
2162 " | \
2163 $at_diff - "$at_stdout" || at_failed=:
2164 at_fn_check_status 0 $at_status "$at_srcdir/attr.at:27"
2165 $at_failed && at_fn_log_failure
2166 $at_traceon; }
2167
2168 { set +x
2169 printf "%s\n" "$at_srcdir/attr.at:36:
2170 cat >commands <<'_ATEOF'
2171 # Select 3rd message
2172 3
2173 # Set the read attribute
2174 set_read
2175 # Set the draft attribute
2176 set_draft
2177 # Select 5th message
2178 5
2179 # Set the answered attribute
2180 set_answered
2181 set_seen
2182 # Synchronize with the disk storage
2183 sync
2184 _ATEOF
2185
2186 mbop -m inbox < commands
2187 "
2188 at_fn_check_prepare_notrace 'an embedded newline' "attr.at:36"
2189 ( $at_check_trace;
2190 cat >commands <<'_ATEOF'
2191 # Select 3rd message
2192 3
2193 # Set the read attribute
2194 set_read
2195 # Set the draft attribute
2196 set_draft
2197 # Select 5th message
2198 5
2199 # Set the answered attribute
2200 set_answered
2201 set_seen
2202 # Synchronize with the disk storage
2203 sync
2204 _ATEOF
2205
2206 mbop -m inbox < commands
2207
2208 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2209 at_status=$? at_failed=false
2210 $at_check_filter
2211 at_fn_diff_devnull "$at_stderr" || at_failed=:
2212 echo >>"$at_stdout"; printf "%s\n" "3 current message
2213 3 set_read: OK
2214 3 set_draft: OK
2215 5 current message
2216 5 set_answered: OK
2217 5 set_seen: OK
2218 sync: OK
2219 " | \
2220 $at_diff - "$at_stdout" || at_failed=:
2221 at_fn_check_status 0 $at_status "$at_srcdir/attr.at:36"
2222 $at_failed && at_fn_log_failure
2223 $at_traceon; }
2224
2225 { set +x
2226 printf "%s\n" "$at_srcdir/attr.at:63:
2227 mbop -m inbox 3 \\; attr \\; 5 \\; attr
2228 "
2229 at_fn_check_prepare_notrace 'an embedded newline' "attr.at:63"
2230 ( $at_check_trace;
2231 mbop -m inbox 3 \; attr \; 5 \; attr
2232
2233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2234 at_status=$? at_failed=false
2235 $at_check_filter
2236 at_fn_diff_devnull "$at_stderr" || at_failed=:
2237 echo >>"$at_stdout"; printf "%s\n" "3 current message
2238 3 attr: dR
2239 5 current message
2240 5 attr: AO
2241 " | \
2242 $at_diff - "$at_stdout" || at_failed=:
2243 at_fn_check_status 0 $at_status "$at_srcdir/attr.at:63"
2244 $at_failed && at_fn_log_failure
2245 $at_traceon; }
2246
2247 set +x
2248 $at_times_p && times >"$at_times_file"
2249 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2250 read at_status <"$at_status_file"
2251 #AT_STOP_3
2252 #AT_START_4
2253 at_fn_group_banner 4 'envelope.at:17' \
2254 "envelope" " "
2255 at_xfail=no
2256 (
2257 printf "%s\n" "4. $at_setup_line: testing $at_desc ..."
2258 $at_traceon
2259
2260 cat >names <<'_ATEOF'
2261 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2262 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
2263 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2264 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2265 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
2266 _ATEOF
2267
2268 { set +x
2269 printf "%s\n" "$at_srcdir/envelope.at:25: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2270 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "envelope.at:25"
2271 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2273 at_status=$? at_failed=false
2274 $at_check_filter
2275 at_fn_diff_devnull "$at_stderr" || at_failed=:
2276 at_fn_diff_devnull "$at_stdout" || at_failed=:
2277 at_fn_check_status 0 $at_status "$at_srcdir/envelope.at:25"
2278 $at_failed && at_fn_log_failure
2279 $at_traceon; }
2280
2281 { set +x
2282 printf "%s\n" "$at_srcdir/envelope.at:26: mbop -m inbox 2 \\; env_date \\; env_sender"
2283 at_fn_check_prepare_trace "envelope.at:26"
2284 ( $at_check_trace; mbop -m inbox 2 \; env_date \; env_sender
2285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2286 at_status=$? at_failed=false
2287 $at_check_filter
2288 at_fn_diff_devnull "$at_stderr" || at_failed=:
2289 echo >>"$at_stdout"; printf "%s\n" "2 current message
2290 2 env_date: Fri Dec 28 20:18:08 2001
2291 2 env_sender: [email protected]
2292 " | \
2293 $at_diff - "$at_stdout" || at_failed=:
2294 at_fn_check_status 0 $at_status "$at_srcdir/envelope.at:26"
2295 $at_failed && at_fn_log_failure
2296 $at_traceon; }
2297
2298 set +x
2299 $at_times_p && times >"$at_times_file"
2300 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2301 read at_status <"$at_status_file"
2302 #AT_STOP_4
2303 #AT_START_5
2304 at_fn_group_banner 5 'header.at:17' \
2305 "header" " "
2306 at_xfail=no
2307 (
2308 printf "%s\n" "5. $at_setup_line: testing $at_desc ..."
2309 $at_traceon
2310
2311 cat >names <<'_ATEOF'
2312 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2313 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
2314 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2315 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2316 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
2317 _ATEOF
2318
2319 cat >commands <<'_ATEOF'
2320 1
2321 header_lines
2322 header_size
2323 header_count
2324 headers
2325 2
2326 header_lines
2327 header_size
2328 header_count
2329 headers
2330 _ATEOF
2331
2332 { set +x
2333 printf "%s\n" "$at_srcdir/header.at:37: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2334 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "header.at:37"
2335 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2337 at_status=$? at_failed=false
2338 $at_check_filter
2339 at_fn_diff_devnull "$at_stderr" || at_failed=:
2340 at_fn_diff_devnull "$at_stdout" || at_failed=:
2341 at_fn_check_status 0 $at_status "$at_srcdir/header.at:37"
2342 $at_failed && at_fn_log_failure
2343 $at_traceon; }
2344
2345 { set +x
2346 printf "%s\n" "$at_srcdir/header.at:38:
2347 mbop -m inbox < commands
2348 "
2349 at_fn_check_prepare_notrace 'an embedded newline' "header.at:38"
2350 ( $at_check_trace;
2351 mbop -m inbox < commands
2352
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" "1 current message
2358 1 header_lines: 9
2359 1 header_size: 317
2360 1 header_count: 6
2361 1 headers: Received:(from [email protected]) by nonexistent.net id fBSKI8N04906 for [email protected]; Fri, 28 Dec 2001 22:18:08 +0200
2362 Date:Fri, 28 Dec 2001 22:18:08 +0200
2363 From:Foo Bar <[email protected]>
2364 Message-Id:<[email protected]>
2365 To:Bar <[email protected]>
2366 Subject:Jabberwocky
2367
2368 2 current message
2369 2 header_lines: 9
2370 2 header_size: 319
2371 2 header_count: 6
2372 2 headers: Received:(from [email protected]) by dontmailme.org id fERKR9N16790 for [email protected]; Fri, 28 Dec 2001 22:18:08 +0200
2373 Date:Fri, 28 Dec 2001 23:28:08 +0200
2374 From:Bar <[email protected]>
2375 To:Foo Bar <[email protected]>
2376 Message-Id:<[email protected]>
2377 Subject:Re: Jabberwocky
2378
2379 " | \
2380 $at_diff - "$at_stdout" || at_failed=:
2381 at_fn_check_status 0 $at_status "$at_srcdir/header.at:38"
2382 $at_failed && at_fn_log_failure
2383 $at_traceon; }
2384
2385 set +x
2386 $at_times_p && times >"$at_times_file"
2387 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2388 read at_status <"$at_status_file"
2389 #AT_STOP_5
2390 #AT_START_6
2391 at_fn_group_banner 6 'body.at:17' \
2392 "body" " "
2393 at_xfail=no
2394 (
2395 printf "%s\n" "6. $at_setup_line: testing $at_desc ..."
2396 $at_traceon
2397
2398 cat >commands <<'_ATEOF'
2399 1
2400 body_lines
2401 body_size
2402 body_text
2403 2
2404 body_lines
2405 body_size
2406 body_text
2407 _ATEOF
2408
2409 { set +x
2410 printf "%s\n" "$at_srcdir/body.at:28: mbox2dir -p -v 10 inbox \$spooldir/mbox1"
2411 at_fn_check_prepare_dynamic "mbox2dir -p -v 10 inbox $spooldir/mbox1" "body.at:28"
2412 ( $at_check_trace; mbox2dir -p -v 10 inbox $spooldir/mbox1
2413 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2414 at_status=$? at_failed=false
2415 $at_check_filter
2416 at_fn_diff_devnull "$at_stderr" || at_failed=:
2417 at_fn_diff_devnull "$at_stdout" || at_failed=:
2418 at_fn_check_status 0 $at_status "$at_srcdir/body.at:28"
2419 $at_failed && at_fn_log_failure
2420 $at_traceon; }
2421
2422
2423 { set +x
2424 printf "%s\n" "$at_srcdir/body.at:30:
2425 mbop -m inbox < commands
2426 "
2427 at_fn_check_prepare_notrace 'an embedded newline' "body.at:30"
2428 ( $at_check_trace;
2429 mbop -m inbox < commands
2430
2431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2432 at_status=$? at_failed=false
2433 $at_check_filter
2434 at_fn_diff_devnull "$at_stderr" || at_failed=:
2435 echo >>"$at_stdout"; printf "%s\n" "1 current message
2436 1 body_lines: 35
2437 1 body_size: 937
2438 1 body_text: \`Twas brillig, and the slithy toves
2439 Did gyre and gimble in the wabe;
2440 All mimsy were the borogoves,
2441 And the mome raths outgrabe.
2442
2443 \`Beware the Jabberwock, my son!
2444 The jaws that bite, the claws that catch!
2445 Beware the Jujub bird, and shun
2446 The frumious Bandersnatch!'
2447
2448 He took his vorpal sword in hand:
2449 Long time the manxome foe he sought --
2450 So rested he by the Tumtum gree,
2451 And stood awhile in thought.
2452
2453 And as in uffish thought he stood,
2454 The Jabberwock, with eyes of flame,
2455 Came whiffling through the tulgey wook,
2456 And burbled as it came!
2457
2458 One, two! One, two! And through and through
2459 The vorpal blade went snicker-snack!
2460 He left it dead, and with its head
2461 He went galumphing back.
2462
2463 \`And has thou slain the Jabberwock?
2464 Come to my arms, my beamish boy!
2465 O frabjous day! Calloh! Callay!
2466 He chortled in his joy.
2467
2468 \`Twas brillig, and the slithy toves
2469 Did gyre and gimble in the wabe;
2470 All mimsy were the borogoves,
2471 And the mome raths outgrabe.
2472
2473
2474 2 current message
2475 2 body_lines: 4
2476 2 body_size: 215
2477 2 body_text: It seems very pretty, but it's *rather* hard to understand!'
2478 Somehow it seems to fill my head with ideas -- only I don't
2479 exactly know what they are! However, SOMEBODY killed SOMETHING:
2480 that's clear, at any rate...
2481
2482 " | \
2483 $at_diff - "$at_stdout" || at_failed=:
2484 at_fn_check_status 0 $at_status "$at_srcdir/body.at:30"
2485 $at_failed && at_fn_log_failure
2486 $at_traceon; }
2487
2488 set +x
2489 $at_times_p && times >"$at_times_file"
2490 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2491 read at_status <"$at_status_file"
2492 #AT_STOP_6
2493 #AT_START_7
2494 at_fn_group_banner 7 'uid.at:17' \
2495 "uid" " "
2496 at_xfail=no
2497 (
2498 printf "%s\n" "7. $at_setup_line: testing $at_desc ..."
2499 $at_traceon
2500
2501 cat >names <<'_ATEOF'
2502 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2503 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
2504 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2505 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2506 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
2507 _ATEOF
2508
2509 { set +x
2510 printf "%s\n" "$at_srcdir/uid.at:25: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2511 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "uid.at:25"
2512 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2514 at_status=$? at_failed=false
2515 $at_check_filter
2516 at_fn_diff_devnull "$at_stderr" || at_failed=:
2517 at_fn_diff_devnull "$at_stdout" || at_failed=:
2518 at_fn_check_status 0 $at_status "$at_srcdir/uid.at:25"
2519 $at_failed && at_fn_log_failure
2520 $at_traceon; }
2521
2522 { set +x
2523 printf "%s\n" "$at_srcdir/uid.at:26:
2524 mbop -m inbox 1 \\; uid \\; 2 \\; uid \\; 3 \\; uid \\; 4 \\; uid \\; 5 \\; uid
2525 "
2526 at_fn_check_prepare_notrace 'an embedded newline' "uid.at:26"
2527 ( $at_check_trace;
2528 mbop -m inbox 1 \; uid \; 2 \; uid \; 3 \; uid \; 4 \; uid \; 5 \; uid
2529
2530 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2531 at_status=$? at_failed=false
2532 $at_check_filter
2533 at_fn_diff_devnull "$at_stderr" || at_failed=:
2534 echo >>"$at_stdout"; printf "%s\n" "1 current message
2535 1 uid: 1
2536 2 current message
2537 2 uid: 20
2538 3 current message
2539 3 uid: 22
2540 4 current message
2541 4 uid: 43
2542 5 current message
2543 5 uid: 50
2544 " | \
2545 $at_diff - "$at_stdout" || at_failed=:
2546 at_fn_check_status 0 $at_status "$at_srcdir/uid.at:26"
2547 $at_failed && at_fn_log_failure
2548 $at_traceon; }
2549
2550 set +x
2551 $at_times_p && times >"$at_times_file"
2552 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2553 read at_status <"$at_status_file"
2554 #AT_STOP_7
2555 #AT_START_8
2556 at_fn_group_banner 8 'uidvalidity.at:17' \
2557 "uidvalidity" " "
2558 at_xfail=no
2559 (
2560 printf "%s\n" "8. $at_setup_line: testing $at_desc ..."
2561 $at_traceon
2562
2563 cat >names <<'_ATEOF'
2564 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2565 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
2566 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2567 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2568 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
2569 _ATEOF
2570
2571 { set +x
2572 printf "%s\n" "$at_srcdir/uidvalidity.at:25: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2573 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "uidvalidity.at:25"
2574 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2575 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2576 at_status=$? at_failed=false
2577 $at_check_filter
2578 at_fn_diff_devnull "$at_stderr" || at_failed=:
2579 at_fn_diff_devnull "$at_stdout" || at_failed=:
2580 at_fn_check_status 0 $at_status "$at_srcdir/uidvalidity.at:25"
2581 $at_failed && at_fn_log_failure
2582 $at_traceon; }
2583
2584 { set +x
2585 printf "%s\n" "$at_srcdir/uidvalidity.at:26:
2586 mbop -m inbox uidvalidity \\; uidnext
2587 "
2588 at_fn_check_prepare_notrace 'an embedded newline' "uidvalidity.at:26"
2589 ( $at_check_trace;
2590 mbop -m inbox uidvalidity \; uidnext
2591
2592 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2593 at_status=$? at_failed=false
2594 $at_check_filter
2595 at_fn_diff_devnull "$at_stderr" || at_failed=:
2596 echo >>"$at_stdout"; printf "%s\n" "uidvalidity: 10
2597 uidnext: 51
2598 " | \
2599 $at_diff - "$at_stdout" || at_failed=:
2600 at_fn_check_status 0 $at_status "$at_srcdir/uidvalidity.at:26"
2601 $at_failed && at_fn_log_failure
2602 $at_traceon; }
2603
2604 set +x
2605 $at_times_p && times >"$at_times_file"
2606 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2607 read at_status <"$at_status_file"
2608 #AT_STOP_8
2609 #AT_START_9
2610 at_fn_group_banner 9 'qget.at:17' \
2611 "qget access" " "
2612 at_xfail=no
2613 (
2614 printf "%s\n" "9. $at_setup_line: testing $at_desc ..."
2615 $at_traceon
2616
2617 cat >names <<'_ATEOF'
2618 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2619 cur/1284628225.M19181P3883Q1.Trurl,u=2:2,S
2620 cur/1284628225.M20118P3883Q2.Trurl,u=3:2,
2621 cur/1284628225.M21284P3883Q3.Trurl,u=4:2,
2622 cur/1284628225.M22502P3883Q4.Trurl,u=5:2,
2623 _ATEOF
2624
2625 { set +x
2626 printf "%s\n" "$at_srcdir/qget.at:25: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
2627 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "qget.at:25"
2628 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
2629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2630 at_status=$? at_failed=false
2631 $at_check_filter
2632 at_fn_diff_devnull "$at_stderr" || at_failed=:
2633 at_fn_diff_devnull "$at_stdout" || at_failed=:
2634 at_fn_check_status 0 $at_status "$at_srcdir/qget.at:25"
2635 $at_failed && at_fn_log_failure
2636 $at_traceon; }
2637
2638 { set +x
2639 printf "%s\n" "$at_srcdir/qget.at:26:
2640 mbop -m inbox qget cur/1284628225.M19181P3883Q1.Trurl,u=2:2,S
2641 "
2642 at_fn_check_prepare_notrace 'an embedded newline' "qget.at:26"
2643 ( $at_check_trace;
2644 mbop -m inbox qget cur/1284628225.M19181P3883Q1.Trurl,u=2:2,S
2645
2646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2647 at_status=$? at_failed=false
2648 $at_check_filter
2649 at_fn_diff_devnull "$at_stderr" || at_failed=:
2650 echo >>"$at_stdout"; printf "%s\n" "qget: Received: (from [email protected])
2651 by dontmailme.org id fERKR9N16790
2652 for [email protected]; Fri, 28 Dec 2001 22:18:08 +0200
2653 Date: Fri, 28 Dec 2001 23:28:08 +0200
2654 From: Bar <[email protected]>
2655 To: Foo Bar <[email protected]>
2656 Message-Id: <[email protected]>
2657 Subject: Re: Jabberwocky
2658
2659 It seems very pretty, but it's *rather* hard to understand!'
2660 Somehow it seems to fill my head with ideas -- only I don't
2661 exactly know what they are! However, SOMEBODY killed SOMETHING:
2662 that's clear, at any rate...
2663
2664 " | \
2665 $at_diff - "$at_stdout" || at_failed=:
2666 at_fn_check_status 0 $at_status "$at_srcdir/qget.at:26"
2667 $at_failed && at_fn_log_failure
2668 $at_traceon; }
2669
2670 set +x
2671 $at_times_p && times >"$at_times_file"
2672 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2673 read at_status <"$at_status_file"
2674 #AT_STOP_9
2675 #AT_START_10
2676 at_fn_group_banner 10 'new.at:17' \
2677 "deliver messages from new" " "
2678 at_xfail=no
2679 (
2680 printf "%s\n" "10. $at_setup_line: testing $at_desc ..."
2681 $at_traceon
2682
2683 cat >names <<'_ATEOF'
2684 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
2685 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
2686 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
2687 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
2688 new/1284628225.M22502P3883Q4.Trurl
2689 _ATEOF
2690
2691 { set +x
2692 printf "%s\n" "$at_srcdir/new.at:25: mbox2dir -i names -p -v 10 -u inbox \$spooldir/mbox1"
2693 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 -u inbox $spooldir/mbox1" "new.at:25"
2694 ( $at_check_trace; mbox2dir -i names -p -v 10 -u inbox $spooldir/mbox1
2695 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2696 at_status=$? at_failed=false
2697 $at_check_filter
2698 at_fn_diff_devnull "$at_stderr" || at_failed=:
2699 at_fn_diff_devnull "$at_stdout" || at_failed=:
2700 at_fn_check_status 0 $at_status "$at_srcdir/new.at:25"
2701 $at_failed && at_fn_log_failure
2702 $at_traceon; }
2703
2704 { set +x
2705 printf "%s\n" "$at_srcdir/new.at:26: mbop -m inbox count \\; 5 \\; uid \\; uidvalidity \\; uidnext"
2706 at_fn_check_prepare_trace "new.at:26"
2707 ( $at_check_trace; mbop -m inbox count \; 5 \; uid \; uidvalidity \; uidnext
2708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2709 at_status=$? at_failed=false
2710 $at_check_filter
2711 at_fn_diff_devnull "$at_stderr" || at_failed=:
2712 echo >>"$at_stdout"; printf "%s\n" "count: 5
2713 5 current message
2714 5 uid: 44
2715 uidvalidity: 10
2716 uidnext: 45
2717 " | \
2718 $at_diff - "$at_stdout" || at_failed=:
2719 at_fn_check_status 0 $at_status "$at_srcdir/new.at:26"
2720 $at_failed && at_fn_log_failure
2721 $at_traceon; }
2722
2723 set +x
2724 $at_times_p && times >"$at_times_file"
2725 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2726 read at_status <"$at_status_file"
2727 #AT_STOP_10
2728 #AT_START_11
2729 at_fn_group_banner 11 'append.at:17' \
2730 "append" " "
2731 at_xfail=no
2732 (
2733 printf "%s\n" "11. $at_setup_line: testing $at_desc ..."
2734 $at_traceon
2735
2736 { set +x
2737 printf "%s\n" "$at_srcdir/append.at:18: mbox2dir -p -v 10 -u inbox \$spooldir/mbox1"
2738 at_fn_check_prepare_dynamic "mbox2dir -p -v 10 -u inbox $spooldir/mbox1" "append.at:18"
2739 ( $at_check_trace; mbox2dir -p -v 10 -u inbox $spooldir/mbox1
2740 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2741 at_status=$? at_failed=false
2742 $at_check_filter
2743 at_fn_diff_devnull "$at_stderr" || at_failed=:
2744 at_fn_diff_devnull "$at_stdout" || at_failed=:
2745 at_fn_check_status 0 $at_status "$at_srcdir/append.at:18"
2746 $at_failed && at_fn_log_failure
2747 $at_traceon; }
2748
2749 cat >msg <<'_ATEOF'
2750 Received: (from [email protected])
2751 by wonder.land id 3304
2752 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
2753 Date: Mon, 29 Jul 2002 22:00:04 +0100
2754 From: Alice <[email protected]>
2755 Message-Id: <[email protected]>
2756 To: March Hare <[email protected]>
2757 Subject: Re: Invitation
2758 Status: O
2759
2760 Then it wasn't very civil of you to offer it
2761 _ATEOF
2762
2763 cat >commands <<'_ATEOF'
2764 append msg
2765 count
2766 6
2767 uid
2768 env_date
2769 env_sender
2770 attr
2771 headers
2772 body_text
2773 _ATEOF
2774
2775 { set +x
2776 printf "%s\n" "$at_srcdir/append.at:43:
2777 mbop -m inbox < commands
2778 "
2779 at_fn_check_prepare_notrace 'an embedded newline' "append.at:43"
2780 ( $at_check_trace;
2781 mbop -m inbox < commands
2782
2783 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2784 at_status=$? at_failed=false
2785 $at_check_filter
2786 at_fn_diff_devnull "$at_stderr" || at_failed=:
2787 echo >>"$at_stdout"; printf "%s\n" "append: OK
2788 count: 6
2789 6 current message
2790 6 uid: 6
2791 6 env_date: Mon Jul 29 21:00:09 2002
2792 6 env_sender: [email protected]
2793 6 attr: -
2794 6 headers: Received:(from [email protected]) by wonder.land id 3304 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
2795 Date:Mon, 29 Jul 2002 22:00:04 +0100
2796 From:Alice <[email protected]>
2797 Message-Id:<[email protected]>
2798 To:March Hare <[email protected]>
2799 Subject:Re: Invitation
2800
2801 6 body_text: Then it wasn't very civil of you to offer it
2802
2803 " | \
2804 $at_diff - "$at_stdout" || at_failed=:
2805 at_fn_check_status 0 $at_status "$at_srcdir/append.at:43"
2806 $at_failed && at_fn_log_failure
2807 $at_traceon; }
2808
2809
2810 { set +x
2811 printf "%s\n" "$at_srcdir/append.at:65:
2812 mbop -m inbox uidvalidity
2813 "
2814 at_fn_check_prepare_notrace 'an embedded newline' "append.at:65"
2815 ( $at_check_trace;
2816 mbop -m inbox uidvalidity
2817
2818 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2819 at_status=$? at_failed=false
2820 $at_check_filter
2821 at_fn_diff_devnull "$at_stderr" || at_failed=:
2822 echo >>"$at_stdout"; printf "%s\n" "uidvalidity: 10
2823 " | \
2824 $at_diff - "$at_stdout" || at_failed=:
2825 at_fn_check_status 0 $at_status "$at_srcdir/append.at:65"
2826 $at_failed && at_fn_log_failure
2827 $at_traceon; }
2828
2829
2830 cat >commands.atr <<'_ATEOF'
2831 append -attr FRP msg
2832 count
2833 7
2834 uid
2835 env_date
2836 env_sender
2837 attr
2838 headers
2839 body_text
2840 _ATEOF
2841
2842
2843 { set +x
2844 printf "%s\n" "$at_srcdir/append.at:84: mbop -m inbox < commands.atr"
2845 at_fn_check_prepare_trace "append.at:84"
2846 ( $at_check_trace; mbop -m inbox < commands.atr
2847 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2848 at_status=$? at_failed=false
2849 $at_check_filter
2850 at_fn_diff_devnull "$at_stderr" || at_failed=:
2851 echo >>"$at_stdout"; printf "%s\n" "append: OK
2852 count: 7
2853 7 current message
2854 7 uid: 7
2855 7 env_date: Mon Jul 29 21:00:09 2002
2856 7 env_sender: [email protected]
2857 7 attr: FPR
2858 7 headers: Received:(from [email protected]) by wonder.land id 3304 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
2859 Date:Mon, 29 Jul 2002 22:00:04 +0100
2860 From:Alice <[email protected]>
2861 Message-Id:<[email protected]>
2862 To:March Hare <[email protected]>
2863 Subject:Re: Invitation
2864
2865 7 body_text: Then it wasn't very civil of you to offer it
2866
2867 " | \
2868 $at_diff - "$at_stdout" || at_failed=:
2869 at_fn_check_status 0 $at_status "$at_srcdir/append.at:84"
2870 $at_failed && at_fn_log_failure
2871 $at_traceon; }
2872
2873
2874 cat >commands.ae <<'_ATEOF'
2875 append -sender [email protected] -date 'Sat Dec 4 08:00:00 2021' -attr FRP msg
2876 count
2877 8
2878 uid
2879 env_date
2880 env_sender
2881 attr
2882 headers
2883 body_text
2884 _ATEOF
2885
2886
2887 { set +x
2888 printf "%s\n" "$at_srcdir/append.at:116: TZ=0 mbop -m inbox < commands.ae"
2889 at_fn_check_prepare_trace "append.at:116"
2890 ( $at_check_trace; TZ=0 mbop -m inbox < commands.ae
2891 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2892 at_status=$? at_failed=false
2893 $at_check_filter
2894 at_fn_diff_devnull "$at_stderr" || at_failed=:
2895 echo >>"$at_stdout"; printf "%s\n" "append: OK
2896 count: 8
2897 8 current message
2898 8 uid: 8
2899 8 env_date: Sat Dec 4 08:00:00 2021
2900 8 env_sender: [email protected]
2901 8 attr: FPR
2902 8 headers: Return-Path:[email protected]
2903 Received:from localhost by localhost; Sat, 4 Dec 2021 08:00:00 +0000
2904 Received:(from [email protected]) by wonder.land id 3304 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
2905 Date:Mon, 29 Jul 2002 22:00:04 +0100
2906 From:Alice <[email protected]>
2907 Message-Id:<[email protected]>
2908 To:March Hare <[email protected]>
2909 Subject:Re: Invitation
2910
2911 8 body_text: Then it wasn't very civil of you to offer it
2912
2913 " | \
2914 $at_diff - "$at_stdout" || at_failed=:
2915 at_fn_check_status 0 $at_status "$at_srcdir/append.at:116"
2916 $at_failed && at_fn_log_failure
2917 $at_traceon; }
2918
2919
2920 set +x
2921 $at_times_p && times >"$at_times_file"
2922 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2923 read at_status <"$at_status_file"
2924 #AT_STOP_11
2925 #AT_START_12
2926 at_fn_group_banner 12 'notify.at:17' \
2927 "append notification" " "
2928 at_xfail=no
2929 (
2930 printf "%s\n" "12. $at_setup_line: testing $at_desc ..."
2931 $at_traceon
2932
2933 { set +x
2934 printf "%s\n" "$at_srcdir/notify.at:18: mbox2dir -p -v 10 -u inbox \$spooldir/mbox1"
2935 at_fn_check_prepare_dynamic "mbox2dir -p -v 10 -u inbox $spooldir/mbox1" "notify.at:18"
2936 ( $at_check_trace; mbox2dir -p -v 10 -u inbox $spooldir/mbox1
2937 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2938 at_status=$? at_failed=false
2939 $at_check_filter
2940 at_fn_diff_devnull "$at_stderr" || at_failed=:
2941 at_fn_diff_devnull "$at_stdout" || at_failed=:
2942 at_fn_check_status 0 $at_status "$at_srcdir/notify.at:18"
2943 $at_failed && at_fn_log_failure
2944 $at_traceon; }
2945
2946 cat >msg <<'_ATEOF'
2947 Received: (from [email protected])
2948 by wonder.land id 3304
2949 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
2950 Date: Mon, 29 Jul 2002 22:00:04 +0100
2951 From: Alice <[email protected]>
2952 Message-Id: <[email protected]>
2953 To: March Hare <[email protected]>
2954 Subject: Re: Invitation
2955 Return-Path: [email protected]
2956
2957 Then it wasn't very civil of you to offer it
2958 _ATEOF
2959
2960 { set +x
2961 printf "%s\n" "$at_srcdir/notify.at:32:
2962 mbop -m inbox --notify append msg
2963 "
2964 at_fn_check_prepare_notrace 'an embedded newline' "notify.at:32"
2965 ( $at_check_trace;
2966 mbop -m inbox --notify append msg
2967
2968 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2969 at_status=$? at_failed=false
2970 $at_check_filter
2971 echo >>"$at_stderr"; printf "%s\n" "mbop: new message: Alice <[email protected]> Re: Invitation
2972 " | \
2973 $at_diff - "$at_stderr" || at_failed=:
2974 echo >>"$at_stdout"; printf "%s\n" "append: OK
2975 " | \
2976 $at_diff - "$at_stdout" || at_failed=:
2977 at_fn_check_status 0 $at_status "$at_srcdir/notify.at:32"
2978 $at_failed && at_fn_log_failure
2979 $at_traceon; }
2980
2981 set +x
2982 $at_times_p && times >"$at_times_file"
2983 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2984 read at_status <"$at_status_file"
2985 #AT_STOP_12
2986 #AT_START_13
2987 at_fn_group_banner 13 'delete.at:17' \
2988 "delete" " "
2989 at_xfail=no
2990 (
2991 printf "%s\n" "13. $at_setup_line: testing $at_desc ..."
2992 $at_traceon
2993
2994 { set +x
2995 printf "%s\n" "$at_srcdir/delete.at:18: mbox2dir -p -v 10 -u inbox \$spooldir/mbox1"
2996 at_fn_check_prepare_dynamic "mbox2dir -p -v 10 -u inbox $spooldir/mbox1" "delete.at:18"
2997 ( $at_check_trace; mbox2dir -p -v 10 -u inbox $spooldir/mbox1
2998 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2999 at_status=$? at_failed=false
3000 $at_check_filter
3001 at_fn_diff_devnull "$at_stderr" || at_failed=:
3002 at_fn_diff_devnull "$at_stdout" || at_failed=:
3003 at_fn_check_status 0 $at_status "$at_srcdir/delete.at:18"
3004 $at_failed && at_fn_log_failure
3005 $at_traceon; }
3006
3007 cat >commands <<'_ATEOF'
3008 3
3009 set_deleted
3010 expunge
3011 # Message 4 becomes 3 after expunge. Re-select it.
3012 3
3013 uid
3014 headers
3015 _ATEOF
3016
3017 { set +x
3018 printf "%s\n" "$at_srcdir/delete.at:28:
3019 mbop -m inbox < commands
3020 "
3021 at_fn_check_prepare_notrace 'an embedded newline' "delete.at:28"
3022 ( $at_check_trace;
3023 mbop -m inbox < commands
3024
3025 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3026 at_status=$? at_failed=false
3027 $at_check_filter
3028 at_fn_diff_devnull "$at_stderr" || at_failed=:
3029 echo >>"$at_stdout"; printf "%s\n" "3 current message
3030 3 set_deleted: OK
3031 expunge: OK
3032 3 current message
3033 3 uid: 4
3034 3 headers: Organization:Mailutils-tests
3035 Received:from example.net (localhost [127.0.0.1]) by example.net with ESMTP id g6CLowb05126 for <[email protected]>; Sat, 13 Jul 2002 00:50:58 +0300
3036 Message-Id:<[email protected]>
3037 To:Foo Bar <[email protected]>
3038 Subject:Nested MIME
3039 MIME-Version:1.0
3040 Content-Type:multipart/mixed; boundary=\"----- =_aaaaaaaaaa0\"
3041 Content-ID:<[email protected]>
3042 Date:Sat, 13 Jul 2002 00:50:58 +0300
3043 From:Sergey Poznyakoff <[email protected]>
3044
3045 " | \
3046 $at_diff - "$at_stdout" || at_failed=:
3047 at_fn_check_status 0 $at_status "$at_srcdir/delete.at:28"
3048 $at_failed && at_fn_log_failure
3049 $at_traceon; }
3050
3051 set +x
3052 $at_times_p && times >"$at_times_file"
3053 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3054 read at_status <"$at_status_file"
3055 #AT_STOP_13
3056 #AT_START_14
3057 at_fn_group_banner 14 'uidnext.at:17' \
3058 "UID monotonicity" " "
3059 at_xfail=no
3060 (
3061 printf "%s\n" "14. $at_setup_line: testing $at_desc ..."
3062 $at_traceon
3063
3064 cat >names <<'_ATEOF'
3065 cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
3066 cur/1284628225.M19181P3883Q1.Trurl,u=20:2,S
3067 cur/1284628225.M20118P3883Q2.Trurl,u=22:2,
3068 cur/1284628225.M21284P3883Q3.Trurl,u=43:2,
3069 cur/1284628225.M22502P3883Q4.Trurl,u=50:2,
3070 _ATEOF
3071
3072 { set +x
3073 printf "%s\n" "$at_srcdir/uidnext.at:25: mbox2dir -i names -p -v 10 -u inbox \$spooldir/mbox1"
3074 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 -u inbox $spooldir/mbox1" "uidnext.at:25"
3075 ( $at_check_trace; mbox2dir -i names -p -v 10 -u inbox $spooldir/mbox1
3076 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3077 at_status=$? at_failed=false
3078 $at_check_filter
3079 at_fn_diff_devnull "$at_stderr" || at_failed=:
3080 at_fn_diff_devnull "$at_stdout" || at_failed=:
3081 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:25"
3082 $at_failed && at_fn_log_failure
3083 $at_traceon; }
3084
3085
3086 { set +x
3087 printf "%s\n" "$at_srcdir/uidnext.at:27: mbop -m inbox uidnext \\; uidvalidity"
3088 at_fn_check_prepare_trace "uidnext.at:27"
3089 ( $at_check_trace; mbop -m inbox uidnext \; uidvalidity
3090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3091 at_status=$? at_failed=false
3092 $at_check_filter
3093 at_fn_diff_devnull "$at_stderr" || at_failed=:
3094 echo >>"$at_stdout"; printf "%s\n" "uidnext: 51
3095 uidvalidity: 10
3096 " | \
3097 $at_diff - "$at_stdout" || at_failed=:
3098 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:27"
3099 $at_failed && at_fn_log_failure
3100 $at_traceon; }
3101
3102
3103 { set +x
3104 printf "%s\n" "$at_srcdir/uidnext.at:33: mbop -m inbox 5 \\; set_deleted \\; expunge"
3105 at_fn_check_prepare_trace "uidnext.at:33"
3106 ( $at_check_trace; mbop -m inbox 5 \; set_deleted \; expunge
3107 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3108 at_status=$? at_failed=false
3109 $at_check_filter
3110 at_fn_diff_devnull "$at_stderr" || at_failed=:
3111 echo >>"$at_stdout"; printf "%s\n" "5 current message
3112 5 set_deleted: OK
3113 expunge: OK
3114 " | \
3115 $at_diff - "$at_stdout" || at_failed=:
3116 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:33"
3117 $at_failed && at_fn_log_failure
3118 $at_traceon; }
3119
3120
3121 { set +x
3122 printf "%s\n" "$at_srcdir/uidnext.at:40: mbop -m inbox uidnext \\; uidvalidity"
3123 at_fn_check_prepare_trace "uidnext.at:40"
3124 ( $at_check_trace; mbop -m inbox uidnext \; uidvalidity
3125 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3126 at_status=$? at_failed=false
3127 $at_check_filter
3128 at_fn_diff_devnull "$at_stderr" || at_failed=:
3129 echo >>"$at_stdout"; printf "%s\n" "uidnext: 51
3130 uidvalidity: 10
3131 " | \
3132 $at_diff - "$at_stdout" || at_failed=:
3133 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:40"
3134 $at_failed && at_fn_log_failure
3135 $at_traceon; }
3136
3137
3138 cat >msg <<'_ATEOF'
3139 Received: (from [email protected])
3140 by wonder.land id 3304
3141 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3142 Date: Mon, 29 Jul 2002 22:00:04 +0100
3143 From: Alice <[email protected]>
3144 Message-Id: <[email protected]>
3145 To: March Hare <[email protected]>
3146 Subject: Re: Invitation
3147 Return-Path: [email protected]
3148
3149 Then it wasn't very civil of you to offer it
3150 _ATEOF
3151
3152
3153 { set +x
3154 printf "%s\n" "$at_srcdir/uidnext.at:60: mbop -m inbox append msg \\; count \\; 5 \\; uid \\; uidnext"
3155 at_fn_check_prepare_trace "uidnext.at:60"
3156 ( $at_check_trace; mbop -m inbox append msg \; count \; 5 \; uid \; uidnext
3157 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3158 at_status=$? at_failed=false
3159 $at_check_filter
3160 at_fn_diff_devnull "$at_stderr" || at_failed=:
3161 echo >>"$at_stdout"; printf "%s\n" "append: OK
3162 count: 5
3163 5 current message
3164 5 uid: 51
3165 uidnext: 52
3166 " | \
3167 $at_diff - "$at_stdout" || at_failed=:
3168 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:60"
3169 $at_failed && at_fn_log_failure
3170 $at_traceon; }
3171
3172
3173 { set +x
3174 printf "%s\n" "$at_srcdir/uidnext.at:69: mbop -m inbox uidnext \\; uidvalidity"
3175 at_fn_check_prepare_trace "uidnext.at:69"
3176 ( $at_check_trace; mbop -m inbox uidnext \; uidvalidity
3177 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3178 at_status=$? at_failed=false
3179 $at_check_filter
3180 at_fn_diff_devnull "$at_stderr" || at_failed=:
3181 echo >>"$at_stdout"; printf "%s\n" "uidnext: 52
3182 uidvalidity: 10
3183 " | \
3184 $at_diff - "$at_stdout" || at_failed=:
3185 at_fn_check_status 0 $at_status "$at_srcdir/uidnext.at:69"
3186 $at_failed && at_fn_log_failure
3187 $at_traceon; }
3188
3189
3190 set +x
3191 $at_times_p && times >"$at_times_file"
3192 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3193 read at_status <"$at_status_file"
3194 #AT_STOP_14
3195 #AT_START_15
3196 at_fn_group_banner 15 'attfixup.at:17' \
3197 "attribute fixup" " "
3198 at_xfail=no
3199 (
3200 printf "%s\n" "15. $at_setup_line: testing $at_desc ..."
3201 $at_traceon
3202
3203
3204 cat >names <<'_ATEOF'
3205 cur/1284628225.M17468P3883Q0.Trurl:2,S
3206 cur/1284628225.M19181P3883Q1.Trurl:2,RS
3207 cur/1284628225.M20118P3883Q2.Trurl:2,S
3208 cur/1284628225.M21284P3883Q3.Trurl:2,S
3209 cur/1284628225.M22502P3883Q4.Trurl:2,S
3210 _ATEOF
3211
3212
3213 { set +x
3214 printf "%s\n" "$at_srcdir/attfixup.at:27: mbox2dir -i names inbox \$spooldir/mbox1"
3215 at_fn_check_prepare_dynamic "mbox2dir -i names inbox $spooldir/mbox1" "attfixup.at:27"
3216 ( $at_check_trace; mbox2dir -i names inbox $spooldir/mbox1
3217 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3218 at_status=$? at_failed=false
3219 $at_check_filter
3220 at_fn_diff_devnull "$at_stderr" || at_failed=:
3221 at_fn_diff_devnull "$at_stdout" || at_failed=:
3222 at_fn_check_status 0 $at_status "$at_srcdir/attfixup.at:27"
3223 $at_failed && at_fn_log_failure
3224 $at_traceon; }
3225
3226
3227 { set +x
3228 printf "%s\n" "$at_srcdir/attfixup.at:29:
3229 cat >inbox/.mu-prop <<'_ATEOF'
3230 uid-validity: 10
3231 _ATEOF
3232
3233 mbop -m inbox count
3234 find inbox/cur -type f | sort
3235 cp inbox/.mu-prop saved_mu_prop
3236 "
3237 at_fn_check_prepare_notrace 'an embedded newline' "attfixup.at:29"
3238 ( $at_check_trace;
3239 cat >inbox/.mu-prop <<'_ATEOF'
3240 uid-validity: 10
3241 _ATEOF
3242
3243 mbop -m inbox count
3244 find inbox/cur -type f | sort
3245 cp inbox/.mu-prop saved_mu_prop
3246
3247 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3248 at_status=$? at_failed=false
3249 $at_check_filter
3250 at_fn_diff_devnull "$at_stderr" || at_failed=:
3251 echo >>"$at_stdout"; printf "%s\n" "count: 5
3252 inbox/cur/1284628225.M17468P3883Q0.Trurl,a=O,u=1:2,
3253 inbox/cur/1284628225.M19181P3883Q1.Trurl,a=O,u=2:2,S
3254 inbox/cur/1284628225.M20118P3883Q2.Trurl,a=O,u=3:2,
3255 inbox/cur/1284628225.M21284P3883Q3.Trurl,a=O,u=4:2,
3256 inbox/cur/1284628225.M22502P3883Q4.Trurl,a=O,u=5:2,
3257 " | \
3258 $at_diff - "$at_stdout" || at_failed=:
3259 at_fn_check_status 0 $at_status "$at_srcdir/attfixup.at:29"
3260 $at_failed && at_fn_log_failure
3261 $at_traceon; }
3262
3263
3264 { set +x
3265 printf "%s\n" "$at_srcdir/attfixup.at:46:
3266 mbop -m inbox count
3267 "
3268 at_fn_check_prepare_notrace 'an embedded newline' "attfixup.at:46"
3269 ( $at_check_trace;
3270 mbop -m inbox count
3271
3272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3273 at_status=$? at_failed=false
3274 $at_check_filter
3275 at_fn_diff_devnull "$at_stderr" || at_failed=:
3276 echo >>"$at_stdout"; printf "%s\n" "count: 5
3277 " | \
3278 $at_diff - "$at_stdout" || at_failed=:
3279 at_fn_check_status 0 $at_status "$at_srcdir/attfixup.at:46"
3280 $at_failed && at_fn_log_failure
3281 $at_traceon; }
3282
3283
3284 { set +x
3285 printf "%s\n" "$at_srcdir/attfixup.at:53:
3286 cp saved_mu_prop expout
3287 cat inbox/.mu-prop
3288 "
3289 at_fn_check_prepare_notrace 'an embedded newline' "attfixup.at:53"
3290 ( $at_check_trace;
3291 cp saved_mu_prop expout
3292 cat inbox/.mu-prop
3293
3294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3295 at_status=$? at_failed=false
3296 $at_check_filter
3297 at_fn_diff_devnull "$at_stderr" || at_failed=:
3298 $at_diff expout "$at_stdout" || at_failed=:
3299 at_fn_check_status 0 $at_status "$at_srcdir/attfixup.at:53"
3300 $at_failed && at_fn_log_failure
3301 $at_traceon; }
3302
3303
3304 set +x
3305 $at_times_p && times >"$at_times_file"
3306 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3307 read at_status <"$at_status_file"
3308 #AT_STOP_15
3309 #AT_START_16
3310 at_fn_group_banner 16 'uidfixup.at:17' \
3311 "uid fixup" " "
3312 at_xfail=no
3313 (
3314 printf "%s\n" "16. $at_setup_line: testing $at_desc ..."
3315 $at_traceon
3316
3317 cat >names <<'_ATEOF'
3318 cur/1284628225.M17468P3883Q0.Trurl:2,
3319 cur/1284628225.M19181P3883Q1.Trurl:2,S
3320 cur/1284628225.M20118P3883Q2.Trurl:2,
3321 cur/1284628225.M21284P3883Q3.Trurl:2,
3322 cur/1284628225.M22502P3883Q4.Trurl:2,
3323 _ATEOF
3324
3325
3326 { set +x
3327 printf "%s\n" "$at_srcdir/uidfixup.at:26: mbox2dir -i names -p -v 10 inbox \$spooldir/mbox1"
3328 at_fn_check_prepare_dynamic "mbox2dir -i names -p -v 10 inbox $spooldir/mbox1" "uidfixup.at:26"
3329 ( $at_check_trace; mbox2dir -i names -p -v 10 inbox $spooldir/mbox1
3330 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3331 at_status=$? at_failed=false
3332 $at_check_filter
3333 at_fn_diff_devnull "$at_stderr" || at_failed=:
3334 at_fn_diff_devnull "$at_stdout" || at_failed=:
3335 at_fn_check_status 0 $at_status "$at_srcdir/uidfixup.at:26"
3336 $at_failed && at_fn_log_failure
3337 $at_traceon; }
3338
3339
3340 { set +x
3341 printf "%s\n" "$at_srcdir/uidfixup.at:28:
3342 mbop -m inbox count
3343
3344 find inbox/cur -type f | sort
3345
3346 # The following pipeline returns 0 if UID fixup has updated the uidvalidity
3347 # value:
3348 sed -e 's/ *//' inbox/.mu-prop | grep -v '^uid-validity:10\$' | grep uid-validity >/dev/null
3349 "
3350 at_fn_check_prepare_notrace 'an embedded newline' "uidfixup.at:28"
3351 ( $at_check_trace;
3352 mbop -m inbox count
3353
3354 find inbox/cur -type f | sort
3355
3356 # The following pipeline returns 0 if UID fixup has updated the uidvalidity
3357 # value:
3358 sed -e 's/ *//' inbox/.mu-prop | grep -v '^uid-validity:10$' | grep uid-validity >/dev/null
3359
3360 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3361 at_status=$? at_failed=false
3362 $at_check_filter
3363 at_fn_diff_devnull "$at_stderr" || at_failed=:
3364 echo >>"$at_stdout"; printf "%s\n" "count: 5
3365 inbox/cur/1284628225.M17468P3883Q0.Trurl,u=1:2,
3366 inbox/cur/1284628225.M19181P3883Q1.Trurl,u=2:2,S
3367 inbox/cur/1284628225.M20118P3883Q2.Trurl,u=3:2,
3368 inbox/cur/1284628225.M21284P3883Q3.Trurl,u=4:2,
3369 inbox/cur/1284628225.M22502P3883Q4.Trurl,u=5:2,
3370 " | \
3371 $at_diff - "$at_stdout" || at_failed=:
3372 at_fn_check_status 0 $at_status "$at_srcdir/uidfixup.at:28"
3373 $at_failed && at_fn_log_failure
3374 $at_traceon; }
3375
3376
3377 set +x
3378 $at_times_p && times >"$at_times_file"
3379 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3380 read at_status <"$at_status_file"
3381 #AT_STOP_16
3382 #AT_START_17
3383 at_fn_group_banner 17 'isyncread.at:17' \
3384 "isync: reading" " " 1
3385 at_xfail=no
3386 (
3387 printf "%s\n" "17. $at_setup_line: testing $at_desc ..."
3388 $at_traceon
3389
3390
3391
3392 cat >names <<'_ATEOF'
3393 cur/1749702294.23231_1.Trurl,U=10:2,S
3394 cur/1749702294.23231_2.Trurl,U=11:2,RS
3395 cur/1749702294.23231_3.Trurl,U=12:2,S
3396 cur/1749702394.23232_1.Trurl,U=20:2,S
3397 cur/1749702394.23232_2.Trurl,U=25:2,S
3398 _ATEOF
3399
3400
3401 { set +x
3402 printf "%s\n" "$at_srcdir/isyncread.at:28: mbox2dir -i names inbox \$spooldir/mbox1
3403 cat >inbox/.uidvalidity <<'_ATEOF'
3404 174970200
3405 25
3406 _ATEOF
3407
3408 "
3409 at_fn_check_prepare_notrace 'an embedded newline' "isyncread.at:28"
3410 ( $at_check_trace; mbox2dir -i names inbox $spooldir/mbox1
3411 cat >inbox/.uidvalidity <<'_ATEOF'
3412 174970200
3413 25
3414 _ATEOF
3415
3416
3417 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3418 at_status=$? at_failed=false
3419 $at_check_filter
3420 at_fn_diff_devnull "$at_stderr" || at_failed=:
3421 at_fn_diff_devnull "$at_stdout" || at_failed=:
3422 at_fn_check_status 0 $at_status "$at_srcdir/isyncread.at:28"
3423 $at_failed && at_fn_log_failure
3424 $at_traceon; }
3425
3426
3427 { set +x
3428 printf "%s\n" "$at_srcdir/isyncread.at:35: mbop -m inbox uidvalidity \\; uidnext \\; 2 \\; uid \\; 4 \\; uid \\; 5 \\; uid"
3429 at_fn_check_prepare_trace "isyncread.at:35"
3430 ( $at_check_trace; mbop -m inbox uidvalidity \; uidnext \; 2 \; uid \; 4 \; uid \; 5 \; uid
3431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3432 at_status=$? at_failed=false
3433 $at_check_filter
3434 at_fn_diff_devnull "$at_stderr" || at_failed=:
3435 echo >>"$at_stdout"; printf "%s\n" "uidvalidity: 174970200
3436 uidnext: 26
3437 2 current message
3438 2 uid: 11
3439 4 current message
3440 4 uid: 20
3441 5 current message
3442 5 uid: 25
3443 " | \
3444 $at_diff - "$at_stdout" || at_failed=:
3445 at_fn_check_status 0 $at_status "$at_srcdir/isyncread.at:35"
3446 $at_failed && at_fn_log_failure
3447 $at_traceon; }
3448
3449
3450 { set +x
3451 printf "%s\n" "$at_srcdir/isyncread.at:47:
3452 cat >commands <<'_ATEOF'
3453 1
3454 header_lines
3455 header_size
3456 header_count
3457 headers
3458 2
3459 header_lines
3460 header_size
3461 header_count
3462 headers
3463 _ATEOF
3464
3465 mbop -m inbox < commands
3466 "
3467 at_fn_check_prepare_notrace 'an embedded newline' "isyncread.at:47"
3468 ( $at_check_trace;
3469 cat >commands <<'_ATEOF'
3470 1
3471 header_lines
3472 header_size
3473 header_count
3474 headers
3475 2
3476 header_lines
3477 header_size
3478 header_count
3479 headers
3480 _ATEOF
3481
3482 mbop -m inbox < commands
3483
3484 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3485 at_status=$? at_failed=false
3486 $at_check_filter
3487 at_fn_diff_devnull "$at_stderr" || at_failed=:
3488 echo >>"$at_stdout"; printf "%s\n" "1 current message
3489 1 header_lines: 9
3490 1 header_size: 317
3491 1 header_count: 6
3492 1 headers: Received:(from [email protected]) by nonexistent.net id fBSKI8N04906 for [email protected]; Fri, 28 Dec 2001 22:18:08 +0200
3493 Date:Fri, 28 Dec 2001 22:18:08 +0200
3494 From:Foo Bar <[email protected]>
3495 Message-Id:<[email protected]>
3496 To:Bar <[email protected]>
3497 Subject:Jabberwocky
3498
3499 2 current message
3500 2 header_lines: 9
3501 2 header_size: 319
3502 2 header_count: 6
3503 2 headers: Received:(from [email protected]) by dontmailme.org id fERKR9N16790 for [email protected]; Fri, 28 Dec 2001 22:18:08 +0200
3504 Date:Fri, 28 Dec 2001 23:28:08 +0200
3505 From:Bar <[email protected]>
3506 To:Foo Bar <[email protected]>
3507 Message-Id:<[email protected]>
3508 Subject:Re: Jabberwocky
3509
3510 " | \
3511 $at_diff - "$at_stdout" || at_failed=:
3512 at_fn_check_status 0 $at_status "$at_srcdir/isyncread.at:47"
3513 $at_failed && at_fn_log_failure
3514 $at_traceon; }
3515
3516
3517 { set +x
3518 printf "%s\n" "$at_srcdir/isyncread.at:87:
3519 cat >commands <<'_ATEOF'
3520 1
3521 body_lines
3522 body_size
3523 body_text
3524 2
3525 body_lines
3526 body_size
3527 body_text
3528 _ATEOF
3529
3530 mbop -m inbox < commands
3531 "
3532 at_fn_check_prepare_notrace 'an embedded newline' "isyncread.at:87"
3533 ( $at_check_trace;
3534 cat >commands <<'_ATEOF'
3535 1
3536 body_lines
3537 body_size
3538 body_text
3539 2
3540 body_lines
3541 body_size
3542 body_text
3543 _ATEOF
3544
3545 mbop -m inbox < commands
3546
3547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3548 at_status=$? at_failed=false
3549 $at_check_filter
3550 at_fn_diff_devnull "$at_stderr" || at_failed=:
3551 echo >>"$at_stdout"; printf "%s\n" "1 current message
3552 1 body_lines: 35
3553 1 body_size: 937
3554 1 body_text: \`Twas brillig, and the slithy toves
3555 Did gyre and gimble in the wabe;
3556 All mimsy were the borogoves,
3557 And the mome raths outgrabe.
3558
3559 \`Beware the Jabberwock, my son!
3560 The jaws that bite, the claws that catch!
3561 Beware the Jujub bird, and shun
3562 The frumious Bandersnatch!'
3563
3564 He took his vorpal sword in hand:
3565 Long time the manxome foe he sought --
3566 So rested he by the Tumtum gree,
3567 And stood awhile in thought.
3568
3569 And as in uffish thought he stood,
3570 The Jabberwock, with eyes of flame,
3571 Came whiffling through the tulgey wook,
3572 And burbled as it came!
3573
3574 One, two! One, two! And through and through
3575 The vorpal blade went snicker-snack!
3576 He left it dead, and with its head
3577 He went galumphing back.
3578
3579 \`And has thou slain the Jabberwock?
3580 Come to my arms, my beamish boy!
3581 O frabjous day! Calloh! Callay!
3582 He chortled in his joy.
3583
3584 \`Twas brillig, and the slithy toves
3585 Did gyre and gimble in the wabe;
3586 All mimsy were the borogoves,
3587 And the mome raths outgrabe.
3588
3589
3590 2 current message
3591 2 body_lines: 4
3592 2 body_size: 215
3593 2 body_text: It seems very pretty, but it's *rather* hard to understand!'
3594 Somehow it seems to fill my head with ideas -- only I don't
3595 exactly know what they are! However, SOMEBODY killed SOMETHING:
3596 that's clear, at any rate...
3597
3598 " | \
3599 $at_diff - "$at_stdout" || at_failed=:
3600 at_fn_check_status 0 $at_status "$at_srcdir/isyncread.at:87"
3601 $at_failed && at_fn_log_failure
3602 $at_traceon; }
3603
3604
3605
3606 set +x
3607 $at_times_p && times >"$at_times_file"
3608 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3609 read at_status <"$at_status_file"
3610 #AT_STOP_17
3611 #AT_START_18
3612 at_fn_group_banner 18 'isyncwrite.at:17' \
3613 "isync: writing" " " 1
3614 at_xfail=no
3615 (
3616 printf "%s\n" "18. $at_setup_line: testing $at_desc ..."
3617 $at_traceon
3618
3619
3620
3621 cat >names <<'_ATEOF'
3622 cur/1749702294.23231_1.Trurl,U=10:2,S
3623 cur/1749702294.23231_2.Trurl,U=11:2,RS
3624 cur/1749702294.23231_3.Trurl,U=12:2,S
3625 cur/1749702394.23232_1.Trurl,U=20:2,S
3626 cur/1749702394.23232_2.Trurl,U=25:2,S
3627 _ATEOF
3628
3629
3630 { set +x
3631 printf "%s\n" "$at_srcdir/isyncwrite.at:28: mbox2dir -i names inbox \$spooldir/mbox1
3632 cat >inbox/.uidvalidity <<'_ATEOF'
3633 174970200
3634 25
3635 _ATEOF
3636
3637 "
3638 at_fn_check_prepare_notrace 'an embedded newline' "isyncwrite.at:28"
3639 ( $at_check_trace; mbox2dir -i names inbox $spooldir/mbox1
3640 cat >inbox/.uidvalidity <<'_ATEOF'
3641 174970200
3642 25
3643 _ATEOF
3644
3645
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 at_fn_diff_devnull "$at_stdout" || at_failed=:
3651 at_fn_check_status 0 $at_status "$at_srcdir/isyncwrite.at:28"
3652 $at_failed && at_fn_log_failure
3653 $at_traceon; }
3654
3655
3656 { set +x
3657 printf "%s\n" "$at_srcdir/isyncwrite.at:35:
3658 cat >msg <<'_ATEOF'
3659 Received: (from [email protected])
3660 by wonder.land id 3304
3661 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3662 Date: Mon, 29 Jul 2002 22:00:04 +0100
3663 From: Alice <[email protected]>
3664 Message-Id: <[email protected]>
3665 To: March Hare <[email protected]>
3666 Subject: Re: Invitation
3667 Status: O
3668
3669 Then it wasn't very civil of you to offer it
3670 _ATEOF
3671
3672 cat >commands <<'_ATEOF'
3673 append msg
3674 count
3675 6
3676 uid
3677 env_date
3678 env_sender
3679 attr
3680 headers
3681 body_text
3682 _ATEOF
3683
3684 mbop -m inbox < commands
3685 "
3686 at_fn_check_prepare_notrace 'an embedded newline' "isyncwrite.at:35"
3687 ( $at_check_trace;
3688 cat >msg <<'_ATEOF'
3689 Received: (from [email protected])
3690 by wonder.land id 3304
3691 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3692 Date: Mon, 29 Jul 2002 22:00:04 +0100
3693 From: Alice <[email protected]>
3694 Message-Id: <[email protected]>
3695 To: March Hare <[email protected]>
3696 Subject: Re: Invitation
3697 Status: O
3698
3699 Then it wasn't very civil of you to offer it
3700 _ATEOF
3701
3702 cat >commands <<'_ATEOF'
3703 append msg
3704 count
3705 6
3706 uid
3707 env_date
3708 env_sender
3709 attr
3710 headers
3711 body_text
3712 _ATEOF
3713
3714 mbop -m inbox < commands
3715
3716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3717 at_status=$? at_failed=false
3718 $at_check_filter
3719 at_fn_diff_devnull "$at_stderr" || at_failed=:
3720 echo >>"$at_stdout"; printf "%s\n" "append: OK
3721 count: 6
3722 6 current message
3723 6 uid: 26
3724 6 env_date: Mon Jul 29 21:00:09 2002
3725 6 env_sender: [email protected]
3726 6 attr: -
3727 6 headers: Received:(from [email protected]) by wonder.land id 3304 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3728 Date:Mon, 29 Jul 2002 22:00:04 +0100
3729 From:Alice <[email protected]>
3730 Message-Id:<[email protected]>
3731 To:March Hare <[email protected]>
3732 Subject:Re: Invitation
3733
3734 6 body_text: Then it wasn't very civil of you to offer it
3735
3736 " | \
3737 $at_diff - "$at_stdout" || at_failed=:
3738 at_fn_check_status 0 $at_status "$at_srcdir/isyncwrite.at:35"
3739 $at_failed && at_fn_log_failure
3740 $at_traceon; }
3741
3742
3743 { set +x
3744 printf "%s\n" "$at_srcdir/isyncwrite.at:81: cat inbox/.uidvalidity"
3745 at_fn_check_prepare_trace "isyncwrite.at:81"
3746 ( $at_check_trace; cat inbox/.uidvalidity
3747 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3748 at_status=$? at_failed=false
3749 $at_check_filter
3750 at_fn_diff_devnull "$at_stderr" || at_failed=:
3751 echo >>"$at_stdout"; printf "%s\n" "174970200
3752 26
3753 " | \
3754 $at_diff - "$at_stdout" || at_failed=:
3755 at_fn_check_status 0 $at_status "$at_srcdir/isyncwrite.at:81"
3756 $at_failed && at_fn_log_failure
3757 $at_traceon; }
3758
3759
3760 { set +x
3761 printf "%s\n" "$at_srcdir/isyncwrite.at:87: newname=\$(find inbox/cur -name '*,U=26*' -printf '%f\\n')
3762 echo \$newname
3763 expr \"\$newname\" : '[0-9][0-9]*\\.[0-9][0-9]*_[0-9][0-9]*\\..*,U=26:2,'"
3764 at_fn_check_prepare_notrace 'a $(...) command substitution' "isyncwrite.at:87"
3765 ( $at_check_trace; newname=$(find inbox/cur -name '*,U=26*' -printf '%f\n')
3766 echo $newname
3767 expr "$newname" : '[0-9][0-9]*\.[0-9][0-9]*_[0-9][0-9]*\..*,U=26:2,'
3768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3769 at_status=$? at_failed=false
3770 $at_check_filter
3771 at_fn_diff_devnull "$at_stderr" || at_failed=:
3772 echo stdout:; tee stdout <"$at_stdout"
3773 at_fn_check_status 0 $at_status "$at_srcdir/isyncwrite.at:87"
3774 $at_failed && at_fn_log_failure
3775 $at_traceon; }
3776
3777
3778 set +x
3779 $at_times_p && times >"$at_times_file"
3780 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3781 read at_status <"$at_status_file"
3782 #AT_STOP_18
3783 #AT_START_19
3784 at_fn_group_banner 19 'isynccreat.at:17' \
3785 "isync: creating" " " 1
3786 at_xfail=no
3787 (
3788 printf "%s\n" "19. $at_setup_line: testing $at_desc ..."
3789 $at_traceon
3790
3791
3792
3793 { set +x
3794 printf "%s\n" "$at_srcdir/isynccreat.at:20: mkdir inbox
3795 mkdir inbox/cur inbox/new inbox/tmp
3796 "
3797 at_fn_check_prepare_notrace 'an embedded newline' "isynccreat.at:20"
3798 ( $at_check_trace; mkdir inbox
3799 mkdir inbox/cur inbox/new inbox/tmp
3800
3801 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3802 at_status=$? at_failed=false
3803 $at_check_filter
3804 at_fn_diff_devnull "$at_stderr" || at_failed=:
3805 at_fn_diff_devnull "$at_stdout" || at_failed=:
3806 at_fn_check_status 0 $at_status "$at_srcdir/isynccreat.at:20"
3807 $at_failed && at_fn_log_failure
3808 $at_traceon; }
3809
3810
3811 { set +x
3812 printf "%s\n" "$at_srcdir/isynccreat.at:24:
3813 cat >msg <<'_ATEOF'
3814 Received: (from [email protected])
3815 by wonder.land id 3304
3816 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3817 Date: Mon, 29 Jul 2002 22:00:04 +0100
3818 From: Alice <[email protected]>
3819 Message-Id: <[email protected]>
3820 To: March Hare <[email protected]>
3821 Subject: Re: Invitation
3822
3823 Then it wasn't very civil of you to offer it
3824 _ATEOF
3825
3826 mbop -m \"maildir://\$(pwd)/inbox;isync\" append msg
3827 "
3828 at_fn_check_prepare_notrace 'a $(...) command substitution' "isynccreat.at:24"
3829 ( $at_check_trace;
3830 cat >msg <<'_ATEOF'
3831 Received: (from [email protected])
3832 by wonder.land id 3304
3833 for [email protected]; Mon, 29 Jul 2002 22:00:09 +0100
3834 Date: Mon, 29 Jul 2002 22:00:04 +0100
3835 From: Alice <[email protected]>
3836 Message-Id: <[email protected]>
3837 To: March Hare <[email protected]>
3838 Subject: Re: Invitation
3839
3840 Then it wasn't very civil of you to offer it
3841 _ATEOF
3842
3843 mbop -m "maildir://$(pwd)/inbox;isync" append msg
3844
3845 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3846 at_status=$? at_failed=false
3847 $at_check_filter
3848 at_fn_diff_devnull "$at_stderr" || at_failed=:
3849 echo >>"$at_stdout"; printf "%s\n" "append: OK
3850 " | \
3851 $at_diff - "$at_stdout" || at_failed=:
3852 at_fn_check_status 0 $at_status "$at_srcdir/isynccreat.at:24"
3853 $at_failed && at_fn_log_failure
3854 $at_traceon; }
3855
3856
3857 { set +x
3858 printf "%s\n" "$at_srcdir/isynccreat.at:43: newname=\$(find inbox/new -type f -printf '%f\\n')
3859 echo \$newname
3860 expr \"\$newname\" : '[0-9][0-9]*\\.[0-9][0-9]*_[0-9][0-9]*\\..*,U=1:2,'"
3861 at_fn_check_prepare_notrace 'a $(...) command substitution' "isynccreat.at:43"
3862 ( $at_check_trace; newname=$(find inbox/new -type f -printf '%f\n')
3863 echo $newname
3864 expr "$newname" : '[0-9][0-9]*\.[0-9][0-9]*_[0-9][0-9]*\..*,U=1:2,'
3865 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3866 at_status=$? at_failed=false
3867 $at_check_filter
3868 at_fn_diff_devnull "$at_stderr" || at_failed=:
3869 echo stdout:; tee stdout <"$at_stdout"
3870 at_fn_check_status 0 $at_status "$at_srcdir/isynccreat.at:43"
3871 $at_failed && at_fn_log_failure
3872 $at_traceon; }
3873
3874
3875 { set +x
3876 printf "%s\n" "$at_srcdir/isynccreat.at:49: sed -n 2p inbox/.uidvalidity"
3877 at_fn_check_prepare_trace "isynccreat.at:49"
3878 ( $at_check_trace; sed -n 2p inbox/.uidvalidity
3879 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3880 at_status=$? at_failed=false
3881 $at_check_filter
3882 at_fn_diff_devnull "$at_stderr" || at_failed=:
3883 echo >>"$at_stdout"; printf "%s\n" "1
3884 " | \
3885 $at_diff - "$at_stdout" || at_failed=:
3886 at_fn_check_status 0 $at_status "$at_srcdir/isynccreat.at:49"
3887 $at_failed && at_fn_log_failure
3888 $at_traceon; }
3889
3890
3891 set +x
3892 $at_times_p && times >"$at_times_file"
3893 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3894 read at_status <"$at_status_file"
3895 #AT_STOP_19