2 # Generated from testsuite.at by GNU Autoconf 2.69.
4 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
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 ## -------------------- ##
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
22 case `(set -o) 2>/dev/null` in #(
34 # Printing a long string crashes Solaris 7 /usr/bin/printf.
35 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
37 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38 # Prefer a ksh shell builtin over an external printf program on Solaris,
39 # but without wasting forks for bash or zsh.
40 if test -z "$BASH_VERSION$ZSH_VERSION" \
41 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
43 as_echo_n='print -rn --'
44 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50 as_echo_n='/usr/ucb/echo -n'
52 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 expr "X$arg" : "X\\(.*\\)$as_nl";
58 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 as_echo_n='sh -c $as_echo_n_body as_echo'
66 as_echo='sh -c $as_echo_body as_echo'
69 # The user is always right.
70 if test "${PATH_SEPARATOR+set}" != set; then
72 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
73 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 # We need space, tab and new line, in precisely that order. Quoting is
81 # there to prevent editors from complaining about space-tab.
82 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
83 # splitting by setting IFS to empty value.)
86 # Find who we are. Look in the path if we contain no directory separator.
89 *[\\/]* ) as_myself=$0 ;;
90 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 test -z "$as_dir" && as_dir=.
95 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 # We did not find ourselves, most probably we were run as `sh COMMAND'
102 # in which case we are not to be found in the path.
103 if test "x$as_myself" = x; then
106 if test ! -f "$as_myself"; then
107 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 # Unset variables that we do not need and which cause bugs (e.g. in
112 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
113 # suppresses any "Segmentation fault" message there. '((' could
114 # trigger a bug in pdksh 5.2.14.
115 for as_var in BASH_ENV ENV MAIL MAILPATH
116 do eval test x\${$as_var+set} = xset \
117 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
130 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
132 if test "x$CONFIG_SHELL" = x; then
133 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
137 # is contrary to our usage. Disable this feature.
138 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 case \`(set -o) 2>/dev/null\` in #(
149 as_required="as_fn_return () { (exit \$1); }
150 as_fn_success () { as_fn_return 0; }
151 as_fn_failure () { as_fn_return 1; }
152 as_fn_ret_success () { return 0; }
153 as_fn_ret_failure () { return 1; }
156 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
157 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
158 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
159 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
160 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163 exitcode=1; echo positional parameters were not saved.
165 test x\$exitcode = x0 || exit 1
167 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
168 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
169 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
170 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
171 test \$(( 1 + 1 )) = 2 || exit 1"
172 if (eval "$as_required") 2>/dev/null; then :
177 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
185 test -z "$as_dir" && as_dir=.
189 for as_base in sh bash ksh sh5; do
190 # Try only shells that exist, to save several forks.
191 as_shell=$as_dir/$as_base
192 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
193 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
194 CONFIG_SHELL=$as_shell as_have_required=yes
195 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
204 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
205 CONFIG_SHELL=$SHELL as_have_required=yes
210 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 # Preserve -v and -x to the replacement shell.
218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 *v*x* | *x*v* ) as_opts=-vx ;;
225 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
226 # Admittedly, this is quite paranoid, since all the known shells bail
227 # out after a failed `exec'.
228 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
232 if test x$as_have_required = xno; then :
233 $as_echo "$0: This script requires a shell more modern than all"
234 $as_echo "$0: the shells that I found on your system."
235 if test x${ZSH_VERSION+set} = xset ; then
236 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
237 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
239 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
240 $0: including any error possibly output before this
241 $0: message. Then install a modern shell, or manually run
242 $0: the script under such a shell if you do have one."
248 SHELL=${CONFIG_SHELL-/bin/sh}
250 # Unset more variables known to interfere with behavior of common tools.
251 CLICOLOR_FORCE= GREP_OPTIONS=
252 unset CLICOLOR_FORCE GREP_OPTIONS
254 ## --------------------- ##
255 ## M4sh Shell Functions. ##
256 ## --------------------- ##
259 # Portably unset VAR.
262 { eval $1=; unset $1;}
266 # as_fn_set_status STATUS
267 # -----------------------
268 # Set $? to STATUS, without forking.
276 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
286 # Create "$as_dir" as a directory, including parents if necessary.
291 -*) as_dir=./$as_dir;;
293 test -d "$as_dir" || eval $as_mkdir_p || {
297 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
300 as_dirs="'$as_qdir' $as_dirs"
301 as_dir=`$as_dirname -- "$as_dir" ||
302 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
303 X"$as_dir" : 'X\(//\)[^/]' \| \
304 X"$as_dir" : 'X\(//\)$' \| \
305 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
306 $as_echo X"$as_dir" |
307 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
324 test -d "$as_dir" && break
326 test -z "$as_dirs" || eval "mkdir $as_dirs"
327 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332 # as_fn_executable_p FILE
333 # -----------------------
334 # Test if FILE is an executable regular file.
335 as_fn_executable_p ()
337 test -f "$1" && test -x "$1"
338 } # as_fn_executable_p
339 # as_fn_append VAR VALUE
340 # ----------------------
341 # Append the text in VALUE to the end of the definition contained in VAR. Take
342 # advantage of any shell optimizations that allow amortized linear growth over
343 # repeated appends, instead of the typical quadratic growth present in naive
345 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
346 eval 'as_fn_append ()
359 # Perform arithmetic evaluation on the ARGs, and store the result in the
360 # global $as_val. Take advantage of shells that can avoid forks. The arguments
361 # must be portable across $(()) and expr.
362 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
370 as_val=`expr "$@" || test $? -eq 1`
375 # as_fn_error STATUS ERROR [LINENO LOG_FD]
376 # ----------------------------------------
377 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
378 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
379 # script with STATUS, using 1 if that was 0.
382 as_status=$1; test $as_status -eq 0 && as_status=1
384 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
385 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
387 $as_echo "$as_me: error: $2" >&2
388 as_fn_exit $as_status
391 if expr a : '\(a\)' >/dev/null 2>&1 &&
392 test "X`expr 00001 : '.*\(...\)'`" = X001; then
398 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
404 as_me=`$as_basename -- "$0" ||
405 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
406 X"$0" : 'X\(//\)$' \| \
407 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409 sed '/^.*\/\([^/][^/]*\)\/*$/{
423 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
429 # Avoid depending upon Character Ranges.
430 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
431 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
432 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
433 as_cr_digits='0123456789'
434 as_cr_alnum=$as_cr_Letters$as_cr_digits
437 as_lineno_1=$LINENO as_lineno_1a=$LINENO
438 as_lineno_2=$LINENO as_lineno_2a=$LINENO
439 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
440 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
441 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
453 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
457 chmod +x "$as_me.lineno" ||
458 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
460 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
461 # already done that, so ensure we don't try to do so again and fall
462 # in an infinite loop. This has already happened in practice.
463 _as_can_reexec=no; export _as_can_reexec
464 # Don't try to exec as it changes $[0], causing all sort of problems
465 # (the dirname of $[0] is not the place where we might find the
466 # original and so on. Autoconf is especially sensitive to this).
468 # Exit status is that of the last command.
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in #(((((
475 case `echo 'xy\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
478 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
485 rm -f conf$$ conf$$.exe conf$$.file
486 if test -d conf$$.dir; then
487 rm -f conf$$.dir/conf$$.file
490 mkdir conf$$.dir 2>/dev/null
492 if (echo >conf$$.file) 2>/dev/null; then
493 if ln -s conf$$.file conf$$ 2>/dev/null; then
495 # ... but there are two gotchas:
496 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
497 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
498 # In both cases, we have to default to `cp -pR'.
499 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
501 elif ln conf$$.file conf$$ 2>/dev/null; then
509 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
510 rmdir conf$$.dir 2>/dev/null
512 if mkdir -p . 2>/dev/null; then
513 as_mkdir_p='mkdir -p "$as_dir"'
515 test -d ./-p && rmdir ./-p
520 as_executable_p=as_fn_executable_p
522 # Sed expression to map a string onto a valid CPP name.
523 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
525 # Sed expression to map a string onto a valid variable name.
526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532 SHELL=${CONFIG_SHELL-/bin/sh}
538 # Not all shells have the 'times' builtin; the subshell is needed to make
539 # sure we discard the 'times: not found' message from the shell.
541 (times) >/dev/null 2>&1 && at_times_p=:
543 # CLI Arguments to pass to the debugging scripts.
547 # Shall we be verbose? ':' means no, empty means yes.
550 # Running several jobs in parallel, 0 means as many as test groups.
554 at_check_filter_trace=:
556 # Shall we keep the debug scripts? Must be `:' when the suite is
557 # run by a debug script, so that the script doesn't remove itself.
559 # Display help message?
561 # Display the version message?
569 # Whether to rerun failed tests.
571 # Whether a write failure occurred
574 # The directory we run the suite in. Default to . if no -C option.
576 # An absolute reference to this testsuite script.
578 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
579 * ) at_myself=$at_dir/$as_myself ;;
581 # Whether -C is in effect.
584 # Whether to enable colored test results.
586 # List of the tested programs.
594 # As many question marks as there are digits in the last test group number.
595 # Used to normalize the test group numbers so that `ls' lists them in
598 # Description of all the test groups.
599 at_help_all="1;wdiff.at:25;wdiff output formats;;
600 2;wdiff.at:142;report bad diff binary;;
601 3;wdiff.at:168;use pager;;
602 4;wdiff.at:201;diff as input;;
604 # List of the all the test groups.
605 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
607 # at_fn_validate_ranges NAME...
608 # -----------------------------
609 # Validate and normalize the test group number contained in each variable
610 # NAME. Leading zeroes are treated as decimal.
611 at_fn_validate_ranges ()
615 eval at_value=\$$at_grp
616 if test $at_value -lt 1 || test $at_value -gt 4; then
617 $as_echo "invalid test group: $at_value" >&2
621 0*) # We want to treat leading 0 as decimal, like expr and test, but
622 # AS_VAR_ARITH treats it as octal if it uses $(( )).
623 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
624 # expr fork, but it is not worth the effort to determine if the
625 # shell supports XSI when the user can just avoid leading 0.
626 eval $at_grp='`expr $at_value + 0`' ;;
634 # If the previous option needs an argument, assign it.
635 if test -n "$at_prev"; then
636 at_option=$at_prev=$at_option
641 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
645 # Accept the important Cygnus configure options, so we can diagnose typos.
669 no | never | none) at_color=never ;;
670 auto | tty | if-tty) at_color=auto ;;
671 always | yes | force) at_color=always ;;
672 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
673 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
687 at_verbose=; at_quiet=:
693 at_check_filter_trace=at_fn_filter_trace
696 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
697 at_fn_validate_ranges at_option
698 as_fn_append at_groups "$at_option$as_nl"
702 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
703 at_range_start=`echo $at_option |tr -d X-`
704 at_fn_validate_ranges at_range_start
705 at_range=`$as_echo "$at_groups_all" | \
706 sed -ne '/^'$at_range_start'$/,$p'`
707 as_fn_append at_groups "$at_range$as_nl"
710 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
711 at_range_end=`echo $at_option |tr -d X-`
712 at_fn_validate_ranges at_range_end
713 at_range=`$as_echo "$at_groups_all" | \
714 sed -ne '1,/^'$at_range_end'$/p'`
715 as_fn_append at_groups "$at_range$as_nl"
718 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
719 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
720 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
721 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
722 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
723 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
724 at_range_start=`expr $at_option : '\(.*\)-'`
725 at_range_end=`expr $at_option : '.*-\(.*\)'`
726 if test $at_range_start -gt $at_range_end; then
728 at_range_end=$at_range_start
729 at_range_start=$at_tmp
731 at_fn_validate_ranges at_range_start at_range_end
732 at_range=`$as_echo "$at_groups_all" | \
733 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
734 as_fn_append at_groups "$at_range$as_nl"
737 # Directory selection.
744 if test x- = "x$at_dir" ; then
749 # Parallel execution.
753 --jobs=* | -j[0-9]* )
754 if test -n "$at_optarg"; then
757 at_jobs=`expr X$at_option : 'X-j\(.*\)'`
759 case $at_jobs in *[!0-9]*)
760 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
761 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
770 at_groups_selected=$at_help_all
782 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
785 # It is on purpose that we match the test group titles too.
786 at_groups_selected=`$as_echo "$at_groups_selected" |
787 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
789 # Smash the keywords.
790 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
791 as_fn_append at_groups "$at_groups_selected$as_nl"
798 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
799 # Reject names that are not valid shell variable names.
801 '' | [0-9]* | *[!_$as_cr_alnum]* )
802 as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
804 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
805 # Export now, but save eval for later and for debug scripts.
807 as_fn_append at_debug_args " $at_envvar='$at_value'"
810 *) $as_echo "$as_me: invalid option: $at_option" >&2
811 $as_echo "Try \`$0 --help' for more information." >&2
817 # Verify our last option didn't require an argument
818 if test -n "$at_prev"; then :
819 as_fn_error $? "\`$at_prev' requires an argument"
822 # The file containing the suite.
823 at_suite_log=$at_dir/$as_me.log
825 # Selected test groups.
826 if test -z "$at_groups$at_recheck"; then
827 at_groups=$at_groups_all
829 if test -n "$at_recheck" && test -r "$at_suite_log"; then
830 at_oldfails=`sed -n '
831 /^Failed tests:$/,/^Skipped tests:$/{
832 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
834 /^Unexpected passes:$/,/^## Detailed failed tests/{
835 s/^[ ]*\([1-9][0-9]*\):.*/\1/p
837 /^## Detailed failed tests/q
839 as_fn_append at_groups "$at_oldfails$as_nl"
841 # Sort the tests, removing duplicates.
842 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
845 if test x"$at_color" = xalways \
846 || { test x"$at_color" = xauto && test -t 1; }; then
847 at_red=`printf '\033[0;31m'`
848 at_grn=`printf '\033[0;32m'`
849 at_lgn=`printf '\033[1;32m'`
850 at_blu=`printf '\033[1;34m'`
851 at_std=`printf '\033[m'`
853 at_red= at_grn= at_lgn= at_blu= at_std=
858 cat <<_ATEOF || at_write_fail=1
859 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
861 Run all the tests, or the selected TESTS, given by numeric ranges, and
862 save a detailed log file. Upon failure, create debugging scripts.
864 Do not change environment variables directly. Instead, set them via
865 command line arguments. Set \`AUTOTEST_PATH' to select the executables
866 to exercise. Each relative directory is expanded as build and source
867 directories relative to the top level of this distribution.
868 E.g., from within the build directory /tmp/foo-1.0, invoking this:
870 $ $0 AUTOTEST_PATH=bin
872 is equivalent to the following, assuming the source directory is /src/foo-1.0:
874 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
876 cat <<_ATEOF || at_write_fail=1
879 -h, --help print the help message, then exit
880 -V, --version print version number, then exit
881 -c, --clean remove all the files this test suite might create and exit
882 -l, --list describes all the tests, or the selected TESTS
884 cat <<_ATEOF || at_write_fail=1
888 change to directory DIR before starting
889 --color[=never|auto|always]
890 disable colored test results, or enable even without terminal
892 Allow N jobs at once; infinite jobs with no arg (default 1)
893 -k, --keywords=KEYWORDS
894 select the tests matching all the comma-separated KEYWORDS
895 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
896 --recheck select all tests that failed or passed unexpectedly last time
897 -e, --errexit abort as soon as a test fails; implies --debug
898 -v, --verbose force more detailed output
899 default for debugging scripts
900 -d, --debug inhibit clean up and top-level logging
901 default for debugging scripts
902 -x, --trace enable tests shell tracing
904 cat <<_ATEOF || at_write_fail=1
906 Report bugs to <wdiff-bugs@gnu.org>.
907 General help using GNU software: <http://www.gnu.org/gethelp/>.
914 cat <<_ATEOF || at_write_fail=1
915 GNU wdiff 1.1.2 test suite: wdiff test groups:
917 NUM: FILE-NAME:LINE TEST-GROUP-NAME
921 # Pass an empty line as separator between selected groups and help.
922 $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
923 awk 'NF == 1 && FS != ";" {
930 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
936 n = split ($ 4, a, " ")
937 for (i = 1; i <= n; i++) {
938 l = length (a[i]) + 1
939 if (i > 1 && len + l > lmax) {
941 line = indent " " a[i]
952 }' || at_write_fail=1
955 if $at_version_p; then
956 $as_echo "$as_me (GNU wdiff 1.1.2)" &&
957 cat <<\_ATEOF || at_write_fail=1
959 Copyright (C) 2012 Free Software Foundation, Inc.
960 This test suite is free software; the Free Software Foundation gives
961 unlimited permission to copy, distribute and modify it.
966 # Should we print banners? Yes if more than one test is run.
967 case $at_groups in #(
969 at_print_banners=: ;; #(
970 * ) at_print_banners=false ;;
972 # Text for banner N, set to a single space once printed.
974 # Take any -C into account.
975 if $at_change_dir ; then
976 test x != "x$at_dir" && cd "$at_dir" \
977 || as_fn_error $? "unable to change directory"
981 # Load the config files for any default variable assignments.
982 for at_file in atconfig atlocal
984 test -r $at_file || continue
985 . ./$at_file || as_fn_error $? "invalid content: $at_file"
988 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
989 : "${at_top_build_prefix=$at_top_builddir}"
991 # Perform any assignments requested during argument parsing.
992 eval "$at_debug_args"
994 # atconfig delivers names relative to the directory the test suite is
995 # in, but the groups themselves are run in testsuite-dir/group-dir.
996 if test -n "$at_top_srcdir"; then
998 for at_dir_var in srcdir top_srcdir top_build_prefix
1000 eval at_val=\$at_$at_dir_var
1002 [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1003 *) at_prefix=../../ ;;
1005 eval "$at_dir_var=\$at_prefix\$at_val"
1009 ## -------------------- ##
1010 ## Directory structure. ##
1011 ## -------------------- ##
1013 # This is the set of directories and files used by this script
1014 # (non-literals are capitalized):
1016 # TESTSUITE - the testsuite
1017 # TESTSUITE.log - summarizes the complete testsuite run
1018 # TESTSUITE.dir/ - created during a run, remains after -d or failed test
1019 # + at-groups/ - during a run: status of all groups in run
1020 # | + NNN/ - during a run: meta-data about test group NNN
1021 # | | + check-line - location (source file and line) of current AT_CHECK
1022 # | | + status - exit status of current AT_CHECK
1023 # | | + stdout - stdout of current AT_CHECK
1024 # | | + stder1 - stderr, including trace
1025 # | | + stderr - stderr, with trace filtered out
1026 # | | + test-source - portion of testsuite that defines group
1027 # | | + times - timestamps for computing duration
1028 # | | + pass - created if group passed
1029 # | | + xpass - created if group xpassed
1030 # | | + fail - created if group failed
1031 # | | + xfail - created if group xfailed
1032 # | | + skip - created if group skipped
1033 # + at-stop - during a run: end the run if this file exists
1034 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1035 # + 0..NNN/ - created for each group NNN, remains after -d or failed test
1036 # | + TESTSUITE.log - summarizes the group results
1037 # | + ... - files created during the group
1039 # The directory the whole suite works in.
1040 # Should be absolute to let the user `cd' at will.
1041 at_suite_dir=$at_dir/$as_me.dir
1042 # The file containing the suite ($at_dir might have changed since earlier).
1043 at_suite_log=$at_dir/$as_me.log
1044 # The directory containing helper files per test group.
1045 at_helper_dir=$at_suite_dir/at-groups
1046 # Stop file: if it exists, do not start new jobs.
1047 at_stop_file=$at_suite_dir/at-stop
1048 # The fifo used for the job dispatcher.
1049 at_job_fifo=$at_suite_dir/at-job-fifo
1052 test -d "$at_suite_dir" &&
1053 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1054 rm -f -r "$at_suite_dir" "$at_suite_log"
1058 # Don't take risks: use only absolute directories in PATH.
1060 # For stand-alone test suites (ie. atconfig was not found),
1061 # AUTOTEST_PATH is relative to `.'.
1063 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1064 # of the package. Then expand it into build/src parts, since users
1065 # may create executables in both places.
1066 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1069 for as_dir in $AUTOTEST_PATH $PATH
1072 test -z "$as_dir" && as_dir=.
1073 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1076 as_fn_append at_path "$as_dir"
1079 if test -z "$at_top_build_prefix"; then
1080 # Stand-alone test suite.
1081 as_fn_append at_path "$as_dir"
1083 # Embedded test suite.
1084 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1085 as_fn_append at_path "$at_top_srcdir/$as_dir"
1093 # Now build and simplify PATH.
1095 # There might be directories that don't exist, but don't redirect
1096 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1099 for as_dir in $at_path
1102 test -z "$as_dir" && as_dir=.
1103 test -d "$as_dir" || continue
1105 [\\/]* | ?:[\\/]* ) ;;
1106 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1108 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1109 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1110 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1111 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1119 # Setting up the FDs.
1123 # 5 is the log file. Not to be overwritten if `-d'.
1124 if $at_debug_p; then
1125 at_suite_log=/dev/null
1129 exec 5>>"$at_suite_log"
1132 $as_echo "## ---------------------------------- ##
1133 ## GNU wdiff 1.1.2 test suite: wdiff. ##
1134 ## ---------------------------------- ##"
1136 $as_echo "## ---------------------------------- ##
1137 ## GNU wdiff 1.1.2 test suite: wdiff. ##
1138 ## ---------------------------------- ##"
1141 $as_echo "$as_me: command line was:"
1142 $as_echo " \$ $0 $at_cli_args"
1145 # If ChangeLog exists, list a few lines in case it might help determining
1146 # the exact version.
1147 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1148 $as_echo "## ---------- ##
1152 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1162 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1163 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1164 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1165 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1166 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1168 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1169 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1171 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1172 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1173 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1174 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1175 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1176 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1177 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1185 test -z "$as_dir" && as_dir=.
1186 $as_echo "PATH: $as_dir"
1193 # Contents of the config files.
1194 for at_file in atconfig atlocal
1196 test -r $at_file || continue
1197 $as_echo "$as_me: $at_file:"
1198 sed 's/^/| /' $at_file
1204 ## ------------------------- ##
1205 ## Autotest shell functions. ##
1206 ## ------------------------- ##
1208 # at_fn_banner NUMBER
1209 # -------------------
1210 # Output banner NUMBER, provided the testsuite is running multiple groups and
1211 # this particular banner has not yet been printed.
1214 $at_print_banners || return 0
1215 eval at_banner_text=\$at_banner_text_$1
1216 test "x$at_banner_text" = "x " && return 0
1217 eval "at_banner_text_$1=\" \""
1218 if test -z "$at_banner_text"; then
1221 $as_echo "$as_nl$at_banner_text$as_nl"
1225 # at_fn_check_prepare_notrace REASON LINE
1226 # ---------------------------------------
1227 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1228 # command; REASON is the reason for disabling tracing.
1229 at_fn_check_prepare_notrace ()
1231 $at_trace_echo "Not enabling shell tracing (command contains $1)"
1232 $as_echo "$2" >"$at_check_line_file"
1233 at_check_trace=: at_check_filter=:
1234 : >"$at_stdout"; : >"$at_stderr"
1237 # at_fn_check_prepare_trace LINE
1238 # ------------------------------
1239 # Perform AT_CHECK preparations for the command at LINE for a traceable
1241 at_fn_check_prepare_trace ()
1243 $as_echo "$1" >"$at_check_line_file"
1244 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1245 : >"$at_stdout"; : >"$at_stderr"
1248 # at_fn_check_prepare_dynamic COMMAND LINE
1249 # ----------------------------------------
1250 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1251 # preparation function.
1252 at_fn_check_prepare_dynamic ()
1256 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1258 at_fn_check_prepare_trace "$2" ;;
1262 # at_fn_filter_trace
1263 # ------------------
1264 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1266 at_fn_filter_trace ()
1268 mv "$at_stderr" "$at_stder1"
1269 grep '^ *+' "$at_stder1" >&2
1270 grep -v '^ *+' "$at_stder1" >"$at_stderr"
1273 # at_fn_log_failure FILE-LIST
1274 # ---------------------------
1275 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1276 # with a failure exit code.
1277 at_fn_log_failure ()
1280 do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1281 echo 1 > "$at_status_file"
1285 # at_fn_check_skip EXIT-CODE LINE
1286 # -------------------------------
1287 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1288 # the test group subshell with that same exit code. Use LINE in any report
1289 # about test failure.
1293 99) echo 99 > "$at_status_file"; at_failed=:
1294 $as_echo "$2: hard failure"; exit 99;;
1295 77) echo 77 > "$at_status_file"; exit 77;;
1299 # at_fn_check_status EXPECTED EXIT-CODE LINE
1300 # ------------------------------------------
1301 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1302 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1303 # exit code; if it is anything else print an error message referring to LINE,
1304 # and fail the test.
1305 at_fn_check_status ()
1309 77) echo 77 > "$at_status_file"; exit 77;;
1310 99) echo 99 > "$at_status_file"; at_failed=:
1311 $as_echo "$3: hard failure"; exit 99;;
1312 *) $as_echo "$3: exit code was $2, expected $1"
1317 # at_fn_diff_devnull FILE
1318 # -----------------------
1319 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1321 at_fn_diff_devnull ()
1323 test -s "$1" || return 0
1324 $at_diff "$at_devnull" "$1"
1329 # Parse out test NUMBER from the tail of this file.
1332 eval at_sed=\$at_sed$1
1333 sed "$at_sed" "$at_myself" > "$at_test_source"
1336 # at_fn_create_debugging_script
1337 # -----------------------------
1338 # Create the debugging script $at_group_dir/run which will reproduce the
1339 # current test group.
1340 at_fn_create_debugging_script ()
1343 echo "#! /bin/sh" &&
1344 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1345 $as_echo "cd '$at_dir'" &&
1346 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1348 } >"$at_group_dir/run" &&
1349 chmod +x "$at_group_dir/run"
1352 ## -------------------------------- ##
1353 ## End of autotest shell functions. ##
1354 ## -------------------------------- ##
1356 $as_echo "## ---------------- ##
1357 ## Tested programs. ##
1358 ## ---------------- ##"
1362 # Report what programs are being tested.
1363 for at_program in : $at_tested
1365 test "$at_program" = : && continue
1367 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1373 test -z "$as_dir" && as_dir=.
1374 test -f "$as_dir/$at_program" && break
1378 at_program_=$as_dir/$at_program ;;
1380 if test -f "$at_program_"; then
1382 $as_echo "$at_srcdir/testsuite.at:6: $at_program_ --version"
1383 "$at_program_" --version </dev/null
1387 as_fn_error $? "cannot find $at_program" "$LINENO" 5
1392 $as_echo "## ------------------ ##
1393 ## Running the tests. ##
1394 ## ------------------ ##"
1397 at_start_date=`date`
1398 at_start_time=`date +%s 2>/dev/null`
1399 $as_echo "$as_me: starting at: $at_start_date" >&5
1401 # Create the master directory if it doesn't already exist.
1402 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1403 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1405 # Can we diff with `/dev/null'? DU 5.0 refuses.
1406 if diff /dev/null /dev/null >/dev/null 2>&1; then
1407 at_devnull=/dev/null
1409 at_devnull=$at_suite_dir/devnull
1413 # Use `diff -u' when possible.
1414 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1421 # Get the last needed group.
1422 for at_group in : $at_groups; do :; done
1424 # Extract the start and end lines of each test group at the tail
1432 test = substr ($ 0, 10)
1433 print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1434 if (test == "'"$at_group"'") exit
1435 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1436 . "$at_suite_dir/at-source-lines" ||
1437 as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1438 rm -f "$at_suite_dir/at-source-lines"
1440 # Set number of jobs for `-j'; avoid more jobs than test groups.
1441 set X $at_groups; shift; at_max_jobs=$#
1442 if test $at_max_jobs -eq 0; then
1445 if test $at_jobs -ne 1 &&
1446 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1447 at_jobs=$at_max_jobs
1450 # If parallel mode, don't output banners, don't split summary lines.
1451 if test $at_jobs -ne 1; then
1452 at_print_banners=false
1456 # Set up helper dirs.
1457 rm -rf "$at_helper_dir" &&
1458 mkdir "$at_helper_dir" &&
1459 cd "$at_helper_dir" &&
1460 { test -z "$at_groups" || mkdir $at_groups; } ||
1461 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1463 # Functions for running a test group. We leave the actual
1464 # test group execution outside of a shell function in order
1465 # to avoid hitting zsh 4.x exit status bugs.
1467 # at_fn_group_prepare
1468 # -------------------
1469 # Prepare for running a test group.
1470 at_fn_group_prepare ()
1472 # The directory for additional per-group helper files.
1473 at_job_dir=$at_helper_dir/$at_group
1474 # The file containing the location of the last AT_CHECK.
1475 at_check_line_file=$at_job_dir/check-line
1476 # The file containing the exit status of the last command.
1477 at_status_file=$at_job_dir/status
1478 # The files containing the output of the tested commands.
1479 at_stdout=$at_job_dir/stdout
1480 at_stder1=$at_job_dir/stder1
1481 at_stderr=$at_job_dir/stderr
1482 # The file containing the code for a test group.
1483 at_test_source=$at_job_dir/test-source
1484 # The file containing dates.
1485 at_times_file=$at_job_dir/times
1487 # Be sure to come back to the top test directory.
1490 # Clearly separate the test groups when verbose.
1491 $at_first || $at_verbose echo
1493 at_group_normalized=$at_group
1496 case $at_group_normalized in #(
1497 '"$at_format"'*) break;;
1499 at_group_normalized=0$at_group_normalized
1503 # Create a fresh directory for the next test group, and enter.
1504 # If one already exists, the user may have invoked ./run from
1505 # within that directory; we remove the contents, but not the
1506 # directory itself, so that we aren't pulling the rug out from
1507 # under the shell's notion of the current directory.
1508 at_group_dir=$at_suite_dir/$at_group_normalized
1509 at_group_log=$at_group_dir/$as_me.log
1510 if test -d "$at_group_dir"; then
1511 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1512 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1515 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1516 # Be tolerant if the above `rm' was not able to remove the directory.
1517 as_dir="$at_group_dir"; as_fn_mkdir_p
1519 echo 0 > "$at_status_file"
1521 # In verbose mode, append to the log file *and* show on
1522 # the standard output; in quiet mode only write to the log.
1523 if test -z "$at_verbose"; then
1524 at_tee_pipe='tee -a "$at_group_log"'
1526 at_tee_pipe='cat >> "$at_group_log"'
1530 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1531 # -------------------------------------------------
1532 # Declare the test group ORDINAL, located at LINE with group description DESC,
1533 # and residing under BANNER. Use PAD to align the status column.
1534 at_fn_group_banner ()
1537 test -n "$5" && at_fn_banner $5
1540 [0-9]) at_desc_line=" $1: ";;
1541 [0-9][0-9]) at_desc_line=" $1: " ;;
1542 *) at_desc_line="$1: " ;;
1544 as_fn_append at_desc_line "$3$4"
1545 $at_quiet $as_echo_n "$at_desc_line"
1546 echo "# -*- compilation -*-" >> "$at_group_log"
1549 # at_fn_group_postprocess
1550 # -----------------------
1551 # Perform cleanup after running a test group.
1552 at_fn_group_postprocess ()
1554 # Be sure to come back to the suite directory, in particular
1555 # since below we might `rm' the group directory we are in currently.
1558 if test ! -f "$at_check_line_file"; then
1559 sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1560 A failure happened in a test group before any test could be
1561 run. This means that test suite is improperly designed. Please
1562 report this failure to <wdiff-bugs@gnu.org>.
1564 $as_echo "$at_setup_line" >"$at_check_line_file"
1567 $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1568 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1569 case $at_xfail:$at_status in
1571 at_msg="UNEXPECTED PASS"
1573 at_errexit=$at_errexit_p
1583 at_msg='skipped ('`cat "$at_check_line_file"`')'
1589 at_msg='FAILED ('`cat "$at_check_line_file"`')'
1591 at_errexit=$at_errexit_p
1595 at_msg='expected failure ('`cat "$at_check_line_file"`')'
1601 echo "$at_res" > "$at_job_dir/$at_res"
1602 # In parallel mode, output the summary line only afterwards.
1603 if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1604 $as_echo "$at_desc_line $at_color$at_msg$at_std"
1606 # Make sure there is a separator even with long titles.
1607 $as_echo " $at_color$at_msg$at_std"
1609 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1612 # $at_times_file is only available if the group succeeded.
1613 # We're not including the group log, so the success message
1614 # is written in the global log separately. But we also
1615 # write to the group log in case they're using -d.
1616 if test -f "$at_times_file"; then
1617 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
1618 rm -f "$at_times_file"
1620 $as_echo "$at_log_msg" >> "$at_group_log"
1621 $as_echo "$at_log_msg" >&5
1623 # Cleanup the group directory, unless the user wants the files
1624 # or the success was unexpected.
1625 if $at_debug_p || test $at_res = xpass; then
1626 at_fn_create_debugging_script
1627 if test $at_res = xpass && $at_errexit; then
1628 echo stop > "$at_stop_file"
1631 if test -d "$at_group_dir"; then
1632 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1633 rm -fr "$at_group_dir"
1635 rm -f "$at_test_source"
1639 # Upon failure, include the log into the testsuite's global
1640 # log. The failure message is written in the group log. It
1641 # is later included in the global log.
1642 $as_echo "$at_log_msg" >> "$at_group_log"
1644 # Upon failure, keep the group directory for autopsy, and create
1645 # the debugging script. With -e, do not start any further tests.
1646 at_fn_create_debugging_script
1647 if $at_errexit; then
1648 echo stop > "$at_stop_file"
1660 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1662 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1664 at_job_control_on=: at_job_control_off=: at_job_group=
1667 for at_signal in 1 2 15; do
1668 trap 'set +x; set +e
1670 at_signal='"$at_signal"'
1671 echo stop > "$at_stop_file"
1674 for at_pgid in `jobs -p 2>/dev/null`; do
1675 at_pgids="$at_pgids $at_job_group$at_pgid"
1677 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1679 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1682 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1684 test 1 -gt 2 && at_signame=$at_signal
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1686 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1687 as_fn_arith 128 + $at_signal && exit_status=$as_val
1688 as_fn_exit $exit_status' $at_signal
1691 rm -f "$at_stop_file"
1694 if test $at_jobs -ne 1 &&
1695 rm -f "$at_job_fifo" &&
1696 test -n "$at_job_group" &&
1697 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1699 # FIFO job dispatcher.
1702 for at_pid in `jobs -p`; do
1703 at_pids="$at_pids $at_job_group$at_pid"
1705 if test -n "$at_pids"; then
1707 test "${TMOUT+set}" = set && at_sig=STOP
1708 kill -$at_sig $at_pids 2>/dev/null
1711 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1714 # Turn jobs into a list of numbers, starting from 1.
1715 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1719 for at_group in $at_groups; do
1720 $at_job_control_on 2>/dev/null
1722 # Start one test group.
1725 exec 7>"$at_job_fifo"
1729 trap 'set +x; set +e
1731 echo stop > "$at_stop_file"
1733 as_fn_exit 141' PIPE
1735 if cd "$at_group_dir" &&
1736 at_fn_test $at_group &&
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1740 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1743 at_fn_group_postprocess
1749 exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1751 shift # Consume one token.
1752 if test $# -gt 0; then :; else
1753 read at_token <&6 || break
1756 test -f "$at_stop_file" && break
1759 # Read back the remaining ($at_jobs - 1) tokens.
1762 if test $# -gt 0; then
1772 # Run serially, avoid forks and other potential surprises.
1773 for at_group in $at_groups; do
1775 if cd "$at_group_dir" &&
1776 at_fn_test $at_group &&
1777 . "$at_test_source"; then :; else
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1779 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1782 at_fn_group_postprocess
1783 test -f "$at_stop_file" && break
1788 # Wrap up the test suite with summary statistics.
1791 # Use ?..???? when the list must remain sorted, the faster * otherwise.
1792 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
1793 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
1794 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
1795 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
1796 echo $f; done | sed '/?/d; s,/xpass,,'`
1797 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
1798 echo $f; done | sed '/?/d; s,/fail,,'`
1800 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
1801 shift; at_group_count=$#
1802 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
1803 set X $at_xfail_list; shift; at_xfail_count=$#
1804 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
1805 set X $at_skip_list; shift; at_skip_count=$#
1807 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
1808 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
1809 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
1811 # Back to the top directory.
1813 rm -rf "$at_helper_dir"
1815 # Compute the duration of the suite.
1817 at_stop_time=`date +%s 2>/dev/null`
1818 $as_echo "$as_me: ending at: $at_stop_date" >&5
1819 case $at_start_time,$at_stop_time in
1821 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
1822 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
1823 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
1824 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
1825 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
1826 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
1827 $as_echo "$as_me: test suite duration: $at_duration" >&5
1832 $as_echo "## ------------- ##
1834 ## ------------- ##"
1838 $as_echo "## ------------- ##
1840 ## ------------- ##"
1844 if test $at_run_count = 1; then
1848 at_result="$at_run_count tests"
1851 if $at_errexit_p && test $at_unexpected_count != 0; then
1852 if test $at_xpass_count = 1; then
1853 at_result="$at_result $at_were run, one passed"
1855 at_result="$at_result $at_were run, one failed"
1857 at_result="$at_result unexpectedly and inhibited subsequent tests."
1860 # Don't you just love exponential explosion of the number of cases?
1862 case $at_xpass_count:$at_fail_count:$at_xfail_count in
1864 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
1865 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
1867 # Some unexpected failures
1868 0:*:0) at_result="$at_result $at_were run,
1869 $at_fail_count failed unexpectedly." ;;
1871 # Some failures, both expected and unexpected
1872 0:*:1) at_result="$at_result $at_were run,
1873 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1874 0:*:*) at_result="$at_result $at_were run,
1875 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1877 # No unexpected failures, but some xpasses
1878 *:0:*) at_result="$at_result $at_were run,
1879 $at_xpass_count passed unexpectedly." ;;
1881 # No expected failures, but failures and xpasses
1882 *:1:0) at_result="$at_result $at_were run,
1883 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
1884 *:*:0) at_result="$at_result $at_were run,
1885 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
1888 *:*:1) at_result="$at_result $at_were run,
1889 $at_xpass_count passed unexpectedly,
1890 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
1891 *:*:*) at_result="$at_result $at_were run,
1892 $at_xpass_count passed unexpectedly,
1893 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
1896 if test $at_skip_count = 0 && test $at_run_count -gt 1; then
1897 at_result="All $at_result"
1901 # Now put skips in the mix.
1902 case $at_skip_count in
1904 1) at_result="$at_result
1905 1 test was skipped." ;;
1906 *) at_result="$at_result
1907 $at_skip_count tests were skipped." ;;
1910 if test $at_unexpected_count = 0; then
1911 echo "$at_color$at_result$at_std"
1912 echo "$at_result" >&5
1914 echo "${at_color}ERROR: $at_result$at_std" >&2
1915 echo "ERROR: $at_result" >&5
1918 $as_echo "## ------------------------ ##
1919 ## Summary of the failures. ##
1920 ## ------------------------ ##"
1922 # Summary of failed and skipped tests.
1923 if test $at_fail_count != 0; then
1924 echo "Failed tests:"
1925 $SHELL "$at_myself" $at_fail_list --list
1928 if test $at_skip_count != 0; then
1929 echo "Skipped tests:"
1930 $SHELL "$at_myself" $at_skip_list --list
1933 if test $at_xpass_count != 0; then
1934 echo "Unexpected passes:"
1935 $SHELL "$at_myself" $at_xpass_list --list
1938 if test $at_fail_count != 0; then
1939 $as_echo "## ---------------------- ##
1940 ## Detailed failed tests. ##
1941 ## ---------------------- ##"
1943 for at_group in $at_fail_list
1945 at_group_normalized=$at_group
1948 case $at_group_normalized in #(
1949 '"$at_format"'*) break;;
1951 at_group_normalized=0$at_group_normalized
1954 cat "$at_suite_dir/$at_group_normalized/$as_me.log"
1959 if test -n "$at_top_srcdir"; then
1960 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1961 ## ${at_top_build_prefix}config.log ##
1963 sed 's/^/| /' ${at_top_build_prefix}config.log
1968 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1969 ## $as_me.log was created. ##
1973 if $at_debug_p; then
1974 at_msg='per-test log files'
1976 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
1978 $as_echo "Please send $at_msg and all information you think might help:
1980 To: <wdiff-bugs@gnu.org>
1981 Subject: [GNU wdiff 1.1.2] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
1983 You may investigate any problem if you feel able to do so, in which
1984 case the test suite provides a good starting point. Its output may
1985 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
1996 at_fn_group_banner 1 'wdiff.at:25' \
1997 "wdiff output formats" " "
2000 $as_echo "1. $at_setup_line: testing $at_desc ..."
2004 cat >wdiff-a.txt <<'_ATEOF'
2006 The quick brown fox jumps over the lazy dog.
2007 The hurried orange fox jumps over the lazy dog.
2008 A slow green panda walks around a sleeping cat.
2009 The middling red fox jumps over the lazy dog.
2013 cat >wdiff-b.txt <<'_ATEOF'
2015 The quick brown fox jumps over the lazy dog.
2016 The slow red fox jumps over the lazy dog.
2017 A slow, short green giraffe walks around a sleeping cat.
2018 The middling red fox jumps over the lazy dog.
2023 $as_echo "$at_srcdir/wdiff.at:44: wdiff wdiff-a.txt wdiff-b.txt"
2024 at_fn_check_prepare_trace "wdiff.at:44"
2025 ( $at_check_trace; wdiff wdiff-a.txt wdiff-b.txt
2026 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2027 at_status=$? at_failed=false
2029 at_fn_diff_devnull "$at_stderr" || at_failed=:
2030 echo >>"$at_stdout"; $as_echo "This is [-input1-] {+input2+}
2031 The quick brown fox jumps over the lazy dog.
2032 The [-hurried orange-] {+slow red+} fox jumps over the lazy dog.
2033 A [-slow-] {+slow, short+} green [-panda-] {+giraffe+} walks around a sleeping cat.
2034 The middling red fox jumps over the lazy dog.
2036 $at_diff - "$at_stdout" || at_failed=:
2037 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:44"
2038 $at_failed && at_fn_log_failure
2043 $as_echo "$at_srcdir/wdiff.at:52: wdiff -1 wdiff-a.txt wdiff-b.txt"
2044 at_fn_check_prepare_trace "wdiff.at:52"
2045 ( $at_check_trace; wdiff -1 wdiff-a.txt wdiff-b.txt
2046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2047 at_status=$? at_failed=false
2049 at_fn_diff_devnull "$at_stderr" || at_failed=:
2050 echo >>"$at_stdout"; $as_echo "This is {+input2+}
2051 The quick brown fox jumps over the lazy dog.
2052 The {+slow red+} fox jumps over the lazy dog.
2053 A {+slow, short+} green {+giraffe+} walks around a sleeping cat.
2054 The middling red fox jumps over the lazy dog.
2056 $at_diff - "$at_stdout" || at_failed=:
2057 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:52"
2058 $at_failed && at_fn_log_failure
2063 $as_echo "$at_srcdir/wdiff.at:60: wdiff -2 wdiff-a.txt wdiff-b.txt"
2064 at_fn_check_prepare_trace "wdiff.at:60"
2065 ( $at_check_trace; wdiff -2 wdiff-a.txt wdiff-b.txt
2066 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2067 at_status=$? at_failed=false
2069 at_fn_diff_devnull "$at_stderr" || at_failed=:
2070 echo >>"$at_stdout"; $as_echo "This is [-input1-]
2071 The quick brown fox jumps over the lazy dog.
2072 The [-hurried orange-] fox jumps over the lazy dog.
2073 A [-slow-] green [-panda-] walks around a sleeping cat.
2074 The middling red fox jumps over the lazy dog.
2076 $at_diff - "$at_stdout" || at_failed=:
2077 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:60"
2078 $at_failed && at_fn_log_failure
2083 $as_echo "$at_srcdir/wdiff.at:68: wdiff -3 wdiff-a.txt wdiff-b.txt"
2084 at_fn_check_prepare_trace "wdiff.at:68"
2085 ( $at_check_trace; wdiff -3 wdiff-a.txt wdiff-b.txt
2086 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2087 at_status=$? at_failed=false
2089 at_fn_diff_devnull "$at_stderr" || at_failed=:
2090 echo >>"$at_stdout"; $as_echo "
2091 ======================================================================
2092 [-input1-] {+input2+}
2093 ======================================================================
2094 [-hurried orange-] {+slow red+}
2095 ======================================================================
2096 [-slow-] {+slow, short+}
2097 ======================================================================
2098 [-panda-] {+giraffe+}
2099 ======================================================================
2101 $at_diff - "$at_stdout" || at_failed=:
2102 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:68"
2103 $at_failed && at_fn_log_failure
2108 $as_echo "$at_srcdir/wdiff.at:81: wdiff -12 wdiff-a.txt wdiff-b.txt"
2109 at_fn_check_prepare_trace "wdiff.at:81"
2110 ( $at_check_trace; wdiff -12 wdiff-a.txt wdiff-b.txt
2111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2112 at_status=$? at_failed=false
2114 at_fn_diff_devnull "$at_stderr" || at_failed=:
2115 echo >>"$at_stdout"; $as_echo "This is
2116 ======================================================================
2118 The quick brown fox jumps over the lazy dog.
2120 ======================================================================
2121 fox jumps over the lazy dog.
2123 ======================================================================
2125 ======================================================================
2126 walks around a sleeping cat.
2127 The middling red fox jumps over the lazy dog.
2129 $at_diff - "$at_stdout" || at_failed=:
2130 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:81"
2131 $at_failed && at_fn_log_failure
2136 $as_echo "$at_srcdir/wdiff.at:97: wdiff -13 wdiff-a.txt wdiff-b.txt"
2137 at_fn_check_prepare_trace "wdiff.at:97"
2138 ( $at_check_trace; wdiff -13 wdiff-a.txt wdiff-b.txt
2139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2140 at_status=$? at_failed=false
2142 at_fn_diff_devnull "$at_stderr" || at_failed=:
2143 echo >>"$at_stdout"; $as_echo "
2144 ======================================================================
2146 ======================================================================
2148 ======================================================================
2150 ======================================================================
2152 ======================================================================
2154 $at_diff - "$at_stdout" || at_failed=:
2155 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:97"
2156 $at_failed && at_fn_log_failure
2161 $as_echo "$at_srcdir/wdiff.at:110: wdiff -23 wdiff-a.txt wdiff-b.txt"
2162 at_fn_check_prepare_trace "wdiff.at:110"
2163 ( $at_check_trace; wdiff -23 wdiff-a.txt wdiff-b.txt
2164 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2165 at_status=$? at_failed=false
2167 at_fn_diff_devnull "$at_stderr" || at_failed=:
2168 echo >>"$at_stdout"; $as_echo "
2169 ======================================================================
2171 ======================================================================
2173 ======================================================================
2175 ======================================================================
2177 ======================================================================
2179 $at_diff - "$at_stdout" || at_failed=:
2180 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:110"
2181 $at_failed && at_fn_log_failure
2186 $as_echo "$at_srcdir/wdiff.at:123: wdiff -123 wdiff-a.txt wdiff-b.txt"
2187 at_fn_check_prepare_trace "wdiff.at:123"
2188 ( $at_check_trace; wdiff -123 wdiff-a.txt wdiff-b.txt
2189 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2190 at_status=$? at_failed=false
2192 at_fn_diff_devnull "$at_stderr" || at_failed=:
2193 at_fn_diff_devnull "$at_stdout" || at_failed=:
2194 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:123"
2195 $at_failed && at_fn_log_failure
2200 $as_echo "$at_srcdir/wdiff.at:125: wdiff -123s wdiff-a.txt wdiff-b.txt"
2201 at_fn_check_prepare_trace "wdiff.at:125"
2202 ( $at_check_trace; wdiff -123s wdiff-a.txt wdiff-b.txt
2203 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2204 at_status=$? at_failed=false
2206 at_fn_diff_devnull "$at_stderr" || at_failed=:
2207 echo >>"$at_stdout"; $as_echo "wdiff-a.txt: 39 words 34 87% common 0 0% deleted 5 13% changed
2208 wdiff-b.txt: 40 words 34 85% common 0 0% inserted 6 15% changed
2210 $at_diff - "$at_stdout" || at_failed=:
2211 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:125"
2212 $at_failed && at_fn_log_failure
2217 $as_echo "$at_srcdir/wdiff.at:131: wdiff -w\\( -x\\) -y\\<\\< -z\\>\\> wdiff-a.txt wdiff-b.txt"
2218 at_fn_check_prepare_trace "wdiff.at:131"
2219 ( $at_check_trace; wdiff -w\( -x\) -y\<\< -z\>\> wdiff-a.txt wdiff-b.txt
2220 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2221 at_status=$? at_failed=false
2223 at_fn_diff_devnull "$at_stderr" || at_failed=:
2224 echo >>"$at_stdout"; $as_echo "This is (input1) <<input2>>
2225 The quick brown fox jumps over the lazy dog.
2226 The (hurried orange) <<slow red>> fox jumps over the lazy dog.
2227 A (slow) <<slow, short>> green (panda) <<giraffe>> walks around a sleeping cat.
2228 The middling red fox jumps over the lazy dog.
2230 $at_diff - "$at_stdout" || at_failed=:
2231 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:131"
2232 $at_failed && at_fn_log_failure
2237 $at_times_p && times >"$at_times_file"
2238 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2239 read at_status <"$at_status_file"
2242 at_fn_group_banner 2 'wdiff.at:142' \
2243 "report bad diff binary" " "
2246 $as_echo "2. $at_setup_line: testing $at_desc ..."
2251 wdiff_bin="`which wdiff`"
2252 # wish I could use AC_CHECK_PROG([wdiff_bin], [wdiff]) instead
2253 $as_echo "wdiff.at:148" >"$at_check_line_file"
2254 (! test -x "$wdiff_bin") \
2255 && at_fn_check_skip 99 "$at_srcdir/wdiff.at:148"
2256 cat >foo.txt <<'_ATEOF'
2260 cat >bar.txt <<'_ATEOF'
2266 $as_echo "$at_srcdir/wdiff.at:154: env PATH=\"\$PWD\" \"\$wdiff_bin\" foo.txt bar.txt"
2267 at_fn_check_prepare_dynamic "env PATH=\"$PWD\" \"$wdiff_bin\" foo.txt bar.txt" "wdiff.at:154"
2268 ( $at_check_trace; env PATH="$PWD" "$wdiff_bin" foo.txt bar.txt
2269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2270 at_status=$? at_failed=false
2272 echo stderr:; tee stderr <"$at_stderr"
2273 at_fn_diff_devnull "$at_stdout" || at_failed=:
2274 at_fn_check_status 2 $at_status "$at_srcdir/wdiff.at:154"
2275 $at_failed && at_fn_log_failure
2279 $as_echo "$at_srcdir/wdiff.at:155: grep \"wdiff: failed to execute diff\" stderr"
2280 at_fn_check_prepare_trace "wdiff.at:155"
2281 ( $at_check_trace; grep "wdiff: failed to execute diff" stderr
2282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2283 at_status=$? at_failed=false
2285 at_fn_diff_devnull "$at_stderr" || at_failed=:
2287 at_fn_check_status 0 $at_status "$at_srcdir/wdiff.at:155"
2288 $at_failed && at_fn_log_failure
2292 cat >diff <<'_ATEOF'
2294 echo "This diff is broken" >&2
2300 $as_echo "$at_srcdir/wdiff.at:162: env PATH=\"\$PWD\" \"\$wdiff_bin\" foo.txt bar.txt"
2301 at_fn_check_prepare_dynamic "env PATH=\"$PWD\" \"$wdiff_bin\" foo.txt bar.txt" "wdiff.at:162"
2302 ( $at_check_trace; env PATH="$PWD" "$wdiff_bin" foo.txt bar.txt
2303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2304 at_status=$? at_failed=false
2306 echo >>"$at_stderr"; $as_echo "This diff is broken
2308 $at_diff - "$at_stderr" || at_failed=:
2309 at_fn_diff_devnull "$at_stdout" || at_failed=:
2310 at_fn_check_status 2 $at_status "$at_srcdir/wdiff.at:162"
2311 $at_failed && at_fn_log_failure
2316 $at_times_p && times >"$at_times_file"
2317 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2318 read at_status <"$at_status_file"
2321 at_fn_group_banner 3 'wdiff.at:168' \
2325 $as_echo "3. $at_setup_line: testing $at_desc ..."
2329 # Due to the istty call in the sources, we have to use screen here.
2332 cat >foo.txt <<'_ATEOF'
2336 cat >bar.txt <<'_ATEOF'
2340 cat >dummypager <<'_ATEOF'
2342 echo "Pager starting."
2343 while read line; do echo "Pager line $line printed."; done
2344 echo "Pager now done."
2349 $as_echo "$at_srcdir/wdiff.at:184: screen -D -m -L \\
2350 env PAGER=\"\$PWD/dummypager\" PATH=\"\$PATH\" TERM=dumb LC_ALL=C LANGUAGE=C \\
2351 wdiff -wW -xX -yY -zZ -a foo.txt bar.txt
2353 at_fn_check_prepare_notrace 'an embedded newline' "wdiff.at:184"
2354 ( $at_check_trace; screen -D -m -L \
2355 env PAGER="$PWD/dummypager" PATH="$PATH" TERM=dumb LC_ALL=C LANGUAGE=C \
2356 wdiff -wW -xX -yY -zZ -a foo.txt bar.txt
2358 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2359 at_status=$? at_failed=false
2361 echo stderr:; cat "$at_stderr"
2362 echo stdout:; cat "$at_stdout"
2363 at_fn_check_status 0 $at_status "$at_srcdir/wdiff.at:184"
2364 $at_failed && at_fn_log_failure
2367 $as_echo "wdiff.at:188" >"$at_check_line_file"
2368 (test ! -f screenlog.0) \
2369 && at_fn_check_skip 77 "$at_srcdir/wdiff.at:188"
2371 $as_echo "wdiff.at:190" >"$at_check_line_file"
2372 (grep 'terminal type.*not defined' screenlog.0) \
2373 && at_fn_check_skip 77 "$at_srcdir/wdiff.at:190"
2374 # Need to work around a screen bug which might cause the first
2375 # character to be lost: https://savannah.gnu.org/bugs/index.php?34200
2377 $as_echo "$at_srcdir/wdiff.at:193: tr -d '\\r' < screenlog.0 | sed 's/^ager/Pager/'"
2378 at_fn_check_prepare_notrace 'a shell pipeline' "wdiff.at:193"
2379 ( $at_check_trace; tr -d '\r' < screenlog.0 | sed 's/^ager/Pager/'
2380 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2381 at_status=$? at_failed=false
2383 at_fn_diff_devnull "$at_stderr" || at_failed=:
2384 echo >>"$at_stdout"; $as_echo "Pager starting.
2385 Pager line start WfooX YbarZ end printed.
2388 $at_diff - "$at_stdout" || at_failed=:
2389 at_fn_check_status 0 $at_status "$at_srcdir/wdiff.at:193"
2390 $at_failed && at_fn_log_failure \
2396 $at_times_p && times >"$at_times_file"
2397 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2398 read at_status <"$at_status_file"
2401 at_fn_group_banner 4 'wdiff.at:201' \
2405 $as_echo "4. $at_setup_line: testing $at_desc ..."
2410 cat >foo.txt <<'_ATEOF'
2422 cat >bar.txt <<'_ATEOF'
2425 three but not in a row
2435 $as_echo "$at_srcdir/wdiff.at:225: diff -U1 foo.txt bar.txt | sed 's/\\.txt.*/.txt/'"
2436 at_fn_check_prepare_notrace 'a shell pipeline' "wdiff.at:225"
2437 ( $at_check_trace; diff -U1 foo.txt bar.txt | sed 's/\.txt.*/.txt/'
2438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2439 at_status=$? at_failed=false
2441 at_fn_diff_devnull "$at_stderr" || at_failed=:
2442 echo stdout:; tee stdout <"$at_stdout"
2443 at_fn_check_status 0 $at_status "$at_srcdir/wdiff.at:225"
2444 $at_failed && at_fn_log_failure
2447 mv stdout foobar.diff
2449 $as_echo "$at_srcdir/wdiff.at:227: wdiff -d -w\"(\" -x\")\" -y\"{\" -z\"}\" foobar.diff"
2450 at_fn_check_prepare_trace "wdiff.at:227"
2451 ( $at_check_trace; wdiff -d -w"(" -x")" -y"{" -z"}" foobar.diff
2452 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2453 at_status=$? at_failed=false
2455 at_fn_diff_devnull "$at_stderr" || at_failed=:
2456 echo >>"$at_stdout"; $as_echo "(-- foo.txt){++ bar.txt}
2459 three {but not} in a row
2467 $at_diff - "$at_stdout" || at_failed=:
2468 at_fn_check_status 1 $at_status "$at_srcdir/wdiff.at:227"
2469 $at_failed && at_fn_log_failure
2474 $at_times_p && times >"$at_times_file"
2475 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2476 read at_status <"$at_status_file"