Debian Codegraph @

modules/outline/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;exact.at:17;exact;match exact;
614 2;prefix.at:17;prefix;match re;
615 3;suffix.at:17;suffix;match suffix;
616 4;lev.at:17;Levenshtein;match lev;
617 5;nlev.at:17;Levenshtein normalized;match nlev;
618 6;dlev.at:17;Damerau-Levenshtein;match dlev;
619 7;dnlev.at:17;Damerau-Levenshtein normalized;match ndlev;
620 8;soundex.at:17;SOUNDEX;match soundex;
621 9;regexp.at:17;Basic regular expressions;match regexp;
622 10;re.at:17;Extended regular expressions;match re;
623 11;define.at:17;define;define;
624 12;mime.at:17;option mime;option mime;
625 13;showdb.at:17;show db;show showdb;
626 14;showinfo.at:17;show info;show showinfo;
627 15;showlang.at:17;show lang info;show lang showlang;
628 "
629 # List of the all the test groups.
630 at_groups_all=`printf "%s\n" "$at_help_all" | sed 's/;.*//'`
631
632 # at_fn_validate_ranges NAME...
633 # -----------------------------
634 # Validate and normalize the test group number contained in each variable
635 # NAME. Leading zeroes are treated as decimal.
636 at_fn_validate_ranges ()
637 {
638 for at_grp
639 do
640 eval at_value=\$$at_grp
641 if test $at_value -lt 1 || test $at_value -gt 15; then
642 printf "%s\n" "invalid test group: $at_value" >&2
643 exit 1
644 fi
645 case $at_value in
646 0*) # We want to treat leading 0 as decimal, like expr and test, but
647 # AS_VAR_ARITH treats it as octal if it uses $(( )).
648 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
649 # expr fork, but it is not worth the effort to determine if the
650 # shell supports XSI when the user can just avoid leading 0.
651 eval $at_grp='`expr $at_value + 0`' ;;
652 esac
653 done
654 }
655
656 at_prev=
657 for at_option
658 do
659 # If the previous option needs an argument, assign it.
660 if test -n "$at_prev"; then
661 at_option=$at_prev=$at_option
662 at_prev=
663 fi
664
665 case $at_option in
666 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
667 *) at_optarg= ;;
668 esac
669
670 case $at_option in
671 --help | -h )
672 at_help_p=:
673 ;;
674
675 --list | -l )
676 at_list_p=:
677 ;;
678
679 --version | -V )
680 at_version_p=:
681 ;;
682
683 --clean | -c )
684 at_clean=:
685 ;;
686
687 --color )
688 at_color=always
689 ;;
690 --color=* )
691 case $at_optarg in
692 no | never | none) at_color=never ;;
693 auto | tty | if-tty) at_color=auto ;;
694 always | yes | force) at_color=always ;;
695 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
696 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
697 esac
698 ;;
699
700 --debug | -d )
701 at_debug_p=:
702 ;;
703
704 --errexit | -e )
705 at_debug_p=:
706 at_errexit_p=:
707 ;;
708
709 --verbose | -v )
710 at_verbose=; at_quiet=:
711 ;;
712
713 --trace | -x )
714 at_traceon='set -x'
715 at_trace_echo=echo
716 at_check_filter_trace=at_fn_filter_trace
717 ;;
718
719 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
720 at_fn_validate_ranges at_option
721 as_fn_append at_groups "$at_option$as_nl"
722 ;;
723
724 # Ranges
725 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
726 at_range_start=`echo $at_option |tr -d X-`
727 at_fn_validate_ranges at_range_start
728 at_range=`printf "%s\n" "$at_groups_all" | \
729 sed -ne '/^'$at_range_start'$/,$p'`
730 as_fn_append at_groups "$at_range$as_nl"
731 ;;
732
733 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
734 at_range_end=`echo $at_option |tr -d X-`
735 at_fn_validate_ranges at_range_end
736 at_range=`printf "%s\n" "$at_groups_all" | \
737 sed -ne '1,/^'$at_range_end'$/p'`
738 as_fn_append at_groups "$at_range$as_nl"
739 ;;
740
741 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
742 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
743 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
744 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
745 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
746 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
747 at_range_start=`expr $at_option : '\(.*\)-'`
748 at_range_end=`expr $at_option : '.*-\(.*\)'`
749 if test $at_range_start -gt $at_range_end; then
750 at_tmp=$at_range_end
751 at_range_end=$at_range_start
752 at_range_start=$at_tmp
753 fi
754 at_fn_validate_ranges at_range_start at_range_end
755 at_range=`printf "%s\n" "$at_groups_all" | \
756 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
757 as_fn_append at_groups "$at_range$as_nl"
758 ;;
759
760 # Directory selection.
761 --directory | -C )
762 at_prev=--directory
763 ;;
764 --directory=* )
765 at_change_dir=:
766 at_dir=$at_optarg
767 if test x- = "x$at_dir" ; then
768 at_dir=./-
769 fi
770 ;;
771
772 # Parallel execution.
773 --jobs | -j )
774 at_jobs=0
775 ;;
776 --jobs=* | -j[0-9]* )
777 if test -n "$at_optarg"; then
778 at_jobs=$at_optarg
779 else
780 at_jobs=`expr X$at_option : 'X-j\(.*\)'`
781 fi
782 case $at_jobs in *[!0-9]*)
783 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
784 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
785 esac
786 ;;
787
788 # Keywords.
789 --keywords | -k )
790 at_prev=--keywords
791 ;;
792 --keywords=* )
793 at_groups_selected=$at_help_all
794 at_save_IFS=$IFS
795 IFS=,
796 set X $at_optarg
797 shift
798 IFS=$at_save_IFS
799 for at_keyword
800 do
801 at_invert=
802 case $at_keyword in
803 '!'*)
804 at_invert="-v"
805 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
806 ;;
807 esac
808 # It is on purpose that we match the test group titles too.
809 at_groups_selected=`printf "%s\n" "$at_groups_selected" |
810 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
811 done
812 # Smash the keywords.
813 at_groups_selected=`printf "%s\n" "$at_groups_selected" | sed 's/;.*//'`
814 as_fn_append at_groups "$at_groups_selected$as_nl"
815 ;;
816 --recheck)
817 at_recheck=:
818 ;;
819
820 *=*)
821 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
822 # Reject names that are not valid shell variable names.
823 case $at_envvar in
824 '' | [0-9]* | *[!_$as_cr_alnum]* )
825 as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
826 esac
827 at_value=`printf "%s\n" "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
828 # Export now, but save eval for later and for debug scripts.
829 export $at_envvar
830 as_fn_append at_debug_args " $at_envvar='$at_value'"
831 ;;
832
833 *) printf "%s\n" "$as_me: invalid option: $at_option" >&2
834 printf "%s\n" "Try \`$0 --help' for more information." >&2
835 exit 1
836 ;;
837 esac
838 done
839
840 # Verify our last option didn't require an argument
841 if test -n "$at_prev"
842 then :
843 as_fn_error $? "\`$at_prev' requires an argument"
844 fi
845
846 # The file containing the suite.
847 at_suite_log=$at_dir/$as_me.log
848
849 # Selected test groups.
850 if test -z "$at_groups$at_recheck"; then
851 at_groups=$at_groups_all
852 else
853 if test -n "$at_recheck" && test -r "$at_suite_log"; then
854 at_oldfails=`sed -n '
855 /^Failed tests:$/,/^Skipped tests:$/{
856 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
857 }
858 /^Unexpected passes:$/,/^## Detailed failed tests/{
859 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
860 }
861 /^## Detailed failed tests/q
862 ' "$at_suite_log"`
863 as_fn_append at_groups "$at_oldfails$as_nl"
864 fi
865 # Sort the tests, removing duplicates.
866 at_groups=`printf "%s\n" "$at_groups" | sort -nu | sed '/^$/d'`
867 fi
868
869 if test x"$at_color" = xalways \
870 || { test x"$at_color" = xauto && test -t 1; }; then
871 at_red=`printf '\033[0;31m'`
872 at_grn=`printf '\033[0;32m'`
873 at_lgn=`printf '\033[1;32m'`
874 at_blu=`printf '\033[1;34m'`
875 at_std=`printf '\033[m'`
876 else
877 at_red= at_grn= at_lgn= at_blu= at_std=
878 fi
879
880 # Help message.
881 if $at_help_p; then
882 cat <<_ATEOF || at_write_fail=1
883 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
884
885 Run all the tests, or the selected TESTS, given by numeric ranges, and
886 save a detailed log file. Upon failure, create debugging scripts.
887
888 Do not change environment variables directly. Instead, set them via
889 command line arguments. Set \`AUTOTEST_PATH' to select the executables
890 to exercise. Each relative directory is expanded as build and source
891 directories relative to the top level of this distribution.
892 E.g., from within the build directory /tmp/foo-1.0, invoking this:
893
894 $ $0 AUTOTEST_PATH=bin
895
896 is equivalent to the following, assuming the source directory is /src/foo-1.0:
897
898 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
899 _ATEOF
900 cat <<_ATEOF || at_write_fail=1
901
902 Operation modes:
903 -h, --help print the help message, then exit
904 -V, --version print version number, then exit
905 -c, --clean remove all the files this test suite might create and exit
906 -l, --list describes all the tests, or the selected TESTS
907 _ATEOF
908 cat <<_ATEOF || at_write_fail=1
909
910 Execution tuning:
911 -C, --directory=DIR
912 change to directory DIR before starting
913 --color[=never|auto|always]
914 enable colored test results on terminal, or always
915 -j, --jobs[=N]
916 Allow N jobs at once; infinite jobs with no arg (default 1)
917 -k, --keywords=KEYWORDS
918 select the tests matching all the comma-separated KEYWORDS
919 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
920 --recheck select all tests that failed or passed unexpectedly last time
921 -e, --errexit abort as soon as a test fails; implies --debug
922 -v, --verbose force more detailed output
923 default for debugging scripts
924 -d, --debug inhibit clean up and top-level logging
925 default for debugging scripts
926 -x, --trace enable tests shell tracing
927 _ATEOF
928 cat <<_ATEOF || at_write_fail=1
929
930 Report bugs to <[email protected]>.
931 General help using GNU software: <https://www.gnu.org/gethelp/>.
932 _ATEOF
933 exit $at_write_fail
934 fi
935
936 # List of tests.
937 if $at_list_p; then
938 cat <<_ATEOF || at_write_fail=1
939 GNU dico 2.12 test suite test groups:
940
941 NUM: FILE-NAME:LINE TEST-GROUP-NAME
942 KEYWORDS
943
944 _ATEOF
945 # Pass an empty line as separator between selected groups and help.
946 printf "%s\n" "$at_groups$as_nl$as_nl$at_help_all" |
947 awk 'NF == 1 && FS != ";" {
948 selected[$ 1] = 1
949 next
950 }
951 /^$/ { FS = ";" }
952 NF > 0 {
953 if (selected[$ 1]) {
954 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
955 if ($ 4) {
956 lmax = 79
957 indent = " "
958 line = indent
959 len = length (line)
960 n = split ($ 4, a, " ")
961 for (i = 1; i <= n; i++) {
962 l = length (a[i]) + 1
963 if (i > 1 && len + l > lmax) {
964 print line
965 line = indent " " a[i]
966 len = length (line)
967 } else {
968 line = line " " a[i]
969 len += l
970 }
971 }
972 if (n)
973 print line
974 }
975 }
976 }' || at_write_fail=1
977 exit $at_write_fail
978 fi
979 if $at_version_p; then
980 printf "%s\n" "$as_me (GNU dico 2.12)" &&
981 cat <<\_ATEOF || at_write_fail=1
982
983 Copyright (C) 2021 Free Software Foundation, Inc.
984 This test suite is free software; the Free Software Foundation gives
985 unlimited permission to copy, distribute and modify it.
986 _ATEOF
987 exit $at_write_fail
988 fi
989
990 # Should we print banners? Yes if more than one test is run.
991 case $at_groups in #(
992 *$as_nl* )
993 at_print_banners=: ;; #(
994 * ) at_print_banners=false ;;
995 esac
996 # Text for banner N, set to a single space once printed.
997 # Banner 1. testsuite.at:23
998 # Category starts at test group 1.
999 at_banner_text_1="Match"
1000 # Banner 2. testsuite.at:35
1001 # Category starts at test group 11.
1002 at_banner_text_2="Define"
1003 # Banner 3. testsuite.at:39
1004 # Category starts at test group 13.
1005 at_banner_text_3="Show"
1006
1007 # Take any -C into account.
1008 if $at_change_dir ; then
1009 test x != "x$at_dir" && cd "$at_dir" \
1010 || as_fn_error $? "unable to change directory"
1011 at_dir=`pwd`
1012 fi
1013
1014 # Load the config files for any default variable assignments.
1015 for at_file in atconfig atlocal
1016 do
1017 test -r $at_file || continue
1018 . ./$at_file || as_fn_error $? "invalid content: $at_file"
1019 done
1020
1021 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1022 : "${at_top_build_prefix=$at_top_builddir}"
1023
1024 # Perform any assignments requested during argument parsing.
1025 eval "$at_debug_args"
1026
1027 # atconfig delivers names relative to the directory the test suite is
1028 # in, but the groups themselves are run in testsuite-dir/group-dir.
1029 if test -n "$at_top_srcdir"; then
1030 builddir=../..
1031 for at_dir_var in srcdir top_srcdir top_build_prefix
1032 do
1033 eval at_val=\$at_$at_dir_var
1034 case $at_val in
1035 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1036 *) at_prefix=../../ ;;
1037 esac
1038 eval "$at_dir_var=\$at_prefix\$at_val"
1039 done
1040 fi
1041
1042 ## -------------------- ##
1043 ## Directory structure. ##
1044 ## -------------------- ##
1045
1046 # This is the set of directories and files used by this script
1047 # (non-literals are capitalized):
1048 #
1049 # TESTSUITE - the testsuite
1050 # TESTSUITE.log - summarizes the complete testsuite run
1051 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1052 # + at-groups/ - during a run: status of all groups in run
1053 # | + NNN/ - during a run: meta-data about test group NNN
1054 # | | + check-line - location (source file and line) of current AT_CHECK
1055 # | | + status - exit status of current AT_CHECK
1056 # | | + stdout - stdout of current AT_CHECK
1057 # | | + stder1 - stderr, including trace
1058 # | | + stderr - stderr, with trace filtered out
1059 # | | + test-source - portion of testsuite that defines group
1060 # | | + times - timestamps for computing duration
1061 # | | + pass - created if group passed
1062 # | | + xpass - created if group xpassed
1063 # | | + fail - created if group failed
1064 # | | + xfail - created if group xfailed
1065 # | | + skip - created if group skipped
1066 # + at-stop - during a run: end the run if this file exists
1067 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1068 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1069 # | + TESTSUITE.log - summarizes the group results
1070 # | + ... - files created during the group
1071
1072 # The directory the whole suite works in.
1073 # Should be absolute to let the user `cd' at will.
1074 at_suite_dir=$at_dir/$as_me.dir
1075 # The file containing the suite ($at_dir might have changed since earlier).
1076 at_suite_log=$at_dir/$as_me.log
1077 # The directory containing helper files per test group.
1078 at_helper_dir=$at_suite_dir/at-groups
1079 # Stop file: if it exists, do not start new jobs.
1080 at_stop_file=$at_suite_dir/at-stop
1081 # The fifo used for the job dispatcher.
1082 at_job_fifo=$at_suite_dir/at-job-fifo
1083
1084 if $at_clean; then
1085 test -d "$at_suite_dir" &&
1086 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1087 rm -f -r "$at_suite_dir" "$at_suite_log"
1088 exit $?
1089 fi
1090
1091 # Don't take risks: use only absolute directories in PATH.
1092 #
1093 # For stand-alone test suites (ie. atconfig was not found),
1094 # AUTOTEST_PATH is relative to `.'.
1095 #
1096 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1097 # of the package. Then expand it into build/src parts, since users
1098 # may create executables in both places.
1099 AUTOTEST_PATH=`printf "%s\n" "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1100 at_path=
1101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1102 for as_dir in $AUTOTEST_PATH $PATH
1103 do
1104 IFS=$as_save_IFS
1105 case $as_dir in #(((
1106 '') as_dir=./ ;;
1107 */) ;;
1108 *) as_dir=$as_dir/ ;;
1109 esac
1110 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1111 case $as_dir in
1112 [\\/]* | ?:[\\/]* )
1113 as_fn_append at_path "$as_dir"
1114 ;;
1115 * )
1116 if test -z "$at_top_build_prefix"; then
1117 # Stand-alone test suite.
1118 as_fn_append at_path "$as_dir"
1119 else
1120 # Embedded test suite.
1121 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1122 as_fn_append at_path "$at_top_srcdir/$as_dir"
1123 fi
1124 ;;
1125 esac
1126 done
1127 IFS=$as_save_IFS
1128
1129
1130 # Now build and simplify PATH.
1131 #
1132 # There might be directories that don't exist, but don't redirect
1133 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1134 at_new_path=
1135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1136 for as_dir in $at_path
1137 do
1138 IFS=$as_save_IFS
1139 case $as_dir in #(((
1140 '') as_dir=./ ;;
1141 */) ;;
1142 *) as_dir=$as_dir/ ;;
1143 esac
1144 test -d "$as_dir" || continue
1145 case $as_dir in
1146 [\\/]* | ?:[\\/]* ) ;;
1147 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1148 esac
1149 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1150 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1151 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1152 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1153 esac
1154 done
1155 IFS=$as_save_IFS
1156
1157 PATH=$at_new_path
1158 export PATH
1159
1160 # Setting up the FDs.
1161
1162
1163
1164 # 5 is the log file. Not to be overwritten if `-d'.
1165 if $at_debug_p; then
1166 at_suite_log=/dev/null
1167 else
1168 : >"$at_suite_log"
1169 fi
1170 exec 5>>"$at_suite_log"
1171
1172 # Banners and logs.
1173 printf "%s\n" "## ------------------------- ##
1174 ## GNU dico 2.12 test suite. ##
1175 ## ------------------------- ##"
1176 {
1177 printf "%s\n" "## ------------------------- ##
1178 ## GNU dico 2.12 test suite. ##
1179 ## ------------------------- ##"
1180 echo
1181
1182 printf "%s\n" "$as_me: command line was:"
1183 printf "%s\n" " \$ $0 $at_cli_args"
1184 echo
1185
1186 # If ChangeLog exists, list a few lines in case it might help determining
1187 # the exact version.
1188 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1189 printf "%s\n" "## ---------- ##
1190 ## ChangeLog. ##
1191 ## ---------- ##"
1192 echo
1193 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1194 echo
1195 fi
1196
1197 {
1198 cat <<_ASUNAME
1199 ## --------- ##
1200 ## Platform. ##
1201 ## --------- ##
1202
1203 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1204 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1205 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1206 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1207 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1208
1209 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1210 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1211
1212 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1213 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1214 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1215 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1216 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1217 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1218 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1219
1220 _ASUNAME
1221
1222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1223 for as_dir in $PATH
1224 do
1225 IFS=$as_save_IFS
1226 case $as_dir in #(((
1227 '') as_dir=./ ;;
1228 */) ;;
1229 *) as_dir=$as_dir/ ;;
1230 esac
1231 printf "%s\n" "PATH: $as_dir"
1232 done
1233 IFS=$as_save_IFS
1234
1235 }
1236 echo
1237
1238 # Contents of the config files.
1239 for at_file in atconfig atlocal
1240 do
1241 test -r $at_file || continue
1242 printf "%s\n" "$as_me: $at_file:"
1243 sed 's/^/| /' $at_file
1244 echo
1245 done
1246 } >&5
1247
1248
1249 ## ------------------------- ##
1250 ## Autotest shell functions. ##
1251 ## ------------------------- ##
1252
1253 # at_fn_banner NUMBER
1254 # -------------------
1255 # Output banner NUMBER, provided the testsuite is running multiple groups and
1256 # this particular banner has not yet been printed.
1257 at_fn_banner ()
1258 {
1259 $at_print_banners || return 0
1260 eval at_banner_text=\$at_banner_text_$1
1261 test "x$at_banner_text" = "x " && return 0
1262 eval "at_banner_text_$1=\" \""
1263 if test -z "$at_banner_text"; then
1264 $at_first || echo
1265 else
1266 printf "%s\n" "$as_nl$at_banner_text$as_nl"
1267 fi
1268 } # at_fn_banner
1269
1270 # at_fn_check_prepare_notrace REASON LINE
1271 # ---------------------------------------
1272 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1273 # command; REASON is the reason for disabling tracing.
1274 at_fn_check_prepare_notrace ()
1275 {
1276 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1277 printf "%s\n" "$2" >"$at_check_line_file"
1278 at_check_trace=: at_check_filter=:
1279 : >"$at_stdout"; : >"$at_stderr"
1280 }
1281
1282 # at_fn_check_prepare_trace LINE
1283 # ------------------------------
1284 # Perform AT_CHECK preparations for the command at LINE for a traceable
1285 # command.
1286 at_fn_check_prepare_trace ()
1287 {
1288 printf "%s\n" "$1" >"$at_check_line_file"
1289 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1290 : >"$at_stdout"; : >"$at_stderr"
1291 }
1292
1293 # at_fn_check_prepare_dynamic COMMAND LINE
1294 # ----------------------------------------
1295 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1296 # preparation function.
1297 at_fn_check_prepare_dynamic ()
1298 {
1299 case $1 in
1300 *$as_nl*)
1301 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1302 *)
1303 at_fn_check_prepare_trace "$2" ;;
1304 esac
1305 }
1306
1307 # at_fn_filter_trace
1308 # ------------------
1309 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1310 # them to stderr.
1311 at_fn_filter_trace ()
1312 {
1313 mv "$at_stderr" "$at_stder1"
1314 grep '^ *+' "$at_stder1" >&2
1315 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1316 }
1317
1318 # at_fn_log_failure FILE-LIST
1319 # ---------------------------
1320 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1321 # with a failure exit code.
1322 at_fn_log_failure ()
1323 {
1324 for file
1325 do printf "%s\n" "$file:"; sed 's/^/> /' "$file"; done
1326 echo 1 > "$at_status_file"
1327 exit 1
1328 }
1329
1330 # at_fn_check_skip EXIT-CODE LINE
1331 # -------------------------------
1332 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1333 # the test group subshell with that same exit code. Use LINE in any report
1334 # about test failure.
1335 at_fn_check_skip ()
1336 {
1337 case $1 in
1338 99) echo 99 > "$at_status_file"; at_failed=:
1339 printf "%s\n" "$2: hard failure"; exit 99;;
1340 77) echo 77 > "$at_status_file"; exit 77;;
1341 esac
1342 }
1343
1344 # at_fn_check_status EXPECTED EXIT-CODE LINE
1345 # ------------------------------------------
1346 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1347 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1348 # exit code; if it is anything else print an error message referring to LINE,
1349 # and fail the test.
1350 at_fn_check_status ()
1351 {
1352 case $2 in
1353 $1 ) ;;
1354 77) echo 77 > "$at_status_file"; exit 77;;
1355 99) echo 99 > "$at_status_file"; at_failed=:
1356 printf "%s\n" "$3: hard failure"; exit 99;;
1357 *) printf "%s\n" "$3: exit code was $2, expected $1"
1358 at_failed=:;;
1359 esac
1360 }
1361
1362 # at_fn_diff_devnull FILE
1363 # -----------------------
1364 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1365 # invocations.
1366 at_fn_diff_devnull ()
1367 {
1368 test -s "$1" || return 0
1369 $at_diff "$at_devnull" "$1"
1370 }
1371
1372 # at_fn_test NUMBER
1373 # -----------------
1374 # Parse out test NUMBER from the tail of this file.
1375 at_fn_test ()
1376 {
1377 eval at_sed=\$at_sed$1
1378 sed "$at_sed" "$at_myself" > "$at_test_source"
1379 }
1380
1381 # at_fn_create_debugging_script
1382 # -----------------------------
1383 # Create the debugging script $at_group_dir/run which will reproduce the
1384 # current test group.
1385 at_fn_create_debugging_script ()
1386 {
1387 {
1388 echo "#! /bin/sh" &&
1389 echo 'test ${ZSH_VERSION+y} && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1390 printf "%s\n" "cd '$at_dir'" &&
1391 printf "%s\n" "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1392 echo 'exit 1'
1393 } >"$at_group_dir/run" &&
1394 chmod +x "$at_group_dir/run"
1395 }
1396
1397 ## -------------------------------- ##
1398 ## End of autotest shell functions. ##
1399 ## -------------------------------- ##
1400 {
1401 printf "%s\n" "## ------------------ ##
1402 ## Running the tests. ##
1403 ## ------------------ ##"
1404 } >&5
1405
1406 at_start_date=`date`
1407 at_start_time=`date +%s 2>/dev/null`
1408 printf "%s\n" "$as_me: starting at: $at_start_date" >&5
1409
1410 # Create the master directory if it doesn't already exist.
1411 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1412 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1413
1414 # Can we diff with `/dev/null'? DU 5.0 refuses.
1415 if diff /dev/null /dev/null >/dev/null 2>&1; then
1416 at_devnull=/dev/null
1417 else
1418 at_devnull=$at_suite_dir/devnull
1419 >"$at_devnull"
1420 fi
1421
1422 # Use `diff -u' when possible.
1423 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1424 then
1425 at_diff='diff -u'
1426 else
1427 at_diff=diff
1428 fi
1429
1430 # Get the last needed group.
1431 for at_group in : $at_groups; do :; done
1432
1433 # Extract the start and end lines of each test group at the tail
1434 # of this file
1435 awk '
1436 BEGIN { FS="" }
1437 /^#AT_START_/ {
1438 start = NR
1439 }
1440 /^#AT_STOP_/ {
1441 test = substr ($ 0, 10)
1442 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1443 if (test == "'"$at_group"'") exit
1444 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1445 . "$at_suite_dir/at-source-lines" ||
1446 as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1447 rm -f "$at_suite_dir/at-source-lines"
1448
1449 # Set number of jobs for `-j'; avoid more jobs than test groups.
1450 set X $at_groups; shift; at_max_jobs=$#
1451 if test $at_max_jobs -eq 0; then
1452 at_jobs=1
1453 fi
1454 if test $at_jobs -ne 1 &&
1455 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1456 at_jobs=$at_max_jobs
1457 fi
1458
1459 # If parallel mode, don't output banners, don't split summary lines.
1460 if test $at_jobs -ne 1; then
1461 at_print_banners=false
1462 at_quiet=:
1463 fi
1464
1465 # Set up helper dirs.
1466 rm -rf "$at_helper_dir" &&
1467 mkdir "$at_helper_dir" &&
1468 cd "$at_helper_dir" &&
1469 { test -z "$at_groups" || mkdir $at_groups; } ||
1470 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1471
1472 # Functions for running a test group. We leave the actual
1473 # test group execution outside of a shell function in order
1474 # to avoid hitting zsh 4.x exit status bugs.
1475
1476 # at_fn_group_prepare
1477 # -------------------
1478 # Prepare for running a test group.
1479 at_fn_group_prepare ()
1480 {
1481 # The directory for additional per-group helper files.
1482 at_job_dir=$at_helper_dir/$at_group
1483 # The file containing the location of the last AT_CHECK.
1484 at_check_line_file=$at_job_dir/check-line
1485 # The file containing the exit status of the last command.
1486 at_status_file=$at_job_dir/status
1487 # The files containing the output of the tested commands.
1488 at_stdout=$at_job_dir/stdout
1489 at_stder1=$at_job_dir/stder1
1490 at_stderr=$at_job_dir/stderr
1491 # The file containing the code for a test group.
1492 at_test_source=$at_job_dir/test-source
1493 # The file containing dates.
1494 at_times_file=$at_job_dir/times
1495
1496 # Be sure to come back to the top test directory.
1497 cd "$at_suite_dir"
1498
1499 # Clearly separate the test groups when verbose.
1500 $at_first || $at_verbose echo
1501
1502 at_group_normalized=$at_group
1503
1504 eval 'while :; do
1505 case $at_group_normalized in #(
1506 '"$at_format"'*) break;;
1507 esac
1508 at_group_normalized=0$at_group_normalized
1509 done'
1510
1511
1512 # Create a fresh directory for the next test group, and enter.
1513 # If one already exists, the user may have invoked ./run from
1514 # within that directory; we remove the contents, but not the
1515 # directory itself, so that we aren't pulling the rug out from
1516 # under the shell's notion of the current directory.
1517 at_group_dir=$at_suite_dir/$at_group_normalized
1518 at_group_log=$at_group_dir/$as_me.log
1519 if test -d "$at_group_dir"
1520 then
1521 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1522 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1523 fi ||
1524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1525 printf "%s\n" "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1526 # Be tolerant if the above `rm' was not able to remove the directory.
1527 as_dir="$at_group_dir"; as_fn_mkdir_p
1528
1529 echo 0 > "$at_status_file"
1530
1531 # In verbose mode, append to the log file *and* show on
1532 # the standard output; in quiet mode only write to the log.
1533 if test -z "$at_verbose"; then
1534 at_tee_pipe='tee -a "$at_group_log"'
1535 else
1536 at_tee_pipe='cat >> "$at_group_log"'
1537 fi
1538 }
1539
1540 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1541 # -------------------------------------------------
1542 # Declare the test group ORDINAL, located at LINE with group description DESC,
1543 # and residing under BANNER. Use PAD to align the status column.
1544 at_fn_group_banner ()
1545 {
1546 at_setup_line="$2"
1547 test -n "$5" && at_fn_banner $5
1548 at_desc="$3"
1549 case $1 in
1550 [0-9]) at_desc_line=" $1: ";;
1551 [0-9][0-9]) at_desc_line=" $1: " ;;
1552 *) at_desc_line="$1: " ;;
1553 esac
1554 as_fn_append at_desc_line "$3$4"
1555 $at_quiet printf %s "$at_desc_line"
1556 echo "# -*- compilation -*-" >> "$at_group_log"
1557 }
1558
1559 # at_fn_group_postprocess
1560 # -----------------------
1561 # Perform cleanup after running a test group.
1562 at_fn_group_postprocess ()
1563 {
1564 # Be sure to come back to the suite directory, in particular
1565 # since below we might `rm' the group directory we are in currently.
1566 cd "$at_suite_dir"
1567
1568 if test ! -f "$at_check_line_file"; then
1569 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1570 A failure happened in a test group before any test could be
1571 run. This means that test suite is improperly designed. Please
1572 report this failure to <[email protected]>.
1573 _ATEOF
1574 printf "%s\n" "$at_setup_line" >"$at_check_line_file"
1575 at_status=99
1576 fi
1577 $at_verbose printf %s "$at_group. $at_setup_line: "
1578 printf %s "$at_group. $at_setup_line: " >> "$at_group_log"
1579 case $at_xfail:$at_status in
1580 yes:0)
1581 at_msg="UNEXPECTED PASS"
1582 at_res=xpass
1583 at_errexit=$at_errexit_p
1584 at_color=$at_red
1585 ;;
1586 no:0)
1587 at_msg="ok"
1588 at_res=pass
1589 at_errexit=false
1590 at_color=$at_grn
1591 ;;
1592 *:77)
1593 at_msg='skipped ('`cat "$at_check_line_file"`')'
1594 at_res=skip
1595 at_errexit=false
1596 at_color=$at_blu
1597 ;;
1598 no:* | *:99)
1599 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1600 at_res=fail
1601 at_errexit=$at_errexit_p
1602 at_color=$at_red
1603 ;;
1604 yes:*)
1605 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1606 at_res=xfail
1607 at_errexit=false
1608 at_color=$at_lgn
1609 ;;
1610 esac
1611 echo "$at_res" > "$at_job_dir/$at_res"
1612 # In parallel mode, output the summary line only afterwards.
1613 if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1614 printf "%s\n" "$at_desc_line $at_color$at_msg$at_std"
1615 else
1616 # Make sure there is a separator even with long titles.
1617 printf "%s\n" " $at_color$at_msg$at_std"
1618 fi
1619 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1620 case $at_status in
1621 0|77)
1622 # $at_times_file is only available if the group succeeded.
1623 # We're not including the group log, so the success message
1624 # is written in the global log separately. But we also
1625 # write to the group log in case they're using -d.
1626 if test -f "$at_times_file"; then
1627 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1628 rm -f "$at_times_file"
1629 fi
1630 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1631 printf "%s\n" "$at_log_msg" >&5
1632
1633 # Cleanup the group directory, unless the user wants the files
1634 # or the success was unexpected.
1635 if $at_debug_p || test $at_res = xpass; then
1636 at_fn_create_debugging_script
1637 if test $at_res = xpass && $at_errexit; then
1638 echo stop > "$at_stop_file"
1639 fi
1640 else
1641 if test -d "$at_group_dir"; then
1642 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1643 rm -fr "$at_group_dir"
1644 fi
1645 rm -f "$at_test_source"
1646 fi
1647 ;;
1648 *)
1649 # Upon failure, include the log into the testsuite's global
1650 # log. The failure message is written in the group log. It
1651 # is later included in the global log.
1652 printf "%s\n" "$at_log_msg" >> "$at_group_log"
1653
1654 # Upon failure, keep the group directory for autopsy, and create
1655 # the debugging script. With -e, do not start any further tests.
1656 at_fn_create_debugging_script
1657 if $at_errexit; then
1658 echo stop > "$at_stop_file"
1659 fi
1660 ;;
1661 esac
1662 }
1663
1664
1665 ## ------------ ##
1666 ## Driver loop. ##
1667 ## ------------ ##
1668
1669
1670 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1671 set +b
1672 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1673 else
1674 at_job_control_on=: at_job_control_off=: at_job_group=
1675 fi
1676
1677 for at_signal in 1 2 15; do
1678 trap 'set +x; set +e
1679 $at_job_control_off
1680 at_signal='"$at_signal"'
1681 echo stop > "$at_stop_file"
1682 trap "" $at_signal
1683 at_pgids=
1684 for at_pgid in `jobs -p 2>/dev/null`; do
1685 at_pgids="$at_pgids $at_job_group$at_pgid"
1686 done
1687 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1688 wait
1689 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1690 echo >&2
1691 fi
1692 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1693 set x $at_signame
1694 test 0 -gt 2 && at_signame=$at_signal
1695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1696 printf "%s\n" "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1697 as_fn_arith 128 + $at_signal && exit_status=$as_val
1698 as_fn_exit $exit_status' $at_signal
1699 done
1700
1701 rm -f "$at_stop_file"
1702 at_first=:
1703
1704 if test $at_jobs -ne 1 &&
1705 rm -f "$at_job_fifo" &&
1706 test -n "$at_job_group" &&
1707 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1708 then
1709 # FIFO job dispatcher.
1710
1711 trap 'at_pids=
1712 for at_pid in `jobs -p`; do
1713 at_pids="$at_pids $at_job_group$at_pid"
1714 done
1715 if test -n "$at_pids"; then
1716 at_sig=TSTP
1717 test ${TMOUT+y} && at_sig=STOP
1718 kill -$at_sig $at_pids 2>/dev/null
1719 fi
1720 kill -STOP $$
1721 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1722
1723 echo
1724 # Turn jobs into a list of numbers, starting from 1.
1725 at_joblist=`printf "%s\n" "$at_groups" | sed -n 1,${at_jobs}p`
1726
1727 set X $at_joblist
1728 shift
1729 for at_group in $at_groups; do
1730 $at_job_control_on 2>/dev/null
1731 (
1732 # Start one test group.
1733 $at_job_control_off
1734 if $at_first; then
1735 exec 7>"$at_job_fifo"
1736 else
1737 exec 6<&-
1738 fi
1739 trap 'set +x; set +e
1740 trap "" PIPE
1741 echo stop > "$at_stop_file"
1742 echo >&7
1743 as_fn_exit 141' PIPE
1744 at_fn_group_prepare
1745 if cd "$at_group_dir" &&
1746 at_fn_test $at_group &&
1747 . "$at_test_source"
1748 then :; else
1749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1750 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1751 at_failed=:
1752 fi
1753 at_fn_group_postprocess
1754 echo >&7
1755 ) &
1756 $at_job_control_off
1757 if $at_first; then
1758 at_first=false
1759 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1760 fi
1761 shift # Consume one token.
1762 if test $# -gt 0; then :; else
1763 read at_token <&6 || break
1764 set x $*
1765 fi
1766 test -f "$at_stop_file" && break
1767 done
1768 exec 7>&-
1769 # Read back the remaining ($at_jobs - 1) tokens.
1770 set X $at_joblist
1771 shift
1772 if test $# -gt 0; then
1773 shift
1774 for at_job
1775 do
1776 read at_token
1777 done <&6
1778 fi
1779 exec 6<&-
1780 wait
1781 else
1782 # Run serially, avoid forks and other potential surprises.
1783 for at_group in $at_groups; do
1784 at_fn_group_prepare
1785 if cd "$at_group_dir" &&
1786 at_fn_test $at_group &&
1787 . "$at_test_source"; then :; else
1788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1789 printf "%s\n" "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1790 at_failed=:
1791 fi
1792 at_fn_group_postprocess
1793 test -f "$at_stop_file" && break
1794 at_first=false
1795 done
1796 fi
1797
1798 # Wrap up the test suite with summary statistics.
1799 cd "$at_helper_dir"
1800
1801 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1802 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1803 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1804 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1805 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1806 echo $f; done | sed '/?/d; s,/xpass,,'`
1807 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1808 echo $f; done | sed '/?/d; s,/fail,,'`
1809
1810 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1811 shift; at_group_count=$#
1812 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1813 set X $at_xfail_list; shift; at_xfail_count=$#
1814 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1815 set X $at_skip_list; shift; at_skip_count=$#
1816
1817 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1818 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1819 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1820
1821 # Back to the top directory.
1822 cd "$at_dir"
1823 rm -rf "$at_helper_dir"
1824
1825 # Compute the duration of the suite.
1826 at_stop_date=`date`
1827 at_stop_time=`date +%s 2>/dev/null`
1828 printf "%s\n" "$as_me: ending at: $at_stop_date" >&5
1829 case $at_start_time,$at_stop_time in
1830 [0-9]*,[0-9]*)
1831 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1832 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1833 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1834 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1835 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1836 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1837 printf "%s\n" "$as_me: test suite duration: $at_duration" >&5
1838 ;;
1839 esac
1840
1841 echo
1842 printf "%s\n" "## ------------- ##
1843 ## Test results. ##
1844 ## ------------- ##"
1845 echo
1846 {
1847 echo
1848 printf "%s\n" "## ------------- ##
1849 ## Test results. ##
1850 ## ------------- ##"
1851 echo
1852 } >&5
1853
1854 if test $at_run_count = 1; then
1855 at_result="1 test"
1856 at_were=was
1857 else
1858 at_result="$at_run_count tests"
1859 at_were=were
1860 fi
1861 if $at_errexit_p && test $at_unexpected_count != 0; then
1862 if test $at_xpass_count = 1; then
1863 at_result="$at_result $at_were run, one passed"
1864 else
1865 at_result="$at_result $at_were run, one failed"
1866 fi
1867 at_result="$at_result unexpectedly and inhibited subsequent tests."
1868 at_color=$at_red
1869 else
1870 # Don't you just love exponential explosion of the number of cases?
1871 at_color=$at_red
1872 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1873 # So far, so good.
1874 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1875 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1876
1877 # Some unexpected failures
1878 0:*:0) at_result="$at_result $at_were run,
1879 $at_fail_count failed unexpectedly." ;;
1880
1881 # Some failures, both expected and unexpected
1882 0:*:1) at_result="$at_result $at_were run,
1883 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1884 0:*:*) at_result="$at_result $at_were run,
1885 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1886
1887 # No unexpected failures, but some xpasses
1888 *:0:*) at_result="$at_result $at_were run,
1889 $at_xpass_count passed unexpectedly." ;;
1890
1891 # No expected failures, but failures and xpasses
1892 *:1:0) at_result="$at_result $at_were run,
1893 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1894 *:*:0) at_result="$at_result $at_were run,
1895 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1896
1897 # All of them.
1898 *:*:1) at_result="$at_result $at_were run,
1899 $at_xpass_count passed unexpectedly,
1900 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1901 *:*:*) at_result="$at_result $at_were run,
1902 $at_xpass_count passed unexpectedly,
1903 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1904 esac
1905
1906 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1907 at_result="All $at_result"
1908 fi
1909 fi
1910
1911 # Now put skips in the mix.
1912 case $at_skip_count in
1913 0) ;;
1914 1) at_result="$at_result
1915 1 test was skipped." ;;
1916 *) at_result="$at_result
1917 $at_skip_count tests were skipped." ;;
1918 esac
1919
1920 if test $at_unexpected_count = 0; then
1921 echo "$at_color$at_result$at_std"
1922 echo "$at_result" >&5
1923 else
1924 echo "${at_color}ERROR: $at_result$at_std" >&2
1925 echo "ERROR: $at_result" >&5
1926 {
1927 echo
1928 printf "%s\n" "## ------------------------ ##
1929 ## Summary of the failures. ##
1930 ## ------------------------ ##"
1931
1932 # Summary of failed and skipped tests.
1933 if test $at_fail_count != 0; then
1934 echo "Failed tests:"
1935 $SHELL "$at_myself" $at_fail_list --list
1936 echo
1937 fi
1938 if test $at_skip_count != 0; then
1939 echo "Skipped tests:"
1940 $SHELL "$at_myself" $at_skip_list --list
1941 echo
1942 fi
1943 if test $at_xpass_count != 0; then
1944 echo "Unexpected passes:"
1945 $SHELL "$at_myself" $at_xpass_list --list
1946 echo
1947 fi
1948 if test $at_fail_count != 0; then
1949 printf "%s\n" "## ---------------------- ##
1950 ## Detailed failed tests. ##
1951 ## ---------------------- ##"
1952 echo
1953 for at_group in $at_fail_list
1954 do
1955 at_group_normalized=$at_group
1956
1957 eval 'while :; do
1958 case $at_group_normalized in #(
1959 '"$at_format"'*) break;;
1960 esac
1961 at_group_normalized=0$at_group_normalized
1962 done'
1963
1964 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1965 echo
1966 done
1967 echo
1968 fi
1969 if test -n "$at_top_srcdir"; then
1970 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1971 ## ${at_top_build_prefix}config.log ##
1972 _ASBOX
1973 sed 's/^/| /' ${at_top_build_prefix}config.log
1974 echo
1975 fi
1976 } >&5
1977
1978 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1979 ## $as_me.log was created. ##
1980 _ASBOX
1981
1982 echo
1983 if $at_debug_p; then
1984 at_msg='per-test log files'
1985 else
1986 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
1987 fi
1988 at_msg1a=${at_xpass_list:+', '}
1989 at_msg1=$at_fail_list${at_fail_list:+" failed$at_msg1a"}
1990 at_msg2=$at_xpass_list${at_xpass_list:+" passed unexpectedly"}
1991
1992 printf "%s\n" "Please send $at_msg and all information you think might help:
1993
1994 To: <[email protected]>
1995 Subject: [GNU dico 2.12] $as_me: $at_msg1$at_msg2
1996
1997 You may investigate any problem if you feel able to do so, in which
1998 case the test suite provides a good starting point. Its output may
1999 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2000 "
2001 exit 1
2002 fi
2003
2004 exit 0
2005
2006 ## ------------- ##
2007 ## Actual tests. ##
2008 ## ------------- ##
2009 #AT_START_1
2010 at_fn_group_banner 1 'exact.at:17' \
2011 "exact" " " 1
2012 at_xfail=no
2013 (
2014 printf "%s\n" "1. $at_setup_line: testing $at_desc ..."
2015 $at_traceon
2016
2017
2018
2019 cat >input <<'_ATEOF'
2020 match dev exact bore
2021 quit
2022 _ATEOF
2023
2024 { set +x
2025 printf "%s\n" "$at_srcdir/exact.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2026 at_fn_check_prepare_notrace 'a shell pipeline' "exact.at:19"
2027 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2029 at_status=$? at_failed=false
2030 $at_check_filter
2031 at_fn_diff_devnull "$at_stderr" || at_failed=:
2032 echo >>"$at_stdout"; printf "%s\n" "220
2033 152 1 matches found: list follows
2034 dev \"BORE\"
2035 .
2036 250
2037 221
2038 " | \
2039 $at_diff - "$at_stdout" || at_failed=:
2040 at_fn_check_status 0 $at_status "$at_srcdir/exact.at:19"
2041 $at_failed && at_fn_log_failure
2042 $at_traceon; }
2043
2044 set +x
2045 $at_times_p && times >"$at_times_file"
2046 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2047 read at_status <"$at_status_file"
2048 #AT_STOP_1
2049 #AT_START_2
2050 at_fn_group_banner 2 'prefix.at:17' \
2051 "prefix" " " 1
2052 at_xfail=no
2053 (
2054 printf "%s\n" "2. $at_setup_line: testing $at_desc ..."
2055 $at_traceon
2056
2057
2058
2059 cat >input <<'_ATEOF'
2060 match dev prefix re
2061 quit
2062 _ATEOF
2063
2064 { set +x
2065 printf "%s\n" "$at_srcdir/prefix.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2066 at_fn_check_prepare_notrace 'a shell pipeline' "prefix.at:19"
2067 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2068 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2069 at_status=$? at_failed=false
2070 $at_check_filter
2071 at_fn_diff_devnull "$at_stderr" || at_failed=:
2072 echo >>"$at_stdout"; printf "%s\n" "220
2073 152 58 matches found: list follows
2074 dev \"REACH\"
2075 dev \"READING\"
2076 dev \"REALISM\"
2077 dev \"REALITY\"
2078 dev \"REALLY\"
2079 dev \"REAR\"
2080 dev \"REASON\"
2081 dev \"REASON\"
2082 dev \"REASONABLE\"
2083 dev \"REBEL\"
2084 dev \"RECOLLECT\"
2085 dev \"RECONCILIATION\"
2086 dev \"RECONSIDER\"
2087 dev \"RECOUNT\"
2088 dev \"RECREATION\"
2089 dev \"RECRUIT\"
2090 dev \"RECTOR\"
2091 dev \"RED-SKIN\"
2092 dev \"REDEMPTION\"
2093 dev \"REDRESS\"
2094 dev \"REDUNDANT\"
2095 dev \"REFERENDUM\"
2096 dev \"REFLECTION\"
2097 dev \"REFORM\"
2098 dev \"REFUGE\"
2099 dev \"REFUSAL\"
2100 dev \"REGALIA\"
2101 dev \"RELIGION\"
2102 dev \"RELIQUARY\"
2103 dev \"RENOWN\"
2104 dev \"REPARATION\"
2105 dev \"REPARTEE\"
2106 dev \"REPENTANCE\"
2107 dev \"REPLICA\"
2108 dev \"REPORTER\"
2109 dev \"REPOSE\"
2110 dev \"REPRESENTATIVE\"
2111 dev \"REPROBATION\"
2112 dev \"REPUBLIC\"
2113 dev \"REQUIEM\"
2114 dev \"RESIDENT\"
2115 dev \"RESIGN\"
2116 dev \"RESOLUTE\"
2117 dev \"RESPECTABILITY\"
2118 dev \"RESPIRATOR\"
2119 dev \"RESPITE\"
2120 dev \"RESPLENDENT\"
2121 dev \"RESPOND\"
2122 dev \"RESPONSIBILITY\"
2123 dev \"RESTITUTIONS\"
2124 dev \"RESTITUTOR\"
2125 dev \"RETALIATION\"
2126 dev \"RETRIBUTION\"
2127 dev \"REVEILLE\"
2128 dev \"REVELATION\"
2129 dev \"REVERENCE\"
2130 dev \"REVIEW\"
2131 dev \"REVOLUTION\"
2132 .
2133 250
2134 221
2135 " | \
2136 $at_diff - "$at_stdout" || at_failed=:
2137 at_fn_check_status 0 $at_status "$at_srcdir/prefix.at:19"
2138 $at_failed && at_fn_log_failure
2139 $at_traceon; }
2140
2141 set +x
2142 $at_times_p && times >"$at_times_file"
2143 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2144 read at_status <"$at_status_file"
2145 #AT_STOP_2
2146 #AT_START_3
2147 at_fn_group_banner 3 'suffix.at:17' \
2148 "suffix" " " 1
2149 at_xfail=no
2150 (
2151 printf "%s\n" "3. $at_setup_line: testing $at_desc ..."
2152 $at_traceon
2153
2154
2155
2156 cat >input <<'_ATEOF'
2157 match dev suffix tion
2158 quit
2159 _ATEOF
2160
2161 { set +x
2162 printf "%s\n" "$at_srcdir/suffix.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2163 at_fn_check_prepare_notrace 'a shell pipeline' "suffix.at:19"
2164 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2165 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2166 at_status=$? at_failed=false
2167 $at_check_filter
2168 at_fn_diff_devnull "$at_stderr" || at_failed=:
2169 echo >>"$at_stdout"; printf "%s\n" "220
2170 152 59 matches found: list follows
2171 dev \"ABDICATION\"
2172 dev \"ADMINISTRATION\"
2173 dev \"ADMIRATION\"
2174 dev \"ADMONITION\"
2175 dev \"AFFLICTION\"
2176 dev \"AMBITION\"
2177 dev \"COMMENDATION\"
2178 dev \"CONGRATULATION\"
2179 dev \"CONSOLATION\"
2180 dev \"CONVERSATION\"
2181 dev \"CORONATION\"
2182 dev \"CORPORATION\"
2183 dev \"DEGRADATION\"
2184 dev \"DELEGATION\"
2185 dev \"DELIBERATION\"
2186 dev \"DIGESTION\"
2187 dev \"DIVINATION\"
2188 dev \"EDUCATION\"
2189 dev \"EJECTION\"
2190 dev \"EMANCIPATION\"
2191 dev \"EMOTION\"
2192 dev \"ERUDITION\"
2193 dev \"EXCEPTION\"
2194 dev \"EXCOMMUNICATION\"
2195 dev \"EXPOSTULATION\"
2196 dev \"EXTINCTION\"
2197 dev \"FOREORDINATION\"
2198 dev \"GRAVITATION\"
2199 dev \"IMAGINATION\"
2200 dev \"IMPOSITION\"
2201 dev \"INDIGESTION\"
2202 dev \"INDISCRETION\"
2203 dev \"INSCRIPTION\"
2204 dev \"INSURRECTION\"
2205 dev \"INTENTION\"
2206 dev \"INTRODUCTION\"
2207 dev \"LITIGATION\"
2208 dev \"MACHINATION\"
2209 dev \"OPPOSITION\"
2210 dev \"OVATION\"
2211 dev \"PERFECTION\"
2212 dev \"PERORATION\"
2213 dev \"PREDESTINATION\"
2214 dev \"PREDILECTION\"
2215 dev \"PRESCRIPTION\"
2216 dev \"QUOTATION\"
2217 dev \"RECONCILIATION\"
2218 dev \"RECREATION\"
2219 dev \"REDEMPTION\"
2220 dev \"REFLECTION\"
2221 dev \"REPARATION\"
2222 dev \"REPROBATION\"
2223 dev \"RETALIATION\"
2224 dev \"RETRIBUTION\"
2225 dev \"REVELATION\"
2226 dev \"REVOLUTION\"
2227 dev \"SCARIFICATION\"
2228 dev \"UNCTION\"
2229 dev \"VITUPERATION\"
2230 .
2231 250
2232 221
2233 " | \
2234 $at_diff - "$at_stdout" || at_failed=:
2235 at_fn_check_status 0 $at_status "$at_srcdir/suffix.at:19"
2236 $at_failed && at_fn_log_failure
2237 $at_traceon; }
2238
2239 set +x
2240 $at_times_p && times >"$at_times_file"
2241 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2242 read at_status <"$at_status_file"
2243 #AT_STOP_3
2244 #AT_START_4
2245 at_fn_group_banner 4 'lev.at:17' \
2246 "Levenshtein" " " 1
2247 at_xfail=no
2248 (
2249 printf "%s\n" "4. $at_setup_line: testing $at_desc ..."
2250 $at_traceon
2251
2252
2253
2254 cat >input <<'_ATEOF'
2255 match dev lev til
2256 quit
2257 _ATEOF
2258
2259 { set +x
2260 printf "%s\n" "$at_srcdir/lev.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2261 at_fn_check_prepare_notrace 'a shell pipeline' "lev.at:19"
2262 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2264 at_status=$? at_failed=false
2265 $at_check_filter
2266 at_fn_diff_devnull "$at_stderr" || at_failed=:
2267 echo >>"$at_stdout"; printf "%s\n" "220
2268 152 1 matches found: list follows
2269 dev \"TAIL\"
2270 .
2271 250
2272 221
2273 " | \
2274 $at_diff - "$at_stdout" || at_failed=:
2275 at_fn_check_status 0 $at_status "$at_srcdir/lev.at:19"
2276 $at_failed && at_fn_log_failure
2277 $at_traceon; }
2278
2279 set +x
2280 $at_times_p && times >"$at_times_file"
2281 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2282 read at_status <"$at_status_file"
2283 #AT_STOP_4
2284 #AT_START_5
2285 at_fn_group_banner 5 'nlev.at:17' \
2286 "Levenshtein normalized" " " 1
2287 at_xfail=no
2288 (
2289 printf "%s\n" "5. $at_setup_line: testing $at_desc ..."
2290 $at_traceon
2291
2292
2293
2294 cat >input <<'_ATEOF'
2295 match dev nlev "aprl fool"
2296 quit
2297 _ATEOF
2298
2299 { set +x
2300 printf "%s\n" "$at_srcdir/nlev.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2301 at_fn_check_prepare_notrace 'a shell pipeline' "nlev.at:19"
2302 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2304 at_status=$? at_failed=false
2305 $at_check_filter
2306 at_fn_diff_devnull "$at_stderr" || at_failed=:
2307 echo >>"$at_stdout"; printf "%s\n" "220
2308 152 1 matches found: list follows
2309 dev \"APRIL FOOL\"
2310 .
2311 250
2312 221
2313 " | \
2314 $at_diff - "$at_stdout" || at_failed=:
2315 at_fn_check_status 0 $at_status "$at_srcdir/nlev.at:19"
2316 $at_failed && at_fn_log_failure
2317 $at_traceon; }
2318
2319 set +x
2320 $at_times_p && times >"$at_times_file"
2321 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2322 read at_status <"$at_status_file"
2323 #AT_STOP_5
2324 #AT_START_6
2325 at_fn_group_banner 6 'dlev.at:17' \
2326 "Damerau-Levenshtein" " " 1
2327 at_xfail=no
2328 (
2329 printf "%s\n" "6. $at_setup_line: testing $at_desc ..."
2330 $at_traceon
2331
2332
2333
2334 cat >input <<'_ATEOF'
2335 match dev dlev cpaital
2336 quit
2337 _ATEOF
2338
2339 { set +x
2340 printf "%s\n" "$at_srcdir/dlev.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2341 at_fn_check_prepare_notrace 'a shell pipeline' "dlev.at:19"
2342 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2344 at_status=$? at_failed=false
2345 $at_check_filter
2346 at_fn_diff_devnull "$at_stderr" || at_failed=:
2347 echo >>"$at_stdout"; printf "%s\n" "220
2348 152 1 matches found: list follows
2349 dev \"CAPITAL\"
2350 .
2351 250
2352 221
2353 " | \
2354 $at_diff - "$at_stdout" || at_failed=:
2355 at_fn_check_status 0 $at_status "$at_srcdir/dlev.at:19"
2356 $at_failed && at_fn_log_failure
2357 $at_traceon; }
2358
2359 set +x
2360 $at_times_p && times >"$at_times_file"
2361 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2362 read at_status <"$at_status_file"
2363 #AT_STOP_6
2364 #AT_START_7
2365 at_fn_group_banner 7 'dnlev.at:17' \
2366 "Damerau-Levenshtein normalized" " " 1
2367 at_xfail=no
2368 (
2369 printf "%s\n" "7. $at_setup_line: testing $at_desc ..."
2370 $at_traceon
2371
2372
2373
2374 cat >input <<'_ATEOF'
2375 match dev ndlev "arpil fool"
2376 quit
2377 _ATEOF
2378
2379 { set +x
2380 printf "%s\n" "$at_srcdir/dnlev.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2381 at_fn_check_prepare_notrace 'a shell pipeline' "dnlev.at:19"
2382 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2383 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2384 at_status=$? at_failed=false
2385 $at_check_filter
2386 at_fn_diff_devnull "$at_stderr" || at_failed=:
2387 echo >>"$at_stdout"; printf "%s\n" "220
2388 152 1 matches found: list follows
2389 dev \"APRIL FOOL\"
2390 .
2391 250
2392 221
2393 " | \
2394 $at_diff - "$at_stdout" || at_failed=:
2395 at_fn_check_status 0 $at_status "$at_srcdir/dnlev.at:19"
2396 $at_failed && at_fn_log_failure
2397 $at_traceon; }
2398
2399 set +x
2400 $at_times_p && times >"$at_times_file"
2401 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2402 read at_status <"$at_status_file"
2403 #AT_STOP_7
2404 #AT_START_8
2405 at_fn_group_banner 8 'soundex.at:17' \
2406 "SOUNDEX" " " 1
2407 at_xfail=no
2408 (
2409 printf "%s\n" "8. $at_setup_line: testing $at_desc ..."
2410 $at_traceon
2411
2412
2413
2414 cat >input <<'_ATEOF'
2415 match dev soundex prejudge
2416 quit
2417 _ATEOF
2418
2419 { set +x
2420 printf "%s\n" "$at_srcdir/soundex.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2421 at_fn_check_prepare_notrace 'a shell pipeline' "soundex.at:19"
2422 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2424 at_status=$? at_failed=false
2425 $at_check_filter
2426 at_fn_diff_devnull "$at_stderr" || at_failed=:
2427 echo >>"$at_stdout"; printf "%s\n" "220
2428 152 7 matches found: list follows
2429 dev \"PRECEDENT\"
2430 dev \"PRECEDENT\"
2431 dev \"PREHISTORIC\"
2432 dev \"PREJUDICE\"
2433 dev \"PRESIDE\"
2434 dev \"PRESIDENCY\"
2435 dev \"PRESIDENT\"
2436 .
2437 250
2438 221
2439 " | \
2440 $at_diff - "$at_stdout" || at_failed=:
2441 at_fn_check_status 0 $at_status "$at_srcdir/soundex.at:19"
2442 $at_failed && at_fn_log_failure
2443 $at_traceon; }
2444
2445 set +x
2446 $at_times_p && times >"$at_times_file"
2447 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2448 read at_status <"$at_status_file"
2449 #AT_STOP_8
2450 #AT_START_9
2451 at_fn_group_banner 9 'regexp.at:17' \
2452 "Basic regular expressions" " " 1
2453 at_xfail=no
2454 (
2455 printf "%s\n" "9. $at_setup_line: testing $at_desc ..."
2456 $at_traceon
2457
2458
2459
2460 cat >input <<'_ATEOF'
2461 match dev regexp "ab.*on"
2462 quit
2463 _ATEOF
2464
2465 { set +x
2466 printf "%s\n" "$at_srcdir/regexp.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2467 at_fn_check_prepare_notrace 'a shell pipeline' "regexp.at:19"
2468 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2469 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2470 at_status=$? at_failed=false
2471 $at_check_filter
2472 at_fn_diff_devnull "$at_stderr" || at_failed=:
2473 echo >>"$at_stdout"; printf "%s\n" "220
2474 152 2 matches found: list follows
2475 dev \"ABDICATION\"
2476 dev \"ABSCOND\"
2477 .
2478 250
2479 221
2480 " | \
2481 $at_diff - "$at_stdout" || at_failed=:
2482 at_fn_check_status 0 $at_status "$at_srcdir/regexp.at:19"
2483 $at_failed && at_fn_log_failure
2484 $at_traceon; }
2485
2486 set +x
2487 $at_times_p && times >"$at_times_file"
2488 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2489 read at_status <"$at_status_file"
2490 #AT_STOP_9
2491 #AT_START_10
2492 at_fn_group_banner 10 're.at:17' \
2493 "Extended regular expressions" " " 1
2494 at_xfail=no
2495 (
2496 printf "%s\n" "10. $at_setup_line: testing $at_desc ..."
2497 $at_traceon
2498
2499
2500
2501 cat >input <<'_ATEOF'
2502 match dev re "^a.{4,6}n$"
2503 quit
2504 _ATEOF
2505
2506 { set +x
2507 printf "%s\n" "$at_srcdir/re.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2508 at_fn_check_prepare_notrace 'a shell pipeline' "re.at:19"
2509 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2510 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2511 at_status=$? at_failed=false
2512 $at_check_filter
2513 at_fn_diff_devnull "$at_stderr" || at_failed=:
2514 echo >>"$at_stdout"; printf "%s\n" "220
2515 152 4 matches found: list follows
2516 dev \"ABDOMEN\"
2517 dev \"AFRICAN\"
2518 dev \"ALDERMAN\"
2519 dev \"AMBITION\"
2520 .
2521 250
2522 221
2523 " | \
2524 $at_diff - "$at_stdout" || at_failed=:
2525 at_fn_check_status 0 $at_status "$at_srcdir/re.at:19"
2526 $at_failed && at_fn_log_failure
2527 $at_traceon; }
2528
2529 set +x
2530 $at_times_p && times >"$at_times_file"
2531 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2532 read at_status <"$at_status_file"
2533 #AT_STOP_10
2534 #AT_START_11
2535 at_fn_group_banner 11 'define.at:17' \
2536 "define" " " 2
2537 at_xfail=no
2538 (
2539 printf "%s\n" "11. $at_setup_line: testing $at_desc ..."
2540 $at_traceon
2541
2542
2543
2544 cat >input <<'_ATEOF'
2545 define dev bore
2546 quit
2547 _ATEOF
2548
2549 { set +x
2550 printf "%s\n" "$at_srcdir/define.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2551 at_fn_check_prepare_notrace 'a shell pipeline' "define.at:19"
2552 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2553 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2554 at_status=$? at_failed=false
2555 $at_check_filter
2556 at_fn_diff_devnull "$at_stderr" || at_failed=:
2557 echo >>"$at_stdout"; printf "%s\n" "220
2558 150 1 definitions found: list follows
2559 151 \"bore\" dev \"THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)\"
2560 BORE, n. A person who talks when you wish him to listen.
2561
2562
2563
2564 .
2565 250
2566 221
2567 " | \
2568 $at_diff - "$at_stdout" || at_failed=:
2569 at_fn_check_status 0 $at_status "$at_srcdir/define.at:19"
2570 $at_failed && at_fn_log_failure
2571 $at_traceon; }
2572
2573 set +x
2574 $at_times_p && times >"$at_times_file"
2575 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2576 read at_status <"$at_status_file"
2577 #AT_STOP_11
2578 #AT_START_12
2579 at_fn_group_banner 12 'mime.at:17' \
2580 "option mime" " " 2
2581 at_xfail=no
2582 (
2583 printf "%s\n" "12. $at_setup_line: testing $at_desc ..."
2584 $at_traceon
2585
2586
2587
2588 cat >input <<'_ATEOF'
2589 option mime
2590 define dev bore
2591 quit
2592 _ATEOF
2593
2594 { set +x
2595 printf "%s\n" "$at_srcdir/mime.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2596 at_fn_check_prepare_notrace 'a shell pipeline' "mime.at:19"
2597 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2599 at_status=$? at_failed=false
2600 $at_check_filter
2601 at_fn_diff_devnull "$at_stderr" || at_failed=:
2602 echo >>"$at_stdout"; printf "%s\n" "220
2603 250
2604 150 1 definitions found: list follows
2605 151 \"bore\" dev \"THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)\"
2606 Content-Type: text/plain; charset=US-ASCII
2607 Content-Transfer-Encoding: 8bit
2608
2609 BORE, n. A person who talks when you wish him to listen.
2610
2611
2612
2613 .
2614 250
2615 221
2616 " | \
2617 $at_diff - "$at_stdout" || at_failed=:
2618 at_fn_check_status 0 $at_status "$at_srcdir/mime.at:19"
2619 $at_failed && at_fn_log_failure
2620 $at_traceon; }
2621
2622 set +x
2623 $at_times_p && times >"$at_times_file"
2624 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2625 read at_status <"$at_status_file"
2626 #AT_STOP_12
2627 #AT_START_13
2628 at_fn_group_banner 13 'showdb.at:17' \
2629 "show db" " " 3
2630 at_xfail=no
2631 (
2632 printf "%s\n" "13. $at_setup_line: testing $at_desc ..."
2633 $at_traceon
2634
2635
2636
2637 cat >input <<'_ATEOF'
2638 show db
2639 quit
2640 _ATEOF
2641
2642 { set +x
2643 printf "%s\n" "$at_srcdir/showdb.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2644 at_fn_check_prepare_notrace 'a shell pipeline' "showdb.at:19"
2645 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
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" "220
2651 110 1 databases present
2652 dev \"THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)\"
2653 .
2654 250
2655 221
2656 " | \
2657 $at_diff - "$at_stdout" || at_failed=:
2658 at_fn_check_status 0 $at_status "$at_srcdir/showdb.at:19"
2659 $at_failed && at_fn_log_failure
2660 $at_traceon; }
2661
2662 set +x
2663 $at_times_p && times >"$at_times_file"
2664 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2665 read at_status <"$at_status_file"
2666 #AT_STOP_13
2667 #AT_START_14
2668 at_fn_group_banner 14 'showinfo.at:17' \
2669 "show info" " " 3
2670 at_xfail=no
2671 (
2672 printf "%s\n" "14. $at_setup_line: testing $at_desc ..."
2673 $at_traceon
2674
2675
2676
2677 cat >input <<'_ATEOF'
2678 show info dev
2679 quit
2680 _ATEOF
2681
2682 { set +x
2683 printf "%s\n" "$at_srcdir/showinfo.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2684 at_fn_check_prepare_notrace 'a shell pipeline' "showinfo.at:19"
2685 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2686 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2687 at_status=$? at_failed=false
2688 $at_check_filter
2689 at_fn_diff_devnull "$at_stderr" || at_failed=:
2690 echo >>"$at_stdout"; printf "%s\n" "220
2691 112 information for dev
2692 This file was converted from the original database on:
2693 Sun May 18 12:45:30 EEST 2008
2694
2695 The original data is available from:
2696 http://wiretap.area.com/Gopher/Library/Classic/devils.txt
2697
2698 The original data was distributed with the notice shown below. No
2699 additional restrictions are claimed. Please redistribute this
2700 changed version under the same conditions and restriction that
2701 apply to the original version.
2702
2703
2704
2705 The Internet Wiretap 1st Online Edition of
2706
2707
2708 THE DEVIL'S DICTIONARY
2709
2710 by
2711
2712 AMBROSE BIERCE
2713
2714
2715 Copyright 1911 by Albert and Charles Boni, Inc.
2716 A Public Domain Text, Copyright Expired
2717
2718 Released April 15 1993
2719
2720 Entered by Aloysius of &tSftDotIotE
2721 [email protected]
2722
2723
2724
2725 PREFACE
2726
2727 _The Devil's Dictionary_ was begun in a weekly paper in 1881, and was
2728 continued in a desultory way at long intervals until 1906. In that
2729 year a large part of it was published in covers with the title _The
2730 Cynic's Word Book_, a name which the author had not the power to
2731 reject or happiness to approve. To quote the publishers of the
2732 present work:
2733 \"This more reverent title had previously been forced upon him by
2734 the religious scruples of the last newspaper in which a part of the
2735 work had appeared, with the natural consequence that when it came out
2736 in covers the country already had been flooded by its imitators with a
2737 score of 'cynic' books -- _The Cynic's This_, _The Cynic's That_, and
2738 _The Cynic's t'Other_. Most of these books were merely stupid, though
2739 some of them added the distinction of silliness. Among them, they
2740 brought the word 'cynic' into disfavor so deep that any book bearing
2741 it was discredited in advance of publication.\"
2742 Meantime, too, some of the enterprising humorists of the country
2743 had helped themselves to such parts of the work as served their needs,
2744 and many of its definitions, anecdotes, phrases and so forth, had
2745 become more or less current in popular speech. This explanation is
2746 made, not with any pride of priority in trifles, but in simple denial
2747 of possible charges of plagiarism, which is no trifle. In merely
2748 resuming his own the author hopes to be held guiltless by those to
2749 whom the work is addressed -- enlightened souls who prefer dry wines
2750 to sweet, sense to sentiment, wit to humor and clean English to slang.
2751 A conspicuous, and it is hope not unpleasant, feature of the book
2752 is its abundant illustrative quotations from eminent poets, chief of
2753 whom is that learned and ingenius cleric, Father Gassalasca Jape,
2754 S.J., whose lines bear his initials. To Father Jape's kindly
2755 encouragement and assistance the author of the prose text is greatly
2756 indebted.
2757 A.B.
2758
2759
2760
2761 .
2762 250
2763 221
2764 " | \
2765 $at_diff - "$at_stdout" || at_failed=:
2766 at_fn_check_status 0 $at_status "$at_srcdir/showinfo.at:19"
2767 $at_failed && at_fn_log_failure
2768 $at_traceon; }
2769
2770 set +x
2771 $at_times_p && times >"$at_times_file"
2772 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2773 read at_status <"$at_status_file"
2774 #AT_STOP_14
2775 #AT_START_15
2776 at_fn_group_banner 15 'showlang.at:17' \
2777 "show lang info" " " 3
2778 at_xfail=no
2779 (
2780 printf "%s\n" "15. $at_setup_line: testing $at_desc ..."
2781 $at_traceon
2782
2783
2784
2785 cat >input <<'_ATEOF'
2786 show lang info dev
2787 quit
2788 _ATEOF
2789
2790 { set +x
2791 printf "%s\n" "$at_srcdir/showlang.at:19: dicod --no-preprocessor --config \$abs_builddir/dicod.conf --stderr -i < input | tr -d '\\r' | sed 's/^\\(2[25][0-9]\\) .*/\\1/;s/ *\$//' "
2792 at_fn_check_prepare_notrace 'a shell pipeline' "showlang.at:19"
2793 ( $at_check_trace; dicod --no-preprocessor --config $abs_builddir/dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'
2794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2795 at_status=$? at_failed=false
2796 $at_check_filter
2797 at_fn_diff_devnull "$at_stderr" || at_failed=:
2798 echo >>"$at_stdout"; printf "%s\n" "220
2799 280 en : en
2800 221
2801 " | \
2802 $at_diff - "$at_stdout" || at_failed=:
2803 at_fn_check_status 0 $at_status "$at_srcdir/showlang.at:19"
2804 $at_failed && at_fn_log_failure
2805 $at_traceon; }
2806
2807 set +x
2808 $at_times_p && times >"$at_times_file"
2809 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2810 read at_status <"$at_status_file"
2811 #AT_STOP_15