1#! /bin/sh 2# Generated from testsuite.at by GNU Autoconf 2.69. 3# 4# Copyright (C) 2009-2012 Free Software Foundation, Inc. 5# 6# This test suite is free software; the Free Software Foundation gives 7# unlimited permission to copy, distribute and modify it. 8# 9# 10# Copyright (c) 2015-2019, Abel Cheung 11# All rights reserved. 12# 13# Makes use of macros from pyrediff project, which carries following notice: 14# 15# Copyright (c) 2013-2017 Luke Mewburn luke@mewburn.net 16# Copying and distribution of this file, with or without modification, 17# are permitted in any medium without royalty provided the copyright 18# notice and this notice are preserved. This file is offered as-is, 19# without any warranty. 20# 21## -------------------- ## 22## M4sh Initialization. ## 23## -------------------- ## 24 25# Be more Bourne compatible 26DUALCASE=1; export DUALCASE # for MKS sh 27if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 28 emulate sh 29 NULLCMD=: 30 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 31 # is contrary to our usage. Disable this feature. 32 alias -g '${1+"$@"}'='"$@"' 33 setopt NO_GLOB_SUBST 34else 35 case `(set -o) 2>/dev/null` in #( 36 *posix*) : 37 set -o posix ;; #( 38 *) : 39 ;; 40esac 41fi 42 43 44as_nl=' 45' 46export as_nl 47# Printing a long string crashes Solaris 7 /usr/bin/printf. 48as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 49as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 50as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 51# Prefer a ksh shell builtin over an external printf program on Solaris, 52# but without wasting forks for bash or zsh. 53if test -z "$BASH_VERSION$ZSH_VERSION" \ 54 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 55 as_echo='print -r --' 56 as_echo_n='print -rn --' 57elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 58 as_echo='printf %s\n' 59 as_echo_n='printf %s' 60else 61 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 62 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 63 as_echo_n='/usr/ucb/echo -n' 64 else 65 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 66 as_echo_n_body='eval 67 arg=$1; 68 case $arg in #( 69 *"$as_nl"*) 70 expr "X$arg" : "X\\(.*\\)$as_nl"; 71 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 72 esac; 73 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 74 ' 75 export as_echo_n_body 76 as_echo_n='sh -c $as_echo_n_body as_echo' 77 fi 78 export as_echo_body 79 as_echo='sh -c $as_echo_body as_echo' 80fi 81 82# The user is always right. 83if test "${PATH_SEPARATOR+set}" != set; then 84 PATH_SEPARATOR=: 85 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 86 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 87 PATH_SEPARATOR=';' 88 } 89fi 90 91 92# IFS 93# We need space, tab and new line, in precisely that order. Quoting is 94# there to prevent editors from complaining about space-tab. 95# (If _AS_PATH_WALK were called with IFS unset, it would disable word 96# splitting by setting IFS to empty value.) 97IFS=" "" $as_nl" 98 99# Find who we are. Look in the path if we contain no directory separator. 100as_myself= 101case $0 in #(( 102 *[\\/]* ) as_myself=$0 ;; 103 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 104for as_dir in $PATH 105do 106 IFS=$as_save_IFS 107 test -z "$as_dir" && as_dir=. 108 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 109 done 110IFS=$as_save_IFS 111 112 ;; 113esac 114# We did not find ourselves, most probably we were run as `sh COMMAND' 115# in which case we are not to be found in the path. 116if test "x$as_myself" = x; then 117 as_myself=$0 118fi 119if test ! -f "$as_myself"; then 120 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 121 exit 1 122fi 123 124# Unset variables that we do not need and which cause bugs (e.g. in 125# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 126# suppresses any "Segmentation fault" message there. '((' could 127# trigger a bug in pdksh 5.2.14. 128for as_var in BASH_ENV ENV MAIL MAILPATH 129do eval test x\${$as_var+set} = xset \ 130 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 131done 132PS1='$ ' 133PS2='> ' 134PS4='+ ' 135 136# NLS nuisances. 137LC_ALL=C 138export LC_ALL 139LANGUAGE=C 140export LANGUAGE 141 142# CDPATH. 143(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 144 145if test "x$CONFIG_SHELL" = x; then 146 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 147 emulate sh 148 NULLCMD=: 149 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 150 # is contrary to our usage. Disable this feature. 151 alias -g '\${1+\"\$@\"}'='\"\$@\"' 152 setopt NO_GLOB_SUBST 153else 154 case \`(set -o) 2>/dev/null\` in #( 155 *posix*) : 156 set -o posix ;; #( 157 *) : 158 ;; 159esac 160fi 161" 162 as_required="as_fn_return () { (exit \$1); } 163as_fn_success () { as_fn_return 0; } 164as_fn_failure () { as_fn_return 1; } 165as_fn_ret_success () { return 0; } 166as_fn_ret_failure () { return 1; } 167 168exitcode=0 169as_fn_success || { exitcode=1; echo as_fn_success failed.; } 170as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 171as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 172as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 173if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 174 175else 176 exitcode=1; echo positional parameters were not saved. 177fi 178test x\$exitcode = x0 || exit 1 179test -x / || exit 1" 180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 184test \$(( 1 + 1 )) = 2 || exit 1" 185 if (eval "$as_required") 2>/dev/null; then : 186 as_have_required=yes 187else 188 as_have_required=no 189fi 190 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 191 192else 193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 194as_found=false 195for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 196do 197 IFS=$as_save_IFS 198 test -z "$as_dir" && as_dir=. 199 as_found=: 200 case $as_dir in #( 201 /*) 202 for as_base in sh bash ksh sh5; do 203 # Try only shells that exist, to save several forks. 204 as_shell=$as_dir/$as_base 205 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 206 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 207 CONFIG_SHELL=$as_shell as_have_required=yes 208 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 209 break 2 210fi 211fi 212 done;; 213 esac 214 as_found=false 215done 216$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 217 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 218 CONFIG_SHELL=$SHELL as_have_required=yes 219fi; } 220IFS=$as_save_IFS 221 222 223 if test "x$CONFIG_SHELL" != x; then : 224 export CONFIG_SHELL 225 # We cannot yet assume a decent shell, so we have to provide a 226# neutralization value for shells without unset; and this also 227# works around shells that cannot unset nonexistent variables. 228# Preserve -v and -x to the replacement shell. 229BASH_ENV=/dev/null 230ENV=/dev/null 231(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 232case $- in # (((( 233 *v*x* | *x*v* ) as_opts=-vx ;; 234 *v* ) as_opts=-v ;; 235 *x* ) as_opts=-x ;; 236 * ) as_opts= ;; 237esac 238exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 239# Admittedly, this is quite paranoid, since all the known shells bail 240# out after a failed `exec'. 241$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 242exit 255 243fi 244 245 if test x$as_have_required = xno; then : 246 $as_echo "$0: This script requires a shell more modern than all" 247 $as_echo "$0: the shells that I found on your system." 248 if test x${ZSH_VERSION+set} = xset ; then 249 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 250 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 251 else 252 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, 253$0: including any error possibly output before this 254$0: message. Then install a modern shell, or manually run 255$0: the script under such a shell if you do have one." 256 fi 257 exit 1 258fi 259fi 260fi 261SHELL=${CONFIG_SHELL-/bin/sh} 262export SHELL 263# Unset more variables known to interfere with behavior of common tools. 264CLICOLOR_FORCE= GREP_OPTIONS= 265unset CLICOLOR_FORCE GREP_OPTIONS 266 267## --------------------- ## 268## M4sh Shell Functions. ## 269## --------------------- ## 270# as_fn_unset VAR 271# --------------- 272# Portably unset VAR. 273as_fn_unset () 274{ 275 { eval $1=; unset $1;} 276} 277as_unset=as_fn_unset 278 279# as_fn_set_status STATUS 280# ----------------------- 281# Set $? to STATUS, without forking. 282as_fn_set_status () 283{ 284 return $1 285} # as_fn_set_status 286 287# as_fn_exit STATUS 288# ----------------- 289# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 290as_fn_exit () 291{ 292 set +e 293 as_fn_set_status $1 294 exit $1 295} # as_fn_exit 296 297# as_fn_mkdir_p 298# ------------- 299# Create "$as_dir" as a directory, including parents if necessary. 300as_fn_mkdir_p () 301{ 302 303 case $as_dir in #( 304 -*) as_dir=./$as_dir;; 305 esac 306 test -d "$as_dir" || eval $as_mkdir_p || { 307 as_dirs= 308 while :; do 309 case $as_dir in #( 310 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 311 *) as_qdir=$as_dir;; 312 esac 313 as_dirs="'$as_qdir' $as_dirs" 314 as_dir=`$as_dirname -- "$as_dir" || 315$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 316 X"$as_dir" : 'X\(//\)[^/]' \| \ 317 X"$as_dir" : 'X\(//\)$' \| \ 318 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 319$as_echo X"$as_dir" | 320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 321 s//\1/ 322 q 323 } 324 /^X\(\/\/\)[^/].*/{ 325 s//\1/ 326 q 327 } 328 /^X\(\/\/\)$/{ 329 s//\1/ 330 q 331 } 332 /^X\(\/\).*/{ 333 s//\1/ 334 q 335 } 336 s/.*/./; q'` 337 test -d "$as_dir" && break 338 done 339 test -z "$as_dirs" || eval "mkdir $as_dirs" 340 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 341 342 343} # as_fn_mkdir_p 344 345# as_fn_executable_p FILE 346# ----------------------- 347# Test if FILE is an executable regular file. 348as_fn_executable_p () 349{ 350 test -f "$1" && test -x "$1" 351} # as_fn_executable_p 352# as_fn_append VAR VALUE 353# ---------------------- 354# Append the text in VALUE to the end of the definition contained in VAR. Take 355# advantage of any shell optimizations that allow amortized linear growth over 356# repeated appends, instead of the typical quadratic growth present in naive 357# implementations. 358if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 359 eval 'as_fn_append () 360 { 361 eval $1+=\$2 362 }' 363else 364 as_fn_append () 365 { 366 eval $1=\$$1\$2 367 } 368fi # as_fn_append 369 370# as_fn_arith ARG... 371# ------------------ 372# Perform arithmetic evaluation on the ARGs, and store the result in the 373# global $as_val. Take advantage of shells that can avoid forks. The arguments 374# must be portable across $(()) and expr. 375if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 376 eval 'as_fn_arith () 377 { 378 as_val=$(( $* )) 379 }' 380else 381 as_fn_arith () 382 { 383 as_val=`expr "$@" || test $? -eq 1` 384 } 385fi # as_fn_arith 386 387 388# ax_at_diff_pattern PATTERN OUTPUT 389# --------------------------------- 390# Diff PATTERN OUTPUT and elide change lines where the RE pattern matches 391ax_at_diff_pattern () 392{ 393diff "$1" "$2" | $AWK 'BEGIN { exitval=0 } 394 395function set_mode(m) 396{ 397 mode=m 398 lc=0 399 rc=0 400} 401 402function mismatch() 403{ 404 print mode 405 for (i = 0; i < lc; i++) { 406 print ll[i] 407 } 408 print "---" 409 for (i = 0; i < rc; i++) { 410 print rl[i] 411 } 412 set_mode("") 413 exitval=1 414} 415 416function change_mode(m) 417{ 418 if (lc > rc) { 419 mismatch() 420 } 421 set_mode(m) 422} 423 424$1 ~ /^[0-9]+(,[0-9]+)?[ad][0-9]+(,[0-9]+)?$/ { 425 change_mode("") 426 print 427 exitval=1 428 next 429} 430 431$1 ~ /^[0-9]+(,[0-9]+)?[c][0-9]+(,[0-9]+)?$/ { 432 change_mode($1) 433 next 434} 435 436mode == "" { 437 print $0 438 next 439} 440 441$1 == "<" { 442 ll[lc] = $0 443 lc = lc + 1 444 next 445} 446 447$1 == "---" { 448 next 449} 450 451$1 == ">" { 452 rl[rc] = $0 453 rc = rc + 1 454 if (rc > lc) { 455 mismatch() 456 next 457 } 458 pat = "^" substr(ll[rc-1], 3) "$" 459 str = substr($0, 3) 460 if (str !~ pat) { 461 mismatch() 462 } 463 next 464} 465 466{ 467 print "UNEXPECTED LINE: " $0 468 exit 10 469} 470 471END { 472 change_mode("") 473 exit exitval 474} 475' 476} # ax_at_diff_pattern 477 478# as_fn_error STATUS ERROR [LINENO LOG_FD] 479# ---------------------------------------- 480# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 481# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 482# script with STATUS, using 1 if that was 0. 483as_fn_error () 484{ 485 as_status=$1; test $as_status -eq 0 && as_status=1 486 if test "$4"; then 487 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 488 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 489 fi 490 $as_echo "$as_me: error: $2" >&2 491 as_fn_exit $as_status 492} # as_fn_error 493 494if expr a : '\(a\)' >/dev/null 2>&1 && 495 test "X`expr 00001 : '.*\(...\)'`" = X001; then 496 as_expr=expr 497else 498 as_expr=false 499fi 500 501if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 502 as_basename=basename 503else 504 as_basename=false 505fi 506 507as_me=`$as_basename -- "$0" || 508$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 509 X"$0" : 'X\(//\)$' \| \ 510 X"$0" : 'X\(/\)' \| . 2>/dev/null || 511$as_echo X/"$0" | 512 sed '/^.*\/\([^/][^/]*\)\/*$/{ 513 s//\1/ 514 q 515 } 516 /^X\/\(\/\/\)$/{ 517 s//\1/ 518 q 519 } 520 /^X\/\(\/\).*/{ 521 s//\1/ 522 q 523 } 524 s/.*/./; q'` 525 526if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 527 as_dirname=dirname 528else 529 as_dirname=false 530fi 531 532# Avoid depending upon Character Ranges. 533as_cr_letters='abcdefghijklmnopqrstuvwxyz' 534as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 535as_cr_Letters=$as_cr_letters$as_cr_LETTERS 536as_cr_digits='0123456789' 537as_cr_alnum=$as_cr_Letters$as_cr_digits 538 539 540 as_lineno_1=$LINENO as_lineno_1a=$LINENO 541 as_lineno_2=$LINENO as_lineno_2a=$LINENO 542 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 543 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 544 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 545 sed -n ' 546 p 547 /[$]LINENO/= 548 ' <$as_myself | 549 sed ' 550 s/[$]LINENO.*/&-/ 551 t lineno 552 b 553 :lineno 554 N 555 :loop 556 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 557 t loop 558 s/-\n.*// 559 ' >$as_me.lineno && 560 chmod +x "$as_me.lineno" || 561 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 562 563 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 564 # already done that, so ensure we don't try to do so again and fall 565 # in an infinite loop. This has already happened in practice. 566 _as_can_reexec=no; export _as_can_reexec 567 # Don't try to exec as it changes $[0], causing all sort of problems 568 # (the dirname of $[0] is not the place where we might find the 569 # original and so on. Autoconf is especially sensitive to this). 570 . "./$as_me.lineno" 571 # Exit status is that of the last command. 572 exit 573} 574 575ECHO_C= ECHO_N= ECHO_T= 576case `echo -n x` in #((((( 577-n*) 578 case `echo 'xy\c'` in 579 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 580 xy) ECHO_C='\c';; 581 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 582 ECHO_T=' ';; 583 esac;; 584*) 585 ECHO_N='-n';; 586esac 587 588rm -f conf$$ conf$$.exe conf$$.file 589if test -d conf$$.dir; then 590 rm -f conf$$.dir/conf$$.file 591else 592 rm -f conf$$.dir 593 mkdir conf$$.dir 2>/dev/null 594fi 595if (echo >conf$$.file) 2>/dev/null; then 596 if ln -s conf$$.file conf$$ 2>/dev/null; then 597 as_ln_s='ln -s' 598 # ... but there are two gotchas: 599 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 600 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 601 # In both cases, we have to default to `cp -pR'. 602 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 603 as_ln_s='cp -pR' 604 elif ln conf$$.file conf$$ 2>/dev/null; then 605 as_ln_s=ln 606 else 607 as_ln_s='cp -pR' 608 fi 609else 610 as_ln_s='cp -pR' 611fi 612rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 613rmdir conf$$.dir 2>/dev/null 614 615if mkdir -p . 2>/dev/null; then 616 as_mkdir_p='mkdir -p "$as_dir"' 617else 618 test -d ./-p && rmdir ./-p 619 as_mkdir_p=false 620fi 621 622as_test_x='test -x' 623as_executable_p=as_fn_executable_p 624 625# Sed expression to map a string onto a valid CPP name. 626as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 627 628# Sed expression to map a string onto a valid variable name. 629as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 630 631if ${AWK:+false} :; then : 632 AWK=awk 633fi 634 635 636 637 638 639 640 641SHELL=${CONFIG_SHELL-/bin/sh} 642 643# How were we run? 644at_cli_args="$@" 645 646 647# Not all shells have the 'times' builtin; the subshell is needed to make 648# sure we discard the 'times: not found' message from the shell. 649at_times_p=false 650(times) >/dev/null 2>&1 && at_times_p=: 651 652# CLI Arguments to pass to the debugging scripts. 653at_debug_args= 654# -e sets to true 655at_errexit_p=false 656# Shall we be verbose? ':' means no, empty means yes. 657at_verbose=: 658at_quiet= 659# Running several jobs in parallel, 0 means as many as test groups. 660at_jobs=1 661at_traceon=: 662at_trace_echo=: 663at_check_filter_trace=: 664 665# Shall we keep the debug scripts? Must be `:' when the suite is 666# run by a debug script, so that the script doesn't remove itself. 667at_debug_p=false 668# Display help message? 669at_help_p=false 670# Display the version message? 671at_version_p=false 672# List test groups? 673at_list_p=false 674# --clean 675at_clean=false 676# Test groups to run 677at_groups= 678# Whether to rerun failed tests. 679at_recheck= 680# Whether a write failure occurred 681at_write_fail=0 682 683# The directory we run the suite in. Default to . if no -C option. 684at_dir=`pwd` 685# An absolute reference to this testsuite script. 686case $as_myself in 687 [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; 688 * ) at_myself=$at_dir/$as_myself ;; 689esac 690# Whether -C is in effect. 691at_change_dir=false 692 693# Whether to enable colored test results. 694at_color=no 695# List of the tested programs. 696at_tested='' 697# As many question marks as there are digits in the last test group number. 698# Used to normalize the test group numbers so that `ls' lists them in 699# numerical order. 700at_format='??' 701# Description of all the test groups. 702at_help_all="1;test_cli_option.at:6;Short Options;option; 7032;test_cli_option.at:14;Long Options;option; 7043;test_cli_option.at:21;Invalid options;option; 7054;test_cli_option.at:32;Duplicative options;option; 7065;test_cli_option.at:46;Options with empty arg;option; 7076;test_cli_option.at:58;Wrong combinations;option; 7087;test_cli_option.at:65;Err on no file args;file option; 7098;test_cli_option.at:71;Err on multiple file args;file option; 7109;test_cli_option.at:76;Escaped char in delimiter;option; 71110;test_read_write.at:6;Err on non-existent input;file; 71211;test_read_write.at:11;Err on non-regular file;file unix; 71312;test_read_write.at:20;Err on non-regular file (Windows);file windows; 71413;test_read_write.at:26;UTF-8 console/file output are equal;file; 71514;test_parse_info2.at:6;Empty INFO2;info2; 71615;test_parse_info2.at:11;INFO2 Sample 1 - 95;info2; 71716;test_parse_info2.at:17;INFO2 Sample 2 - NT4;info2; 71817;test_parse_info2.at:22;INFO2 Sample 3 - 98;info2; 71918;test_parse_info2.at:27;INFO2 Sample 4 - ME;info2; 72019;test_parse_info2.at:32;INFO2 Sample 5 - 2000;info2; 72120;test_parse_info2.at:37;INFO2 Sample 6 - XP/03;info2; 72221;test_parse_info2.at:42;INFO2 - UNC legacy path 1;info2 unc; 72322;test_parse_info2.at:47;INFO2 - UNC legacy path 2;info2 unc; 72423;test_parse_info2.at:52;INFO2 - UNC unicode path;info2 unc; 72524;test_parse_dir.at:6;Empty \$Recycle.bin;recycledir; 72625;test_parse_dir.at:11;\$Recycle.bin Sample 1 - Vista;recycledir; 72726;test_parse_dir.at:16;\$Recycle.bin Sample 2 - Win 10;recycledir; 72827;test_parse_dir.at:21;\$Recycle.bin single index file;recycledir; 72928;test_parse_dir.at:29;\$Recycle.bin UNC path;recycledir unc; 73029;test_faulty_dir.at:6;Index files of different versions;recycledir crafted; 73130;test_faulty_dir.at:16;Directory w/o Windows access permission;recycledir crafted windows; 73231;test_faulty_dir.at:38;Directory w/o Unix access permission;recycledir crafted unix; 73332;test_encoding.at:9;Unicode characters in file argument;encoding; 73433;test_encoding.at:25;Legacy path encoding - correct;info2 encoding; 73534;test_encoding.at:31;Legacy path encoding - illegal (1);info2 encoding; 73635;test_encoding.at:46;Legacy path encoding - illegal (2);info2 encoding; 73736;test_encoding.at:61;Legacy path encoding - wrong;encoding; 73837;test_encoding.at:74;Bad unicode path;encoding; 73938;test_xml.at:6;INFO2: XML validation;info2 xml; 74039;test_xml.at:15;INFO2: DTD validation;info2 xml; 74140;test_xml.at:24;\$Recycle.bin: XML validation;recycledir xml; 74241;test_xml.at:33;\$Recycle.bin: DTD validation;recycledir xml; 743" 744# List of the all the test groups. 745at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` 746 747# at_fn_validate_ranges NAME... 748# ----------------------------- 749# Validate and normalize the test group number contained in each variable 750# NAME. Leading zeroes are treated as decimal. 751at_fn_validate_ranges () 752{ 753 for at_grp 754 do 755 eval at_value=\$$at_grp 756 if test $at_value -lt 1 || test $at_value -gt 41; then 757 $as_echo "invalid test group: $at_value" >&2 758 exit 1 759 fi 760 case $at_value in 761 0*) # We want to treat leading 0 as decimal, like expr and test, but 762 # AS_VAR_ARITH treats it as octal if it uses $(( )). 763 # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the 764 # expr fork, but it is not worth the effort to determine if the 765 # shell supports XSI when the user can just avoid leading 0. 766 eval $at_grp='`expr $at_value + 0`' ;; 767 esac 768 done 769} 770 771at_prev= 772for at_option 773do 774 # If the previous option needs an argument, assign it. 775 if test -n "$at_prev"; then 776 at_option=$at_prev=$at_option 777 at_prev= 778 fi 779 780 case $at_option in 781 *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; 782 *) at_optarg= ;; 783 esac 784 785 # Accept the important Cygnus configure options, so we can diagnose typos. 786 787 case $at_option in 788 --help | -h ) 789 at_help_p=: 790 ;; 791 792 --list | -l ) 793 at_list_p=: 794 ;; 795 796 --version | -V ) 797 at_version_p=: 798 ;; 799 800 --clean | -c ) 801 at_clean=: 802 ;; 803 804 --color ) 805 at_color=always 806 ;; 807 --color=* ) 808 case $at_optarg in 809 no | never | none) at_color=never ;; 810 auto | tty | if-tty) at_color=auto ;; 811 always | yes | force) at_color=always ;; 812 *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` 813 as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; 814 esac 815 ;; 816 817 --debug | -d ) 818 at_debug_p=: 819 ;; 820 821 --errexit | -e ) 822 at_debug_p=: 823 at_errexit_p=: 824 ;; 825 826 --verbose | -v ) 827 at_verbose=; at_quiet=: 828 ;; 829 830 --trace | -x ) 831 at_traceon='set -x' 832 at_trace_echo=echo 833 at_check_filter_trace=at_fn_filter_trace 834 ;; 835 836 [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) 837 at_fn_validate_ranges at_option 838 as_fn_append at_groups "$at_option$as_nl" 839 ;; 840 841 # Ranges 842 [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) 843 at_range_start=`echo $at_option |tr -d X-` 844 at_fn_validate_ranges at_range_start 845 at_range=`$as_echo "$at_groups_all" | \ 846 sed -ne '/^'$at_range_start'$/,$p'` 847 as_fn_append at_groups "$at_range$as_nl" 848 ;; 849 850 -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) 851 at_range_end=`echo $at_option |tr -d X-` 852 at_fn_validate_ranges at_range_end 853 at_range=`$as_echo "$at_groups_all" | \ 854 sed -ne '1,/^'$at_range_end'$/p'` 855 as_fn_append at_groups "$at_range$as_nl" 856 ;; 857 858 [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ 859 [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ 860 [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 861 [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ 862 [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ 863 [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) 864 at_range_start=`expr $at_option : '\(.*\)-'` 865 at_range_end=`expr $at_option : '.*-\(.*\)'` 866 if test $at_range_start -gt $at_range_end; then 867 at_tmp=$at_range_end 868 at_range_end=$at_range_start 869 at_range_start=$at_tmp 870 fi 871 at_fn_validate_ranges at_range_start at_range_end 872 at_range=`$as_echo "$at_groups_all" | \ 873 sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` 874 as_fn_append at_groups "$at_range$as_nl" 875 ;; 876 877 # Directory selection. 878 --directory | -C ) 879 at_prev=--directory 880 ;; 881 --directory=* ) 882 at_change_dir=: 883 at_dir=$at_optarg 884 if test x- = "x$at_dir" ; then 885 at_dir=./- 886 fi 887 ;; 888 889 # Parallel execution. 890 --jobs | -j ) 891 at_jobs=0 892 ;; 893 --jobs=* | -j[0-9]* ) 894 if test -n "$at_optarg"; then 895 at_jobs=$at_optarg 896 else 897 at_jobs=`expr X$at_option : 'X-j\(.*\)'` 898 fi 899 case $at_jobs in *[!0-9]*) 900 at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` 901 as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; 902 esac 903 ;; 904 905 # Keywords. 906 --keywords | -k ) 907 at_prev=--keywords 908 ;; 909 --keywords=* ) 910 at_groups_selected=$at_help_all 911 at_save_IFS=$IFS 912 IFS=, 913 set X $at_optarg 914 shift 915 IFS=$at_save_IFS 916 for at_keyword 917 do 918 at_invert= 919 case $at_keyword in 920 '!'*) 921 at_invert="-v" 922 at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` 923 ;; 924 esac 925 # It is on purpose that we match the test group titles too. 926 at_groups_selected=`$as_echo "$at_groups_selected" | 927 grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` 928 done 929 # Smash the keywords. 930 at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` 931 as_fn_append at_groups "$at_groups_selected$as_nl" 932 ;; 933 --recheck) 934 at_recheck=: 935 ;; 936 937 *=*) 938 at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` 939 # Reject names that are not valid shell variable names. 940 case $at_envvar in 941 '' | [0-9]* | *[!_$as_cr_alnum]* ) 942 as_fn_error $? "invalid variable name: \`$at_envvar'" ;; 943 esac 944 at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` 945 # Export now, but save eval for later and for debug scripts. 946 export $at_envvar 947 as_fn_append at_debug_args " $at_envvar='$at_value'" 948 ;; 949 950 *) $as_echo "$as_me: invalid option: $at_option" >&2 951 $as_echo "Try \`$0 --help' for more information." >&2 952 exit 1 953 ;; 954 esac 955done 956 957# Verify our last option didn't require an argument 958if test -n "$at_prev"; then : 959 as_fn_error $? "\`$at_prev' requires an argument" 960fi 961 962# The file containing the suite. 963at_suite_log=$at_dir/$as_me.log 964 965# Selected test groups. 966if test -z "$at_groups$at_recheck"; then 967 at_groups=$at_groups_all 968else 969 if test -n "$at_recheck" && test -r "$at_suite_log"; then 970 at_oldfails=`sed -n ' 971 /^Failed tests:$/,/^Skipped tests:$/{ 972 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 973 } 974 /^Unexpected passes:$/,/^## Detailed failed tests/{ 975 s/^[ ]*\([1-9][0-9]*\):.*/\1/p 976 } 977 /^## Detailed failed tests/q 978 ' "$at_suite_log"` 979 as_fn_append at_groups "$at_oldfails$as_nl" 980 fi 981 # Sort the tests, removing duplicates. 982 at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` 983fi 984 985if test x"$at_color" = xalways \ 986 || { test x"$at_color" = xauto && test -t 1; }; then 987 at_red=`printf '\033[0;31m'` 988 at_grn=`printf '\033[0;32m'` 989 at_lgn=`printf '\033[1;32m'` 990 at_blu=`printf '\033[1;34m'` 991 at_std=`printf '\033[m'` 992else 993 at_red= at_grn= at_lgn= at_blu= at_std= 994fi 995 996# Help message. 997if $at_help_p; then 998 cat <<_ATEOF || at_write_fail=1 999Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] 1000 1001Run all the tests, or the selected TESTS, given by numeric ranges, and 1002save a detailed log file. Upon failure, create debugging scripts. 1003 1004Do not change environment variables directly. Instead, set them via 1005command line arguments. Set \`AUTOTEST_PATH' to select the executables 1006to exercise. Each relative directory is expanded as build and source 1007directories relative to the top level of this distribution. 1008E.g., from within the build directory /tmp/foo-1.0, invoking this: 1009 1010 $ $0 AUTOTEST_PATH=bin 1011 1012is equivalent to the following, assuming the source directory is /src/foo-1.0: 1013 1014 PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 1015_ATEOF 1016cat <<_ATEOF || at_write_fail=1 1017 1018Operation modes: 1019 -h, --help print the help message, then exit 1020 -V, --version print version number, then exit 1021 -c, --clean remove all the files this test suite might create and exit 1022 -l, --list describes all the tests, or the selected TESTS 1023_ATEOF 1024cat <<_ATEOF || at_write_fail=1 1025 1026Execution tuning: 1027 -C, --directory=DIR 1028 change to directory DIR before starting 1029 --color[=never|auto|always] 1030 enable colored test results on terminal, or always 1031 -j, --jobs[=N] 1032 Allow N jobs at once; infinite jobs with no arg (default 1) 1033 -k, --keywords=KEYWORDS 1034 select the tests matching all the comma-separated KEYWORDS 1035 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD 1036 --recheck select all tests that failed or passed unexpectedly last time 1037 -e, --errexit abort as soon as a test fails; implies --debug 1038 -v, --verbose force more detailed output 1039 default for debugging scripts 1040 -d, --debug inhibit clean up and top-level logging 1041 default for debugging scripts 1042 -x, --trace enable tests shell tracing 1043_ATEOF 1044cat <<_ATEOF || at_write_fail=1 1045 1046Report bugs to <https://github.com/abelcheung/rifiuti2/issues>. 1047rifiuti2 home page: <https://abelcheung.github.io/rifiuti2/>. 1048_ATEOF 1049 exit $at_write_fail 1050fi 1051 1052# List of tests. 1053if $at_list_p; then 1054 cat <<_ATEOF || at_write_fail=1 1055rifiuti2 0.7.0 test suite test groups: 1056 1057 NUM: FILE-NAME:LINE TEST-GROUP-NAME 1058 KEYWORDS 1059 1060_ATEOF 1061 # Pass an empty line as separator between selected groups and help. 1062 $as_echo "$at_groups$as_nl$as_nl$at_help_all" | 1063 awk 'NF == 1 && FS != ";" { 1064 selected[$ 1] = 1 1065 next 1066 } 1067 /^$/ { FS = ";" } 1068 NF > 0 { 1069 if (selected[$ 1]) { 1070 printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 1071 if ($ 4) { 1072 lmax = 79 1073 indent = " " 1074 line = indent 1075 len = length (line) 1076 n = split ($ 4, a, " ") 1077 for (i = 1; i <= n; i++) { 1078 l = length (a[i]) + 1 1079 if (i > 1 && len + l > lmax) { 1080 print line 1081 line = indent " " a[i] 1082 len = length (line) 1083 } else { 1084 line = line " " a[i] 1085 len += l 1086 } 1087 } 1088 if (n) 1089 print line 1090 } 1091 } 1092 }' || at_write_fail=1 1093 exit $at_write_fail 1094fi 1095if $at_version_p; then 1096 $as_echo "$as_me (rifiuti2 0.7.0)" && 1097 cat <<\_ATEOF || at_write_fail=1 1098 1099Copyright (C) 2012 Free Software Foundation, Inc. 1100This test suite is free software; the Free Software Foundation gives 1101unlimited permission to copy, distribute and modify it. 1102 1103 1104Copyright (c) 2015-2019, Abel Cheung 1105All rights reserved. 1106 1107Makes use of macros from pyrediff project, which carries following notice: 1108 1109 Copyright (c) 2013-2017 Luke Mewburn luke@mewburn.net 1110 Copying and distribution of this file, with or without modification, 1111 are permitted in any medium without royalty provided the copyright 1112 notice and this notice are preserved. This file is offered as-is, 1113 without any warranty. 1114 1115_ATEOF 1116 exit $at_write_fail 1117fi 1118 1119# Should we print banners? Yes if more than one test is run. 1120case $at_groups in #( 1121 *$as_nl* ) 1122 at_print_banners=: ;; #( 1123 * ) at_print_banners=false ;; 1124esac 1125# Text for banner N, set to a single space once printed. 1126# Banner 1. testsuite.at:25 1127# Category starts at test group 1. 1128at_banner_text_1="Command Line Options" 1129# Banner 2. testsuite.at:28 1130# Category starts at test group 10. 1131at_banner_text_2="Basic Read/Write Check" 1132# Banner 3. testsuite.at:31 1133# Category starts at test group 14. 1134at_banner_text_3="Parsing INFO2" 1135# Banner 4. testsuite.at:34 1136# Category starts at test group 24. 1137at_banner_text_4="Parsing \$Recycle.bin folder" 1138# Banner 5. testsuite.at:37 1139# Category starts at test group 29. 1140at_banner_text_5="Parse faulty or crafted folder" 1141# Banner 6. testsuite.at:40 1142# Category starts at test group 32. 1143at_banner_text_6="Character Encoding Tests" 1144# Banner 7. testsuite.at:43 1145# Category starts at test group 38. 1146at_banner_text_7="XML Validation" 1147 1148# Take any -C into account. 1149if $at_change_dir ; then 1150 test x != "x$at_dir" && cd "$at_dir" \ 1151 || as_fn_error $? "unable to change directory" 1152 at_dir=`pwd` 1153fi 1154 1155# Load the config files for any default variable assignments. 1156for at_file in atconfig atlocal 1157do 1158 test -r $at_file || continue 1159 . ./$at_file || as_fn_error $? "invalid content: $at_file" 1160done 1161 1162# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: 1163: "${at_top_build_prefix=$at_top_builddir}" 1164 1165# Perform any assignments requested during argument parsing. 1166eval "$at_debug_args" 1167 1168# atconfig delivers names relative to the directory the test suite is 1169# in, but the groups themselves are run in testsuite-dir/group-dir. 1170if test -n "$at_top_srcdir"; then 1171 builddir=../.. 1172 for at_dir_var in srcdir top_srcdir top_build_prefix 1173 do 1174 eval at_val=\$at_$at_dir_var 1175 case $at_val in 1176 [\\/$]* | ?:[\\/]* ) at_prefix= ;; 1177 *) at_prefix=../../ ;; 1178 esac 1179 eval "$at_dir_var=\$at_prefix\$at_val" 1180 done 1181fi 1182 1183## -------------------- ## 1184## Directory structure. ## 1185## -------------------- ## 1186 1187# This is the set of directories and files used by this script 1188# (non-literals are capitalized): 1189# 1190# TESTSUITE - the testsuite 1191# TESTSUITE.log - summarizes the complete testsuite run 1192# TESTSUITE.dir/ - created during a run, remains after -d or failed test 1193# + at-groups/ - during a run: status of all groups in run 1194# | + NNN/ - during a run: meta-data about test group NNN 1195# | | + check-line - location (source file and line) of current AT_CHECK 1196# | | + status - exit status of current AT_CHECK 1197# | | + stdout - stdout of current AT_CHECK 1198# | | + stder1 - stderr, including trace 1199# | | + stderr - stderr, with trace filtered out 1200# | | + test-source - portion of testsuite that defines group 1201# | | + times - timestamps for computing duration 1202# | | + pass - created if group passed 1203# | | + xpass - created if group xpassed 1204# | | + fail - created if group failed 1205# | | + xfail - created if group xfailed 1206# | | + skip - created if group skipped 1207# + at-stop - during a run: end the run if this file exists 1208# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction 1209# + 0..NNN/ - created for each group NNN, remains after -d or failed test 1210# | + TESTSUITE.log - summarizes the group results 1211# | + ... - files created during the group 1212 1213# The directory the whole suite works in. 1214# Should be absolute to let the user `cd' at will. 1215at_suite_dir=$at_dir/$as_me.dir 1216# The file containing the suite ($at_dir might have changed since earlier). 1217at_suite_log=$at_dir/$as_me.log 1218# The directory containing helper files per test group. 1219at_helper_dir=$at_suite_dir/at-groups 1220# Stop file: if it exists, do not start new jobs. 1221at_stop_file=$at_suite_dir/at-stop 1222# The fifo used for the job dispatcher. 1223at_job_fifo=$at_suite_dir/at-job-fifo 1224 1225if $at_clean; then 1226 test -d "$at_suite_dir" && 1227 find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1228 rm -f -r "$at_suite_dir" "$at_suite_log" 1229 exit $? 1230fi 1231 1232# Don't take risks: use only absolute directories in PATH. 1233# 1234# For stand-alone test suites (ie. atconfig was not found), 1235# AUTOTEST_PATH is relative to `.'. 1236# 1237# For embedded test suites, AUTOTEST_PATH is relative to the top level 1238# of the package. Then expand it into build/src parts, since users 1239# may create executables in both places. 1240AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` 1241at_path= 1242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1243for as_dir in $AUTOTEST_PATH $PATH 1244do 1245 IFS=$as_save_IFS 1246 test -z "$as_dir" && as_dir=. 1247 test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR 1248case $as_dir in 1249 [\\/]* | ?:[\\/]* ) 1250 as_fn_append at_path "$as_dir" 1251 ;; 1252 * ) 1253 if test -z "$at_top_build_prefix"; then 1254 # Stand-alone test suite. 1255 as_fn_append at_path "$as_dir" 1256 else 1257 # Embedded test suite. 1258 as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" 1259 as_fn_append at_path "$at_top_srcdir/$as_dir" 1260 fi 1261 ;; 1262esac 1263 done 1264IFS=$as_save_IFS 1265 1266 1267# Now build and simplify PATH. 1268# 1269# There might be directories that don't exist, but don't redirect 1270# builtins' (eg., cd) stderr directly: Ultrix's sh hates that. 1271at_new_path= 1272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1273for as_dir in $at_path 1274do 1275 IFS=$as_save_IFS 1276 test -z "$as_dir" && as_dir=. 1277 test -d "$as_dir" || continue 1278case $as_dir in 1279 [\\/]* | ?:[\\/]* ) ;; 1280 * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; 1281esac 1282case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in 1283 *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; 1284 $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; 1285 *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; 1286esac 1287 done 1288IFS=$as_save_IFS 1289 1290PATH=$at_new_path 1291export PATH 1292 1293# Setting up the FDs. 1294 1295 1296 1297# 5 is the log file. Not to be overwritten if `-d'. 1298if $at_debug_p; then 1299 at_suite_log=/dev/null 1300else 1301 : >"$at_suite_log" 1302fi 1303exec 5>>"$at_suite_log" 1304 1305# Banners and logs. 1306$as_echo "## -------------------------- ## 1307## rifiuti2 0.7.0 test suite. ## 1308## -------------------------- ##" 1309{ 1310 $as_echo "## -------------------------- ## 1311## rifiuti2 0.7.0 test suite. ## 1312## -------------------------- ##" 1313 echo 1314 1315 $as_echo "$as_me: command line was:" 1316 $as_echo " \$ $0 $at_cli_args" 1317 echo 1318 1319 # If ChangeLog exists, list a few lines in case it might help determining 1320 # the exact version. 1321 if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then 1322 $as_echo "## ---------- ## 1323## ChangeLog. ## 1324## ---------- ##" 1325 echo 1326 sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" 1327 echo 1328 fi 1329 1330 { 1331cat <<_ASUNAME 1332## --------- ## 1333## Platform. ## 1334## --------- ## 1335 1336hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1337uname -m = `(uname -m) 2>/dev/null || echo unknown` 1338uname -r = `(uname -r) 2>/dev/null || echo unknown` 1339uname -s = `(uname -s) 2>/dev/null || echo unknown` 1340uname -v = `(uname -v) 2>/dev/null || echo unknown` 1341 1342/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1343/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1344 1345/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1346/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1347/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1348/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1349/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1350/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1351/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1352 1353_ASUNAME 1354 1355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1356for as_dir in $PATH 1357do 1358 IFS=$as_save_IFS 1359 test -z "$as_dir" && as_dir=. 1360 $as_echo "PATH: $as_dir" 1361 done 1362IFS=$as_save_IFS 1363 1364} 1365 echo 1366 1367 # Contents of the config files. 1368 for at_file in atconfig atlocal 1369 do 1370 test -r $at_file || continue 1371 $as_echo "$as_me: $at_file:" 1372 sed 's/^/| /' $at_file 1373 echo 1374 done 1375} >&5 1376 1377 1378## ------------------------- ## 1379## Autotest shell functions. ## 1380## ------------------------- ## 1381 1382# at_fn_banner NUMBER 1383# ------------------- 1384# Output banner NUMBER, provided the testsuite is running multiple groups and 1385# this particular banner has not yet been printed. 1386at_fn_banner () 1387{ 1388 $at_print_banners || return 0 1389 eval at_banner_text=\$at_banner_text_$1 1390 test "x$at_banner_text" = "x " && return 0 1391 eval "at_banner_text_$1=\" \"" 1392 if test -z "$at_banner_text"; then 1393 $at_first || echo 1394 else 1395 $as_echo "$as_nl$at_banner_text$as_nl" 1396 fi 1397} # at_fn_banner 1398 1399# at_fn_check_prepare_notrace REASON LINE 1400# --------------------------------------- 1401# Perform AT_CHECK preparations for the command at LINE for an untraceable 1402# command; REASON is the reason for disabling tracing. 1403at_fn_check_prepare_notrace () 1404{ 1405 $at_trace_echo "Not enabling shell tracing (command contains $1)" 1406 $as_echo "$2" >"$at_check_line_file" 1407 at_check_trace=: at_check_filter=: 1408 : >"$at_stdout"; : >"$at_stderr" 1409} 1410 1411# at_fn_check_prepare_trace LINE 1412# ------------------------------ 1413# Perform AT_CHECK preparations for the command at LINE for a traceable 1414# command. 1415at_fn_check_prepare_trace () 1416{ 1417 $as_echo "$1" >"$at_check_line_file" 1418 at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace 1419 : >"$at_stdout"; : >"$at_stderr" 1420} 1421 1422# at_fn_check_prepare_dynamic COMMAND LINE 1423# ---------------------------------------- 1424# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate 1425# preparation function. 1426at_fn_check_prepare_dynamic () 1427{ 1428 case $1 in 1429 *$as_nl*) 1430 at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; 1431 *) 1432 at_fn_check_prepare_trace "$2" ;; 1433 esac 1434} 1435 1436# at_fn_filter_trace 1437# ------------------ 1438# Remove the lines in the file "$at_stderr" generated by "set -x" and print 1439# them to stderr. 1440at_fn_filter_trace () 1441{ 1442 mv "$at_stderr" "$at_stder1" 1443 grep '^ *+' "$at_stder1" >&2 1444 grep -v '^ *+' "$at_stder1" >"$at_stderr" 1445} 1446 1447# at_fn_log_failure FILE-LIST 1448# --------------------------- 1449# Copy the files in the list on stdout with a "> " prefix, and exit the shell 1450# with a failure exit code. 1451at_fn_log_failure () 1452{ 1453 for file 1454 do $as_echo "$file:"; sed 's/^/> /' "$file"; done 1455 echo 1 > "$at_status_file" 1456 exit 1 1457} 1458 1459# at_fn_check_skip EXIT-CODE LINE 1460# ------------------------------- 1461# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit 1462# the test group subshell with that same exit code. Use LINE in any report 1463# about test failure. 1464at_fn_check_skip () 1465{ 1466 case $1 in 1467 99) echo 99 > "$at_status_file"; at_failed=: 1468 $as_echo "$2: hard failure"; exit 99;; 1469 77) echo 77 > "$at_status_file"; exit 77;; 1470 esac 1471} 1472 1473# at_fn_check_status EXPECTED EXIT-CODE LINE 1474# ------------------------------------------ 1475# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. 1476# Otherwise, if it is 77 or 99, exit the test group subshell with that same 1477# exit code; if it is anything else print an error message referring to LINE, 1478# and fail the test. 1479at_fn_check_status () 1480{ 1481 case $2 in 1482 $1 ) ;; 1483 77) echo 77 > "$at_status_file"; exit 77;; 1484 99) echo 99 > "$at_status_file"; at_failed=: 1485 $as_echo "$3: hard failure"; exit 99;; 1486 *) $as_echo "$3: exit code was $2, expected $1" 1487 at_failed=:;; 1488 esac 1489} 1490 1491# at_fn_diff_devnull FILE 1492# ----------------------- 1493# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff 1494# invocations. 1495at_fn_diff_devnull () 1496{ 1497 test -s "$1" || return 0 1498 $at_diff "$at_devnull" "$1" 1499} 1500 1501# at_fn_test NUMBER 1502# ----------------- 1503# Parse out test NUMBER from the tail of this file. 1504at_fn_test () 1505{ 1506 eval at_sed=\$at_sed$1 1507 sed "$at_sed" "$at_myself" > "$at_test_source" 1508} 1509 1510# at_fn_create_debugging_script 1511# ----------------------------- 1512# Create the debugging script $at_group_dir/run which will reproduce the 1513# current test group. 1514at_fn_create_debugging_script () 1515{ 1516 { 1517 echo "#! /bin/sh" && 1518 echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && 1519 $as_echo "cd '$at_dir'" && 1520 $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && 1521 echo 'exit 1' 1522 } >"$at_group_dir/run" && 1523 chmod +x "$at_group_dir/run" 1524} 1525 1526## -------------------------------- ## 1527## End of autotest shell functions. ## 1528## -------------------------------- ## 1529{ 1530 $as_echo "## ---------------- ## 1531## Tested programs. ## 1532## ---------------- ##" 1533 echo 1534} >&5 1535 1536# Report what programs are being tested. 1537for at_program in : $at_tested 1538do 1539 test "$at_program" = : && continue 1540 case $at_program in 1541 [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; 1542 * ) 1543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1544for as_dir in $PATH 1545do 1546 IFS=$as_save_IFS 1547 test -z "$as_dir" && as_dir=. 1548 test -f "$as_dir/$at_program" && break 1549 done 1550IFS=$as_save_IFS 1551 1552 at_program_=$as_dir/$at_program ;; 1553 esac 1554 if test -f "$at_program_"; then 1555 { 1556 $as_echo "$at_srcdir/testsuite.at:6: $at_program_ --version" 1557 "$at_program_" --version </dev/null 1558 echo 1559 } >&5 2>&1 1560 else 1561 as_fn_error $? "cannot find $at_program" "$LINENO" 5 1562 fi 1563done 1564 1565{ 1566 $as_echo "## ------------------ ## 1567## Running the tests. ## 1568## ------------------ ##" 1569} >&5 1570 1571at_start_date=`date` 1572at_start_time=`date +%s 2>/dev/null` 1573$as_echo "$as_me: starting at: $at_start_date" >&5 1574 1575# Create the master directory if it doesn't already exist. 1576as_dir="$at_suite_dir"; as_fn_mkdir_p || 1577 as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 1578 1579# Can we diff with `/dev/null'? DU 5.0 refuses. 1580if diff /dev/null /dev/null >/dev/null 2>&1; then 1581 at_devnull=/dev/null 1582else 1583 at_devnull=$at_suite_dir/devnull 1584 >"$at_devnull" 1585fi 1586 1587# Use `diff -u' when possible. 1588if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" 1589then 1590 at_diff='diff -u' 1591else 1592 at_diff=diff 1593fi 1594 1595# Get the last needed group. 1596for at_group in : $at_groups; do :; done 1597 1598# Extract the start and end lines of each test group at the tail 1599# of this file 1600awk ' 1601BEGIN { FS="" } 1602/^#AT_START_/ { 1603 start = NR 1604} 1605/^#AT_STOP_/ { 1606 test = substr ($ 0, 10) 1607 print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" 1608 if (test == "'"$at_group"'") exit 1609}' "$at_myself" > "$at_suite_dir/at-source-lines" && 1610. "$at_suite_dir/at-source-lines" || 1611 as_fn_error $? "cannot create test line number cache" "$LINENO" 5 1612rm -f "$at_suite_dir/at-source-lines" 1613 1614# Set number of jobs for `-j'; avoid more jobs than test groups. 1615set X $at_groups; shift; at_max_jobs=$# 1616if test $at_max_jobs -eq 0; then 1617 at_jobs=1 1618fi 1619if test $at_jobs -ne 1 && 1620 { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then 1621 at_jobs=$at_max_jobs 1622fi 1623 1624# If parallel mode, don't output banners, don't split summary lines. 1625if test $at_jobs -ne 1; then 1626 at_print_banners=false 1627 at_quiet=: 1628fi 1629 1630# Set up helper dirs. 1631rm -rf "$at_helper_dir" && 1632mkdir "$at_helper_dir" && 1633cd "$at_helper_dir" && 1634{ test -z "$at_groups" || mkdir $at_groups; } || 1635as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 1636 1637# Functions for running a test group. We leave the actual 1638# test group execution outside of a shell function in order 1639# to avoid hitting zsh 4.x exit status bugs. 1640 1641# at_fn_group_prepare 1642# ------------------- 1643# Prepare for running a test group. 1644at_fn_group_prepare () 1645{ 1646 # The directory for additional per-group helper files. 1647 at_job_dir=$at_helper_dir/$at_group 1648 # The file containing the location of the last AT_CHECK. 1649 at_check_line_file=$at_job_dir/check-line 1650 # The file containing the exit status of the last command. 1651 at_status_file=$at_job_dir/status 1652 # The files containing the output of the tested commands. 1653 at_stdout=$at_job_dir/stdout 1654 at_stder1=$at_job_dir/stder1 1655 at_stderr=$at_job_dir/stderr 1656 # The file containing the code for a test group. 1657 at_test_source=$at_job_dir/test-source 1658 # The file containing dates. 1659 at_times_file=$at_job_dir/times 1660 1661 # Be sure to come back to the top test directory. 1662 cd "$at_suite_dir" 1663 1664 # Clearly separate the test groups when verbose. 1665 $at_first || $at_verbose echo 1666 1667 at_group_normalized=$at_group 1668 1669 eval 'while :; do 1670 case $at_group_normalized in #( 1671 '"$at_format"'*) break;; 1672 esac 1673 at_group_normalized=0$at_group_normalized 1674 done' 1675 1676 1677 # Create a fresh directory for the next test group, and enter. 1678 # If one already exists, the user may have invoked ./run from 1679 # within that directory; we remove the contents, but not the 1680 # directory itself, so that we aren't pulling the rug out from 1681 # under the shell's notion of the current directory. 1682 at_group_dir=$at_suite_dir/$at_group_normalized 1683 at_group_log=$at_group_dir/$as_me.log 1684 if test -d "$at_group_dir"; then 1685 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; 1686 rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* 1687fi || 1688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 1689$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} 1690 # Be tolerant if the above `rm' was not able to remove the directory. 1691 as_dir="$at_group_dir"; as_fn_mkdir_p 1692 1693 echo 0 > "$at_status_file" 1694 1695 # In verbose mode, append to the log file *and* show on 1696 # the standard output; in quiet mode only write to the log. 1697 if test -z "$at_verbose"; then 1698 at_tee_pipe='tee -a "$at_group_log"' 1699 else 1700 at_tee_pipe='cat >> "$at_group_log"' 1701 fi 1702} 1703 1704# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] 1705# ------------------------------------------------- 1706# Declare the test group ORDINAL, located at LINE with group description DESC, 1707# and residing under BANNER. Use PAD to align the status column. 1708at_fn_group_banner () 1709{ 1710 at_setup_line="$2" 1711 test -n "$5" && at_fn_banner $5 1712 at_desc="$3" 1713 case $1 in 1714 [0-9]) at_desc_line=" $1: ";; 1715 [0-9][0-9]) at_desc_line=" $1: " ;; 1716 *) at_desc_line="$1: " ;; 1717 esac 1718 as_fn_append at_desc_line "$3$4" 1719 $at_quiet $as_echo_n "$at_desc_line" 1720 echo "# -*- compilation -*-" >> "$at_group_log" 1721} 1722 1723# at_fn_group_postprocess 1724# ----------------------- 1725# Perform cleanup after running a test group. 1726at_fn_group_postprocess () 1727{ 1728 # Be sure to come back to the suite directory, in particular 1729 # since below we might `rm' the group directory we are in currently. 1730 cd "$at_suite_dir" 1731 1732 if test ! -f "$at_check_line_file"; then 1733 sed "s/^ */$as_me: WARNING: /" <<_ATEOF 1734 A failure happened in a test group before any test could be 1735 run. This means that test suite is improperly designed. Please 1736 report this failure to <https://github.com/abelcheung/rifiuti2/issues>. 1737_ATEOF 1738 $as_echo "$at_setup_line" >"$at_check_line_file" 1739 at_status=99 1740 fi 1741 $at_verbose $as_echo_n "$at_group. $at_setup_line: " 1742 $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" 1743 case $at_xfail:$at_status in 1744 yes:0) 1745 at_msg="UNEXPECTED PASS" 1746 at_res=xpass 1747 at_errexit=$at_errexit_p 1748 at_color=$at_red 1749 ;; 1750 no:0) 1751 at_msg="ok" 1752 at_res=pass 1753 at_errexit=false 1754 at_color=$at_grn 1755 ;; 1756 *:77) 1757 at_msg='skipped ('`cat "$at_check_line_file"`')' 1758 at_res=skip 1759 at_errexit=false 1760 at_color=$at_blu 1761 ;; 1762 no:* | *:99) 1763 at_msg='FAILED ('`cat "$at_check_line_file"`')' 1764 at_res=fail 1765 at_errexit=$at_errexit_p 1766 at_color=$at_red 1767 ;; 1768 yes:*) 1769 at_msg='expected failure ('`cat "$at_check_line_file"`')' 1770 at_res=xfail 1771 at_errexit=false 1772 at_color=$at_lgn 1773 ;; 1774 esac 1775 echo "$at_res" > "$at_job_dir/$at_res" 1776 # In parallel mode, output the summary line only afterwards. 1777 if test $at_jobs -ne 1 && test -n "$at_verbose"; then 1778 $as_echo "$at_desc_line $at_color$at_msg$at_std" 1779 else 1780 # Make sure there is a separator even with long titles. 1781 $as_echo " $at_color$at_msg$at_std" 1782 fi 1783 at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" 1784 case $at_status in 1785 0|77) 1786 # $at_times_file is only available if the group succeeded. 1787 # We're not including the group log, so the success message 1788 # is written in the global log separately. But we also 1789 # write to the group log in case they're using -d. 1790 if test -f "$at_times_file"; then 1791 at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' 1792 rm -f "$at_times_file" 1793 fi 1794 $as_echo "$at_log_msg" >> "$at_group_log" 1795 $as_echo "$at_log_msg" >&5 1796 1797 # Cleanup the group directory, unless the user wants the files 1798 # or the success was unexpected. 1799 if $at_debug_p || test $at_res = xpass; then 1800 at_fn_create_debugging_script 1801 if test $at_res = xpass && $at_errexit; then 1802 echo stop > "$at_stop_file" 1803 fi 1804 else 1805 if test -d "$at_group_dir"; then 1806 find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; 1807 rm -fr "$at_group_dir" 1808 fi 1809 rm -f "$at_test_source" 1810 fi 1811 ;; 1812 *) 1813 # Upon failure, include the log into the testsuite's global 1814 # log. The failure message is written in the group log. It 1815 # is later included in the global log. 1816 $as_echo "$at_log_msg" >> "$at_group_log" 1817 1818 # Upon failure, keep the group directory for autopsy, and create 1819 # the debugging script. With -e, do not start any further tests. 1820 at_fn_create_debugging_script 1821 if $at_errexit; then 1822 echo stop > "$at_stop_file" 1823 fi 1824 ;; 1825 esac 1826} 1827 1828 1829## ------------ ## 1830## Driver loop. ## 1831## ------------ ## 1832 1833 1834if (set -m && set +m && set +b) >/dev/null 2>&1; then 1835 set +b 1836 at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- 1837else 1838 at_job_control_on=: at_job_control_off=: at_job_group= 1839fi 1840 1841for at_signal in 1 2 15; do 1842 trap 'set +x; set +e 1843 $at_job_control_off 1844 at_signal='"$at_signal"' 1845 echo stop > "$at_stop_file" 1846 trap "" $at_signal 1847 at_pgids= 1848 for at_pgid in `jobs -p 2>/dev/null`; do 1849 at_pgids="$at_pgids $at_job_group$at_pgid" 1850 done 1851 test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null 1852 wait 1853 if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then 1854 echo >&2 1855 fi 1856 at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` 1857 set x $at_signame 1858 test 0 -gt 2 && at_signame=$at_signal 1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 1860$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} 1861 as_fn_arith 128 + $at_signal && exit_status=$as_val 1862 as_fn_exit $exit_status' $at_signal 1863done 1864 1865rm -f "$at_stop_file" 1866at_first=: 1867 1868if test $at_jobs -ne 1 && 1869 rm -f "$at_job_fifo" && 1870 test -n "$at_job_group" && 1871 ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null 1872then 1873 # FIFO job dispatcher. 1874 1875 trap 'at_pids= 1876 for at_pid in `jobs -p`; do 1877 at_pids="$at_pids $at_job_group$at_pid" 1878 done 1879 if test -n "$at_pids"; then 1880 at_sig=TSTP 1881 test "${TMOUT+set}" = set && at_sig=STOP 1882 kill -$at_sig $at_pids 2>/dev/null 1883 fi 1884 kill -STOP $$ 1885 test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP 1886 1887 echo 1888 # Turn jobs into a list of numbers, starting from 1. 1889 at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` 1890 1891 set X $at_joblist 1892 shift 1893 for at_group in $at_groups; do 1894 $at_job_control_on 2>/dev/null 1895 ( 1896 # Start one test group. 1897 $at_job_control_off 1898 if $at_first; then 1899 exec 7>"$at_job_fifo" 1900 else 1901 exec 6<&- 1902 fi 1903 trap 'set +x; set +e 1904 trap "" PIPE 1905 echo stop > "$at_stop_file" 1906 echo >&7 1907 as_fn_exit 141' PIPE 1908 at_fn_group_prepare 1909 if cd "$at_group_dir" && 1910 at_fn_test $at_group && 1911 . "$at_test_source" 1912 then :; else 1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1914$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1915 at_failed=: 1916 fi 1917 at_fn_group_postprocess 1918 echo >&7 1919 ) & 1920 $at_job_control_off 1921 if $at_first; then 1922 at_first=false 1923 exec 6<"$at_job_fifo" 7>"$at_job_fifo" 1924 fi 1925 shift # Consume one token. 1926 if test $# -gt 0; then :; else 1927 read at_token <&6 || break 1928 set x $* 1929 fi 1930 test -f "$at_stop_file" && break 1931 done 1932 exec 7>&- 1933 # Read back the remaining ($at_jobs - 1) tokens. 1934 set X $at_joblist 1935 shift 1936 if test $# -gt 0; then 1937 shift 1938 for at_job 1939 do 1940 read at_token 1941 done <&6 1942 fi 1943 exec 6<&- 1944 wait 1945else 1946 # Run serially, avoid forks and other potential surprises. 1947 for at_group in $at_groups; do 1948 at_fn_group_prepare 1949 if cd "$at_group_dir" && 1950 at_fn_test $at_group && 1951 . "$at_test_source"; then :; else 1952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 1953$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} 1954 at_failed=: 1955 fi 1956 at_fn_group_postprocess 1957 test -f "$at_stop_file" && break 1958 at_first=false 1959 done 1960fi 1961 1962# Wrap up the test suite with summary statistics. 1963cd "$at_helper_dir" 1964 1965# Use ?..???? when the list must remain sorted, the faster * otherwise. 1966at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` 1967at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` 1968at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` 1969at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do 1970 echo $f; done | sed '/?/d; s,/xpass,,'` 1971at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do 1972 echo $f; done | sed '/?/d; s,/fail,,'` 1973 1974set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list 1975shift; at_group_count=$# 1976set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* 1977set X $at_xfail_list; shift; at_xfail_count=$# 1978set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* 1979set X $at_skip_list; shift; at_skip_count=$# 1980 1981as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val 1982as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val 1983as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val 1984 1985# Back to the top directory. 1986cd "$at_dir" 1987rm -rf "$at_helper_dir" 1988 1989# Compute the duration of the suite. 1990at_stop_date=`date` 1991at_stop_time=`date +%s 2>/dev/null` 1992$as_echo "$as_me: ending at: $at_stop_date" >&5 1993case $at_start_time,$at_stop_time in 1994 [0-9]*,[0-9]*) 1995 as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val 1996 as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val 1997 as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val 1998 as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val 1999 as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val 2000 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" 2001 $as_echo "$as_me: test suite duration: $at_duration" >&5 2002 ;; 2003esac 2004 2005echo 2006$as_echo "## ------------- ## 2007## Test results. ## 2008## ------------- ##" 2009echo 2010{ 2011 echo 2012 $as_echo "## ------------- ## 2013## Test results. ## 2014## ------------- ##" 2015 echo 2016} >&5 2017 2018if test $at_run_count = 1; then 2019 at_result="1 test" 2020 at_were=was 2021else 2022 at_result="$at_run_count tests" 2023 at_were=were 2024fi 2025if $at_errexit_p && test $at_unexpected_count != 0; then 2026 if test $at_xpass_count = 1; then 2027 at_result="$at_result $at_were run, one passed" 2028 else 2029 at_result="$at_result $at_were run, one failed" 2030 fi 2031 at_result="$at_result unexpectedly and inhibited subsequent tests." 2032 at_color=$at_red 2033else 2034 # Don't you just love exponential explosion of the number of cases? 2035 at_color=$at_red 2036 case $at_xpass_count:$at_fail_count:$at_xfail_count in 2037 # So far, so good. 2038 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; 2039 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; 2040 2041 # Some unexpected failures 2042 0:*:0) at_result="$at_result $at_were run, 2043$at_fail_count failed unexpectedly." ;; 2044 2045 # Some failures, both expected and unexpected 2046 0:*:1) at_result="$at_result $at_were run, 2047$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 2048 0:*:*) at_result="$at_result $at_were run, 2049$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 2050 2051 # No unexpected failures, but some xpasses 2052 *:0:*) at_result="$at_result $at_were run, 2053$at_xpass_count passed unexpectedly." ;; 2054 2055 # No expected failures, but failures and xpasses 2056 *:1:0) at_result="$at_result $at_were run, 2057$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; 2058 *:*:0) at_result="$at_result $at_were run, 2059$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; 2060 2061 # All of them. 2062 *:*:1) at_result="$at_result $at_were run, 2063$at_xpass_count passed unexpectedly, 2064$at_total_fail_count failed ($at_xfail_count expected failure)." ;; 2065 *:*:*) at_result="$at_result $at_were run, 2066$at_xpass_count passed unexpectedly, 2067$at_total_fail_count failed ($at_xfail_count expected failures)." ;; 2068 esac 2069 2070 if test $at_skip_count = 0 && test $at_run_count -gt 1; then 2071 at_result="All $at_result" 2072 fi 2073fi 2074 2075# Now put skips in the mix. 2076case $at_skip_count in 2077 0) ;; 2078 1) at_result="$at_result 20791 test was skipped." ;; 2080 *) at_result="$at_result 2081$at_skip_count tests were skipped." ;; 2082esac 2083 2084if test $at_unexpected_count = 0; then 2085 echo "$at_color$at_result$at_std" 2086 echo "$at_result" >&5 2087else 2088 echo "${at_color}ERROR: $at_result$at_std" >&2 2089 echo "ERROR: $at_result" >&5 2090 { 2091 echo 2092 $as_echo "## ------------------------ ## 2093## Summary of the failures. ## 2094## ------------------------ ##" 2095 2096 # Summary of failed and skipped tests. 2097 if test $at_fail_count != 0; then 2098 echo "Failed tests:" 2099 $SHELL "$at_myself" $at_fail_list --list 2100 echo 2101 fi 2102 if test $at_skip_count != 0; then 2103 echo "Skipped tests:" 2104 $SHELL "$at_myself" $at_skip_list --list 2105 echo 2106 fi 2107 if test $at_xpass_count != 0; then 2108 echo "Unexpected passes:" 2109 $SHELL "$at_myself" $at_xpass_list --list 2110 echo 2111 fi 2112 if test $at_fail_count != 0; then 2113 $as_echo "## ---------------------- ## 2114## Detailed failed tests. ## 2115## ---------------------- ##" 2116 echo 2117 for at_group in $at_fail_list 2118 do 2119 at_group_normalized=$at_group 2120 2121 eval 'while :; do 2122 case $at_group_normalized in #( 2123 '"$at_format"'*) break;; 2124 esac 2125 at_group_normalized=0$at_group_normalized 2126 done' 2127 2128 cat "$at_suite_dir/$at_group_normalized/$as_me.log" 2129 echo 2130 done 2131 echo 2132 fi 2133 if test -n "$at_top_srcdir"; then 2134 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2135## ${at_top_build_prefix}config.log ## 2136_ASBOX 2137 sed 's/^/| /' ${at_top_build_prefix}config.log 2138 echo 2139 fi 2140 } >&5 2141 2142 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2143## $as_me.log was created. ## 2144_ASBOX 2145 2146 echo 2147 if $at_debug_p; then 2148 at_msg='per-test log files' 2149 else 2150 at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" 2151 fi 2152 $as_echo "Please send $at_msg and all information you think might help: 2153 2154 To: <https://github.com/abelcheung/rifiuti2/issues> 2155 Subject: [rifiuti2 0.7.0] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} 2156 2157You may investigate any problem if you feel able to do so, in which 2158case the test suite provides a good starting point. Its output may 2159be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. 2160" 2161 exit 1 2162fi 2163 2164exit 0 2165 2166## ------------- ## 2167## Actual tests. ## 2168## ------------- ## 2169#AT_START_1 2170at_fn_group_banner 1 'test_cli_option.at:6' \ 2171 "Short Options" " " 1 2172at_xfail=no 2173( 2174 $as_echo "1. $at_setup_line: testing $at_desc ..." 2175 $at_traceon 2176 2177 2178 { set +x 2179$as_echo "$at_srcdir/test_cli_option.at:8: \$progf -?" 2180at_fn_check_prepare_dynamic "$progf -?" "test_cli_option.at:8" 2181( $at_check_trace; $progf -? 2182) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2183at_status=$? at_failed=false 2184$at_check_filter 2185echo stderr:; cat "$at_stderr" 2186echo stdout:; cat "$at_stdout" 2187at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:8" 2188$at_failed && at_fn_log_failure 2189$at_traceon; } 2190 2191 { set +x 2192$as_echo "$at_srcdir/test_cli_option.at:8: \$progd -?" 2193at_fn_check_prepare_dynamic "$progd -?" "test_cli_option.at:8" 2194( $at_check_trace; $progd -? 2195) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2196at_status=$? at_failed=false 2197$at_check_filter 2198echo stderr:; cat "$at_stderr" 2199echo stdout:; cat "$at_stdout" 2200at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:8" 2201$at_failed && at_fn_log_failure 2202$at_traceon; } 2203 2204 2205 { set +x 2206$as_echo "$at_srcdir/test_cli_option.at:9: \$progf -v" 2207at_fn_check_prepare_dynamic "$progf -v" "test_cli_option.at:9" 2208( $at_check_trace; $progf -v 2209) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2210at_status=$? at_failed=false 2211$at_check_filter 2212echo stderr:; cat "$at_stderr" 2213echo stdout:; cat "$at_stdout" 2214at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:9" 2215$at_failed && at_fn_log_failure 2216$at_traceon; } 2217 2218 { set +x 2219$as_echo "$at_srcdir/test_cli_option.at:9: \$progd -v" 2220at_fn_check_prepare_dynamic "$progd -v" "test_cli_option.at:9" 2221( $at_check_trace; $progd -v 2222) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2223at_status=$? at_failed=false 2224$at_check_filter 2225echo stderr:; cat "$at_stderr" 2226echo stdout:; cat "$at_stdout" 2227at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:9" 2228$at_failed && at_fn_log_failure 2229$at_traceon; } 2230 2231 2232 { set +x 2233$as_echo "$at_srcdir/test_cli_option.at:10: \$progf -t : \$sample/INFO2-empty" 2234at_fn_check_prepare_dynamic "$progf -t : $sample/INFO2-empty" "test_cli_option.at:10" 2235( $at_check_trace; $progf -t : $sample/INFO2-empty 2236) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2237at_status=$? at_failed=false 2238$at_check_filter 2239echo stderr:; cat "$at_stderr" 2240echo stdout:; cat "$at_stdout" 2241at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:10" 2242$at_failed && at_fn_log_failure 2243$at_traceon; } 2244 2245 { set +x 2246$as_echo "$at_srcdir/test_cli_option.at:10: \$progd -t : \$sample/dir-empty " 2247at_fn_check_prepare_dynamic "$progd -t : $sample/dir-empty " "test_cli_option.at:10" 2248( $at_check_trace; $progd -t : $sample/dir-empty 2249) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2250at_status=$? at_failed=false 2251$at_check_filter 2252echo stderr:; cat "$at_stderr" 2253echo stdout:; cat "$at_stdout" 2254at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:10" 2255$at_failed && at_fn_log_failure 2256$at_traceon; } 2257 2258 2259 { set +x 2260$as_echo "$at_srcdir/test_cli_option.at:11: \$progf -n \$sample/INFO2-empty" 2261at_fn_check_prepare_dynamic "$progf -n $sample/INFO2-empty" "test_cli_option.at:11" 2262( $at_check_trace; $progf -n $sample/INFO2-empty 2263) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2264at_status=$? at_failed=false 2265$at_check_filter 2266echo stderr:; cat "$at_stderr" 2267echo stdout:; cat "$at_stdout" 2268at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:11" 2269$at_failed && at_fn_log_failure 2270$at_traceon; } 2271 2272 { set +x 2273$as_echo "$at_srcdir/test_cli_option.at:11: \$progd -n \$sample/dir-empty " 2274at_fn_check_prepare_dynamic "$progd -n $sample/dir-empty " "test_cli_option.at:11" 2275( $at_check_trace; $progd -n $sample/dir-empty 2276) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2277at_status=$? at_failed=false 2278$at_check_filter 2279echo stderr:; cat "$at_stderr" 2280echo stdout:; cat "$at_stdout" 2281at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:11" 2282$at_failed && at_fn_log_failure 2283$at_traceon; } 2284 2285 2286 set +x 2287 $at_times_p && times >"$at_times_file" 2288) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2289read at_status <"$at_status_file" 2290#AT_STOP_1 2291#AT_START_2 2292at_fn_group_banner 2 'test_cli_option.at:14' \ 2293 "Long Options" " " 1 2294at_xfail=no 2295( 2296 $as_echo "2. $at_setup_line: testing $at_desc ..." 2297 $at_traceon 2298 2299 2300 { set +x 2301$as_echo "$at_srcdir/test_cli_option.at:16: \$progf --help-all" 2302at_fn_check_prepare_dynamic "$progf --help-all" "test_cli_option.at:16" 2303( $at_check_trace; $progf --help-all 2304) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2305at_status=$? at_failed=false 2306$at_check_filter 2307echo stderr:; cat "$at_stderr" 2308echo stdout:; cat "$at_stdout" 2309at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:16" 2310$at_failed && at_fn_log_failure 2311$at_traceon; } 2312 2313 { set +x 2314$as_echo "$at_srcdir/test_cli_option.at:16: \$progd --help-all" 2315at_fn_check_prepare_dynamic "$progd --help-all" "test_cli_option.at:16" 2316( $at_check_trace; $progd --help-all 2317) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2318at_status=$? at_failed=false 2319$at_check_filter 2320echo stderr:; cat "$at_stderr" 2321echo stdout:; cat "$at_stdout" 2322at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:16" 2323$at_failed && at_fn_log_failure 2324$at_traceon; } 2325 2326 2327 { set +x 2328$as_echo "$at_srcdir/test_cli_option.at:17: \$progf --delimiter=: \$sample/INFO2-empty" 2329at_fn_check_prepare_dynamic "$progf --delimiter=: $sample/INFO2-empty" "test_cli_option.at:17" 2330( $at_check_trace; $progf --delimiter=: $sample/INFO2-empty 2331) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2332at_status=$? at_failed=false 2333$at_check_filter 2334echo stderr:; cat "$at_stderr" 2335echo stdout:; cat "$at_stdout" 2336at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:17" 2337$at_failed && at_fn_log_failure 2338$at_traceon; } 2339 2340 { set +x 2341$as_echo "$at_srcdir/test_cli_option.at:17: \$progd --delimiter=: \$sample/dir-empty " 2342at_fn_check_prepare_dynamic "$progd --delimiter=: $sample/dir-empty " "test_cli_option.at:17" 2343( $at_check_trace; $progd --delimiter=: $sample/dir-empty 2344) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2345at_status=$? at_failed=false 2346$at_check_filter 2347echo stderr:; cat "$at_stderr" 2348echo stdout:; cat "$at_stdout" 2349at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:17" 2350$at_failed && at_fn_log_failure 2351$at_traceon; } 2352 2353 2354 { set +x 2355$as_echo "$at_srcdir/test_cli_option.at:18: \$progf --no-heading \$sample/INFO2-empty" 2356at_fn_check_prepare_dynamic "$progf --no-heading $sample/INFO2-empty" "test_cli_option.at:18" 2357( $at_check_trace; $progf --no-heading $sample/INFO2-empty 2358) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2359at_status=$? at_failed=false 2360$at_check_filter 2361echo stderr:; cat "$at_stderr" 2362echo stdout:; cat "$at_stdout" 2363at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:18" 2364$at_failed && at_fn_log_failure 2365$at_traceon; } 2366 2367 { set +x 2368$as_echo "$at_srcdir/test_cli_option.at:18: \$progd --no-heading \$sample/dir-empty " 2369at_fn_check_prepare_dynamic "$progd --no-heading $sample/dir-empty " "test_cli_option.at:18" 2370( $at_check_trace; $progd --no-heading $sample/dir-empty 2371) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2372at_status=$? at_failed=false 2373$at_check_filter 2374echo stderr:; cat "$at_stderr" 2375echo stdout:; cat "$at_stdout" 2376at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:18" 2377$at_failed && at_fn_log_failure 2378$at_traceon; } 2379 2380 2381 set +x 2382 $at_times_p && times >"$at_times_file" 2383) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2384read at_status <"$at_status_file" 2385#AT_STOP_2 2386#AT_START_3 2387at_fn_group_banner 3 'test_cli_option.at:21' \ 2388 "Invalid options" " " 1 2389at_xfail=no 2390( 2391 $as_echo "3. $at_setup_line: testing $at_desc ..." 2392 $at_traceon 2393 2394 2395 { set +x 2396$as_echo "$at_srcdir/test_cli_option.at:23: \$progf --invalid-option \$sample/INFO2-empty" 2397at_fn_check_prepare_dynamic "$progf --invalid-option $sample/INFO2-empty" "test_cli_option.at:23" 2398( $at_check_trace; $progf --invalid-option $sample/INFO2-empty 2399) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2400at_status=$? at_failed=false 2401$at_check_filter 2402echo stderr:; cat "$at_stderr" 2403echo stdout:; cat "$at_stdout" 2404at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:23" 2405$at_failed && at_fn_log_failure 2406$at_traceon; } 2407 2408 { set +x 2409$as_echo "$at_srcdir/test_cli_option.at:23: \$progd --invalid-option \$sample/dir-empty " 2410at_fn_check_prepare_dynamic "$progd --invalid-option $sample/dir-empty " "test_cli_option.at:23" 2411( $at_check_trace; $progd --invalid-option $sample/dir-empty 2412) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2413at_status=$? at_failed=false 2414$at_check_filter 2415echo stderr:; cat "$at_stderr" 2416echo stdout:; cat "$at_stdout" 2417at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:23" 2418$at_failed && at_fn_log_failure 2419$at_traceon; } 2420 2421 2422 2423_ax_at_check_pattern_prepare_original_at_diff="$at_diff" 2424at_diff='ax_at_diff_pattern' 2425{ set +x 2426$as_echo "$at_srcdir/test_cli_option.at:24: \$progf -l foobar \$sample/INFO2-sample2" 2427at_fn_check_prepare_dynamic " $progf -l foobar $sample/INFO2-sample2" "test_cli_option.at:24" 2428( $at_check_trace; $progf -l foobar $sample/INFO2-sample2 2429) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2430at_status=$? at_failed=false 2431$at_check_filter 2432echo >>"$at_stderr"; $as_echo "Error parsing options: 'foobar' encoding is not supported by glib library .* 2433 2434 https://.* 2435" | \ 2436 $at_diff - "$at_stderr" || at_failed=: 2437at_fn_diff_devnull "$at_stdout" || at_failed=: 2438at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:24" 2439if $at_failed; then : 2440 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 2441else 2442 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 2443fi 2444$at_failed && at_fn_log_failure 2445$at_traceon; } 2446 2447 2448 set +x 2449 $at_times_p && times >"$at_times_file" 2450) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2451read at_status <"$at_status_file" 2452#AT_STOP_3 2453#AT_START_4 2454at_fn_group_banner 4 'test_cli_option.at:32' \ 2455 "Duplicative options" " " 1 2456at_xfail=no 2457( 2458 $as_echo "4. $at_setup_line: testing $at_desc ..." 2459 $at_traceon 2460 2461 2462{ set +x 2463$as_echo "$at_srcdir/test_cli_option.at:34: \$progf -l ASCII -l CP1252 \$sample/INFO2-sample2" 2464at_fn_check_prepare_dynamic " $progf -l ASCII -l CP1252 $sample/INFO2-sample2" "test_cli_option.at:34" 2465( $at_check_trace; $progf -l ASCII -l CP1252 $sample/INFO2-sample2 2466) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2467at_status=$? at_failed=false 2468$at_check_filter 2469echo >>"$at_stderr"; $as_echo "Error parsing options: Multiple encoding options disallowed. 2470" | \ 2471 $at_diff - "$at_stderr" || at_failed=: 2472at_fn_diff_devnull "$at_stdout" || at_failed=: 2473at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:34" 2474$at_failed && at_fn_log_failure 2475$at_traceon; } 2476 2477 { set +x 2478$as_echo "$at_srcdir/test_cli_option.at:38: \$progf -t : -t , \$sample/INFO2-empty" 2479at_fn_check_prepare_dynamic "$progf -t : -t , $sample/INFO2-empty" "test_cli_option.at:38" 2480( $at_check_trace; $progf -t : -t , $sample/INFO2-empty 2481) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2482at_status=$? at_failed=false 2483$at_check_filter 2484echo >>"$at_stderr"; $as_echo "Error parsing options: Multiple delimiter options disallowed. 2485" | \ 2486 $at_diff - "$at_stderr" || at_failed=: 2487at_fn_diff_devnull "$at_stdout" || at_failed=: 2488at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:38" 2489$at_failed && at_fn_log_failure 2490$at_traceon; } 2491 2492 { set +x 2493$as_echo "$at_srcdir/test_cli_option.at:38: \$progd -t : -t , \$sample/dir-empty " 2494at_fn_check_prepare_dynamic "$progd -t : -t , $sample/dir-empty " "test_cli_option.at:38" 2495( $at_check_trace; $progd -t : -t , $sample/dir-empty 2496) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2497at_status=$? at_failed=false 2498$at_check_filter 2499echo >>"$at_stderr"; $as_echo "Error parsing options: Multiple delimiter options disallowed. 2500" | \ 2501 $at_diff - "$at_stderr" || at_failed=: 2502at_fn_diff_devnull "$at_stdout" || at_failed=: 2503at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:38" 2504$at_failed && at_fn_log_failure 2505$at_traceon; } 2506 2507 2508 { set +x 2509$as_echo "$at_srcdir/test_cli_option.at:41: \$progf -o file1 -o file2 \$sample/INFO2-empty" 2510at_fn_check_prepare_dynamic "$progf -o file1 -o file2 $sample/INFO2-empty" "test_cli_option.at:41" 2511( $at_check_trace; $progf -o file1 -o file2 $sample/INFO2-empty 2512) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2513at_status=$? at_failed=false 2514$at_check_filter 2515echo >>"$at_stderr"; $as_echo "Error parsing options: Multiple output destinations disallowed. 2516" | \ 2517 $at_diff - "$at_stderr" || at_failed=: 2518at_fn_diff_devnull "$at_stdout" || at_failed=: 2519at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:41" 2520$at_failed && at_fn_log_failure 2521$at_traceon; } 2522 2523 { set +x 2524$as_echo "$at_srcdir/test_cli_option.at:41: \$progd -o file1 -o file2 \$sample/dir-empty " 2525at_fn_check_prepare_dynamic "$progd -o file1 -o file2 $sample/dir-empty " "test_cli_option.at:41" 2526( $at_check_trace; $progd -o file1 -o file2 $sample/dir-empty 2527) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2528at_status=$? at_failed=false 2529$at_check_filter 2530echo >>"$at_stderr"; $as_echo "Error parsing options: Multiple output destinations disallowed. 2531" | \ 2532 $at_diff - "$at_stderr" || at_failed=: 2533at_fn_diff_devnull "$at_stdout" || at_failed=: 2534at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:41" 2535$at_failed && at_fn_log_failure 2536$at_traceon; } 2537 2538 2539 set +x 2540 $at_times_p && times >"$at_times_file" 2541) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2542read at_status <"$at_status_file" 2543#AT_STOP_4 2544#AT_START_5 2545at_fn_group_banner 5 'test_cli_option.at:46' \ 2546 "Options with empty arg" " " 1 2547at_xfail=no 2548( 2549 $as_echo "5. $at_setup_line: testing $at_desc ..." 2550 $at_traceon 2551 2552 2553 { set +x 2554$as_echo "$at_srcdir/test_cli_option.at:48: \$progf -o \"\" \$sample/INFO2-empty" 2555at_fn_check_prepare_dynamic "$progf -o \"\" $sample/INFO2-empty" "test_cli_option.at:48" 2556( $at_check_trace; $progf -o "" $sample/INFO2-empty 2557) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2558at_status=$? at_failed=false 2559$at_check_filter 2560echo >>"$at_stderr"; $as_echo "Error parsing options: Empty output filename disallowed. 2561" | \ 2562 $at_diff - "$at_stderr" || at_failed=: 2563at_fn_diff_devnull "$at_stdout" || at_failed=: 2564at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:48" 2565$at_failed && at_fn_log_failure 2566$at_traceon; } 2567 2568 { set +x 2569$as_echo "$at_srcdir/test_cli_option.at:48: \$progd -o \"\" \$sample/dir-empty " 2570at_fn_check_prepare_dynamic "$progd -o \"\" $sample/dir-empty " "test_cli_option.at:48" 2571( $at_check_trace; $progd -o "" $sample/dir-empty 2572) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2573at_status=$? at_failed=false 2574$at_check_filter 2575echo >>"$at_stderr"; $as_echo "Error parsing options: Empty output filename disallowed. 2576" | \ 2577 $at_diff - "$at_stderr" || at_failed=: 2578at_fn_diff_devnull "$at_stdout" || at_failed=: 2579at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:48" 2580$at_failed && at_fn_log_failure 2581$at_traceon; } 2582 2583 2584{ set +x 2585$as_echo "$at_srcdir/test_cli_option.at:51: \$progf -l \"\" \$sample/INFO2-sample2" 2586at_fn_check_prepare_dynamic " $progf -l \"\" $sample/INFO2-sample2" "test_cli_option.at:51" 2587( $at_check_trace; $progf -l "" $sample/INFO2-sample2 2588) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2589at_status=$? at_failed=false 2590$at_check_filter 2591echo >>"$at_stderr"; $as_echo "Error parsing options: Empty encoding option disallowed. 2592" | \ 2593 $at_diff - "$at_stderr" || at_failed=: 2594at_fn_diff_devnull "$at_stdout" || at_failed=: 2595at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:51" 2596$at_failed && at_fn_log_failure 2597$at_traceon; } 2598 2599 set +x 2600 $at_times_p && times >"$at_times_file" 2601) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2602read at_status <"$at_status_file" 2603#AT_STOP_5 2604#AT_START_6 2605at_fn_group_banner 6 'test_cli_option.at:58' \ 2606 "Wrong combinations" " " 1 2607at_xfail=no 2608( 2609 $as_echo "6. $at_setup_line: testing $at_desc ..." 2610 $at_traceon 2611 2612 2613 { set +x 2614$as_echo "$at_srcdir/test_cli_option.at:60: \$progf -x -t : \$sample/INFO2-empty" 2615at_fn_check_prepare_dynamic "$progf -x -t : $sample/INFO2-empty" "test_cli_option.at:60" 2616( $at_check_trace; $progf -x -t : $sample/INFO2-empty 2617) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2618at_status=$? at_failed=false 2619$at_check_filter 2620echo stderr:; cat "$at_stderr" 2621echo stdout:; cat "$at_stdout" 2622at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:60" 2623$at_failed && at_fn_log_failure 2624$at_traceon; } 2625 2626 { set +x 2627$as_echo "$at_srcdir/test_cli_option.at:60: \$progd -x -t : \$sample/dir-empty " 2628at_fn_check_prepare_dynamic "$progd -x -t : $sample/dir-empty " "test_cli_option.at:60" 2629( $at_check_trace; $progd -x -t : $sample/dir-empty 2630) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2631at_status=$? at_failed=false 2632$at_check_filter 2633echo stderr:; cat "$at_stderr" 2634echo stdout:; cat "$at_stdout" 2635at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:60" 2636$at_failed && at_fn_log_failure 2637$at_traceon; } 2638 2639 2640 { set +x 2641$as_echo "$at_srcdir/test_cli_option.at:61: \$progf -x -n \$sample/INFO2-empty" 2642at_fn_check_prepare_dynamic "$progf -x -n $sample/INFO2-empty" "test_cli_option.at:61" 2643( $at_check_trace; $progf -x -n $sample/INFO2-empty 2644) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2645at_status=$? at_failed=false 2646$at_check_filter 2647echo stderr:; cat "$at_stderr" 2648echo stdout:; cat "$at_stdout" 2649at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:61" 2650$at_failed && at_fn_log_failure 2651$at_traceon; } 2652 2653 { set +x 2654$as_echo "$at_srcdir/test_cli_option.at:61: \$progd -x -n \$sample/dir-empty " 2655at_fn_check_prepare_dynamic "$progd -x -n $sample/dir-empty " "test_cli_option.at:61" 2656( $at_check_trace; $progd -x -n $sample/dir-empty 2657) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2658at_status=$? at_failed=false 2659$at_check_filter 2660echo stderr:; cat "$at_stderr" 2661echo stdout:; cat "$at_stdout" 2662at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:61" 2663$at_failed && at_fn_log_failure 2664$at_traceon; } 2665 2666 2667 set +x 2668 $at_times_p && times >"$at_times_file" 2669) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2670read at_status <"$at_status_file" 2671#AT_STOP_6 2672#AT_START_7 2673at_fn_group_banner 7 'test_cli_option.at:65' \ 2674 "Err on no file args" " " 1 2675at_xfail=no 2676( 2677 $as_echo "7. $at_setup_line: testing $at_desc ..." 2678 $at_traceon 2679 2680 2681 { set +x 2682$as_echo "$at_srcdir/test_cli_option.at:67: \$progf -x" 2683at_fn_check_prepare_dynamic "$progf -x" "test_cli_option.at:67" 2684( $at_check_trace; $progf -x 2685) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2686at_status=$? at_failed=false 2687$at_check_filter 2688echo stderr:; cat "$at_stderr" 2689echo stdout:; cat "$at_stdout" 2690at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:67" 2691$at_failed && at_fn_log_failure 2692$at_traceon; } 2693 2694 { set +x 2695$as_echo "$at_srcdir/test_cli_option.at:67: \$progd -x" 2696at_fn_check_prepare_dynamic "$progd -x" "test_cli_option.at:67" 2697( $at_check_trace; $progd -x 2698) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2699at_status=$? at_failed=false 2700$at_check_filter 2701echo stderr:; cat "$at_stderr" 2702echo stdout:; cat "$at_stdout" 2703at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:67" 2704$at_failed && at_fn_log_failure 2705$at_traceon; } 2706 2707 2708 set +x 2709 $at_times_p && times >"$at_times_file" 2710) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2711read at_status <"$at_status_file" 2712#AT_STOP_7 2713#AT_START_8 2714at_fn_group_banner 8 'test_cli_option.at:71' \ 2715 "Err on multiple file args" " " 1 2716at_xfail=no 2717( 2718 $as_echo "8. $at_setup_line: testing $at_desc ..." 2719 $at_traceon 2720 2721 2722 { set +x 2723$as_echo "$at_srcdir/test_cli_option.at:73: \$progf foo bar baz" 2724at_fn_check_prepare_dynamic "$progf foo bar baz" "test_cli_option.at:73" 2725( $at_check_trace; $progf foo bar baz 2726) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2727at_status=$? at_failed=false 2728$at_check_filter 2729echo stderr:; cat "$at_stderr" 2730echo stdout:; cat "$at_stdout" 2731at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:73" 2732$at_failed && at_fn_log_failure 2733$at_traceon; } 2734 2735 { set +x 2736$as_echo "$at_srcdir/test_cli_option.at:73: \$progd foo bar baz" 2737at_fn_check_prepare_dynamic "$progd foo bar baz" "test_cli_option.at:73" 2738( $at_check_trace; $progd foo bar baz 2739) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2740at_status=$? at_failed=false 2741$at_check_filter 2742echo stderr:; cat "$at_stderr" 2743echo stdout:; cat "$at_stdout" 2744at_fn_check_status 1 $at_status "$at_srcdir/test_cli_option.at:73" 2745$at_failed && at_fn_log_failure 2746$at_traceon; } 2747 2748 2749 set +x 2750 $at_times_p && times >"$at_times_file" 2751) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2752read at_status <"$at_status_file" 2753#AT_STOP_8 2754#AT_START_9 2755at_fn_group_banner 9 'test_cli_option.at:76' \ 2756 "Escaped char in delimiter" " " 1 2757at_xfail=no 2758( 2759 $as_echo "9. $at_setup_line: testing $at_desc ..." 2760 $at_traceon 2761 2762 2763{ set +x 2764$as_echo "$at_srcdir/test_cli_option.at:78: 2765 \$awk '{ gsub(\"\\t\",\"\\n\\t\"); print; }' < \$sample/INFO2-sample1.txt > expout 2766 cd \$sample 2767 \$progf -t \"\\n\\t\" INFO2-sample1 2768" 2769at_fn_check_prepare_notrace 'an embedded newline' "test_cli_option.at:78" 2770( $at_check_trace; 2771 $awk '{ gsub("\t","\n\t"); print; }' < $sample/INFO2-sample1.txt > expout 2772 cd $sample 2773 $progf -t "\n\t" INFO2-sample1 2774 2775) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2776at_status=$? at_failed=false 2777$at_check_filter 2778at_fn_diff_devnull "$at_stderr" || at_failed=: 2779$at_diff expout "$at_stdout" || at_failed=: 2780at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:78" 2781$at_failed && at_fn_log_failure 2782$at_traceon; } 2783 2784{ set +x 2785$as_echo "$at_srcdir/test_cli_option.at:83: 2786 \$awk '{ gsub(\"\\t\",\"\\n\\t\"); print; }' < \$sample/dir-sample1.txt > expout 2787 cd \$sample 2788 \$progd -t \"\\n\\t\" dir-sample1 2789" 2790at_fn_check_prepare_notrace 'an embedded newline' "test_cli_option.at:83" 2791( $at_check_trace; 2792 $awk '{ gsub("\t","\n\t"); print; }' < $sample/dir-sample1.txt > expout 2793 cd $sample 2794 $progd -t "\n\t" dir-sample1 2795 2796) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2797at_status=$? at_failed=false 2798$at_check_filter 2799at_fn_diff_devnull "$at_stderr" || at_failed=: 2800$at_diff expout "$at_stdout" || at_failed=: 2801at_fn_check_status 0 $at_status "$at_srcdir/test_cli_option.at:83" 2802$at_failed && at_fn_log_failure 2803$at_traceon; } 2804 2805 set +x 2806 $at_times_p && times >"$at_times_file" 2807) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2808read at_status <"$at_status_file" 2809#AT_STOP_9 2810#AT_START_10 2811at_fn_group_banner 10 'test_read_write.at:6' \ 2812 "Err on non-existent input" " " 2 2813at_xfail=no 2814( 2815 $as_echo "10. $at_setup_line: testing $at_desc ..." 2816 $at_traceon 2817 2818 2819 { set +x 2820$as_echo "$at_srcdir/test_read_write.at:8: \$progf foobar" 2821at_fn_check_prepare_dynamic "$progf foobar" "test_read_write.at:8" 2822( $at_check_trace; $progf foobar 2823) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2824at_status=$? at_failed=false 2825$at_check_filter 2826echo stderr:; cat "$at_stderr" 2827echo stdout:; cat "$at_stdout" 2828at_fn_check_status 2 $at_status "$at_srcdir/test_read_write.at:8" 2829$at_failed && at_fn_log_failure 2830$at_traceon; } 2831 2832 { set +x 2833$as_echo "$at_srcdir/test_read_write.at:8: \$progd foobar" 2834at_fn_check_prepare_dynamic "$progd foobar" "test_read_write.at:8" 2835( $at_check_trace; $progd foobar 2836) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2837at_status=$? at_failed=false 2838$at_check_filter 2839echo stderr:; cat "$at_stderr" 2840echo stdout:; cat "$at_stdout" 2841at_fn_check_status 2 $at_status "$at_srcdir/test_read_write.at:8" 2842$at_failed && at_fn_log_failure 2843$at_traceon; } 2844 2845 2846 set +x 2847 $at_times_p && times >"$at_times_file" 2848) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2849read at_status <"$at_status_file" 2850#AT_STOP_10 2851#AT_START_11 2852at_fn_group_banner 11 'test_read_write.at:11' \ 2853 "Err on non-regular file" " " 2 2854at_xfail=no 2855( 2856 $as_echo "11. $at_setup_line: testing $at_desc ..." 2857 $at_traceon 2858 2859 2860 { set +x 2861$as_echo "$at_srcdir/test_read_write.at:13: \$progf /dev/zero" 2862at_fn_check_prepare_dynamic "$progf /dev/zero" "test_read_write.at:13" 2863( $at_check_trace; $progf /dev/zero 2864) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2865at_status=$? at_failed=false 2866$at_check_filter 2867echo stderr:; cat "$at_stderr" 2868echo stdout:; cat "$at_stdout" 2869at_fn_check_status 2 $at_status "$at_srcdir/test_read_write.at:13" 2870$at_failed && at_fn_log_failure 2871$at_traceon; } 2872 2873 { set +x 2874$as_echo "$at_srcdir/test_read_write.at:13: \$progd /dev/zero" 2875at_fn_check_prepare_dynamic "$progd /dev/zero" "test_read_write.at:13" 2876( $at_check_trace; $progd /dev/zero 2877) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2878at_status=$? at_failed=false 2879$at_check_filter 2880echo stderr:; cat "$at_stderr" 2881echo stdout:; cat "$at_stdout" 2882at_fn_check_status 2 $at_status "$at_srcdir/test_read_write.at:13" 2883$at_failed && at_fn_log_failure 2884$at_traceon; } 2885 2886 2887 set +x 2888 $at_times_p && times >"$at_times_file" 2889) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2890read at_status <"$at_status_file" 2891#AT_STOP_11 2892#AT_START_12 2893at_fn_group_banner 12 'test_read_write.at:20' \ 2894 "Err on non-regular file (Windows)" " " 2 2895at_xfail=no 2896( 2897 $as_echo "12. $at_setup_line: testing $at_desc ..." 2898 $at_traceon 2899 2900 2901$as_echo "test_read_write.at:22" >"$at_check_line_file" 2902(! $is_mingw) \ 2903 && at_fn_check_skip 77 "$at_srcdir/test_read_write.at:22" 2904 { set +x 2905$as_echo "$at_srcdir/test_read_write.at:23: \$progf nul" 2906at_fn_check_prepare_dynamic "$progf nul" "test_read_write.at:23" 2907( $at_check_trace; $progf nul 2908) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2909at_status=$? at_failed=false 2910$at_check_filter 2911echo stderr:; cat "$at_stderr" 2912echo stdout:; cat "$at_stdout" 2913at_fn_check_status 3 $at_status "$at_srcdir/test_read_write.at:23" 2914$at_failed && at_fn_log_failure 2915$at_traceon; } 2916 2917 { set +x 2918$as_echo "$at_srcdir/test_read_write.at:23: \$progd nul" 2919at_fn_check_prepare_dynamic "$progd nul" "test_read_write.at:23" 2920( $at_check_trace; $progd nul 2921) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2922at_status=$? at_failed=false 2923$at_check_filter 2924echo stderr:; cat "$at_stderr" 2925echo stdout:; cat "$at_stdout" 2926at_fn_check_status 3 $at_status "$at_srcdir/test_read_write.at:23" 2927$at_failed && at_fn_log_failure 2928$at_traceon; } 2929 2930 2931 set +x 2932 $at_times_p && times >"$at_times_file" 2933) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2934read at_status <"$at_status_file" 2935#AT_STOP_12 2936#AT_START_13 2937at_fn_group_banner 13 'test_read_write.at:26' \ 2938 "UTF-8 console/file output are equal" " " 2 2939at_xfail=no 2940( 2941 $as_echo "13. $at_setup_line: testing $at_desc ..." 2942 $at_traceon 2943 2944 2945{ set +x 2946$as_echo "$at_srcdir/test_read_write.at:28: 2947 \$progf -o expout \$sample/INFO2-sample1 2948 \$progf \$sample/INFO2-sample1 2949" 2950at_fn_check_prepare_notrace 'an embedded newline' "test_read_write.at:28" 2951( $at_check_trace; 2952 $progf -o expout $sample/INFO2-sample1 2953 $progf $sample/INFO2-sample1 2954 2955) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2956at_status=$? at_failed=false 2957$at_check_filter 2958at_fn_diff_devnull "$at_stderr" || at_failed=: 2959$at_diff expout "$at_stdout" || at_failed=: 2960at_fn_check_status 0 $at_status "$at_srcdir/test_read_write.at:28" 2961$at_failed && at_fn_log_failure 2962$at_traceon; } 2963 2964{ set +x 2965$as_echo "$at_srcdir/test_read_write.at:32: 2966 rm -f expout 2967 \$progd -o expout \$sample/dir-sample1 2968 \$progd \$sample/dir-sample1 2969" 2970at_fn_check_prepare_notrace 'an embedded newline' "test_read_write.at:32" 2971( $at_check_trace; 2972 rm -f expout 2973 $progd -o expout $sample/dir-sample1 2974 $progd $sample/dir-sample1 2975 2976) >>"$at_stdout" 2>>"$at_stderr" 5>&- 2977at_status=$? at_failed=false 2978$at_check_filter 2979at_fn_diff_devnull "$at_stderr" || at_failed=: 2980$at_diff expout "$at_stdout" || at_failed=: 2981at_fn_check_status 0 $at_status "$at_srcdir/test_read_write.at:32" 2982$at_failed && at_fn_log_failure 2983$at_traceon; } 2984 2985 set +x 2986 $at_times_p && times >"$at_times_file" 2987) 5>&1 2>&1 7>&- | eval $at_tee_pipe 2988read at_status <"$at_status_file" 2989#AT_STOP_13 2990#AT_START_14 2991at_fn_group_banner 14 'test_parse_info2.at:6' \ 2992 "Empty INFO2" " " 3 2993at_xfail=no 2994( 2995 $as_echo "14. $at_setup_line: testing $at_desc ..." 2996 $at_traceon 2997 2998 2999 3000 { set +x 3001$as_echo "$at_srcdir/test_parse_info2.at:8: 3002 rm -f expout 3003 \$as_ln_s \$sample/INFO2-empty.txt expout 3004 cd \$sample 3005 \$progf INFO2-empty 3006 " 3007at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:8" 3008( $at_check_trace; 3009 rm -f expout 3010 $as_ln_s $sample/INFO2-empty.txt expout 3011 cd $sample 3012 $progf INFO2-empty 3013 3014) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3015at_status=$? at_failed=false 3016$at_check_filter 3017at_fn_diff_devnull "$at_stderr" || at_failed=: 3018$at_diff expout "$at_stdout" || at_failed=: 3019at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:8" 3020$at_failed && at_fn_log_failure 3021$at_traceon; } 3022 3023 3024 set +x 3025 $at_times_p && times >"$at_times_file" 3026) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3027read at_status <"$at_status_file" 3028#AT_STOP_14 3029#AT_START_15 3030at_fn_group_banner 15 'test_parse_info2.at:11' \ 3031 "INFO2 Sample 1 - 95" " " 3 3032at_xfail=no 3033( 3034 $as_echo "15. $at_setup_line: testing $at_desc ..." 3035 $at_traceon 3036 3037 3038$as_echo "test_parse_info2.at:13" >"$at_check_line_file" 3039(test -z "${sjis_name}") \ 3040 && at_fn_check_skip 77 "$at_srcdir/test_parse_info2.at:13" 3041 3042 { set +x 3043$as_echo "$at_srcdir/test_parse_info2.at:14: 3044 rm -f expout 3045 \$as_ln_s \$sample/INFO-95-ja-1.txt expout 3046 cd \$sample 3047 \$progf -l \"\${sjis_name}\" INFO-95-ja-1 3048 " 3049at_fn_check_prepare_notrace 'a ${...} parameter expansion' "test_parse_info2.at:14" 3050( $at_check_trace; 3051 rm -f expout 3052 $as_ln_s $sample/INFO-95-ja-1.txt expout 3053 cd $sample 3054 $progf -l "${sjis_name}" INFO-95-ja-1 3055 3056) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3057at_status=$? at_failed=false 3058$at_check_filter 3059at_fn_diff_devnull "$at_stderr" || at_failed=: 3060$at_diff expout "$at_stdout" || at_failed=: 3061at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:14" 3062$at_failed && at_fn_log_failure 3063$at_traceon; } 3064 3065 3066 set +x 3067 $at_times_p && times >"$at_times_file" 3068) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3069read at_status <"$at_status_file" 3070#AT_STOP_15 3071#AT_START_16 3072at_fn_group_banner 16 'test_parse_info2.at:17' \ 3073 "INFO2 Sample 2 - NT4" " " 3 3074at_xfail=no 3075( 3076 $as_echo "16. $at_setup_line: testing $at_desc ..." 3077 $at_traceon 3078 3079 3080 3081 { set +x 3082$as_echo "$at_srcdir/test_parse_info2.at:19: 3083 rm -f expout 3084 \$as_ln_s \$sample/INFO-NT-en-1.txt expout 3085 cd \$sample 3086 \$progf INFO-NT-en-1 3087 " 3088at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:19" 3089( $at_check_trace; 3090 rm -f expout 3091 $as_ln_s $sample/INFO-NT-en-1.txt expout 3092 cd $sample 3093 $progf INFO-NT-en-1 3094 3095) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3096at_status=$? at_failed=false 3097$at_check_filter 3098at_fn_diff_devnull "$at_stderr" || at_failed=: 3099$at_diff expout "$at_stdout" || at_failed=: 3100at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:19" 3101$at_failed && at_fn_log_failure 3102$at_traceon; } 3103 3104 3105 set +x 3106 $at_times_p && times >"$at_times_file" 3107) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3108read at_status <"$at_status_file" 3109#AT_STOP_16 3110#AT_START_17 3111at_fn_group_banner 17 'test_parse_info2.at:22' \ 3112 "INFO2 Sample 3 - 98" " " 3 3113at_xfail=no 3114( 3115 $as_echo "17. $at_setup_line: testing $at_desc ..." 3116 $at_traceon 3117 3118 3119 3120 { set +x 3121$as_echo "$at_srcdir/test_parse_info2.at:24: 3122 rm -f expout 3123 \$as_ln_s \$sample/INFO2-sample2.txt expout 3124 cd \$sample 3125 \$progf -l CP1252 INFO2-sample2 3126 " 3127at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:24" 3128( $at_check_trace; 3129 rm -f expout 3130 $as_ln_s $sample/INFO2-sample2.txt expout 3131 cd $sample 3132 $progf -l CP1252 INFO2-sample2 3133 3134) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3135at_status=$? at_failed=false 3136$at_check_filter 3137at_fn_diff_devnull "$at_stderr" || at_failed=: 3138$at_diff expout "$at_stdout" || at_failed=: 3139at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:24" 3140$at_failed && at_fn_log_failure 3141$at_traceon; } 3142 3143 3144 set +x 3145 $at_times_p && times >"$at_times_file" 3146) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3147read at_status <"$at_status_file" 3148#AT_STOP_17 3149#AT_START_18 3150at_fn_group_banner 18 'test_parse_info2.at:27' \ 3151 "INFO2 Sample 4 - ME" " " 3 3152at_xfail=no 3153( 3154 $as_echo "18. $at_setup_line: testing $at_desc ..." 3155 $at_traceon 3156 3157 3158 3159 { set +x 3160$as_echo "$at_srcdir/test_parse_info2.at:29: 3161 rm -f expout 3162 \$as_ln_s \$sample/INFO2-ME-en-1.txt expout 3163 cd \$sample 3164 \$progf -l CP1252 INFO2-ME-en-1 3165 " 3166at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:29" 3167( $at_check_trace; 3168 rm -f expout 3169 $as_ln_s $sample/INFO2-ME-en-1.txt expout 3170 cd $sample 3171 $progf -l CP1252 INFO2-ME-en-1 3172 3173) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3174at_status=$? at_failed=false 3175$at_check_filter 3176at_fn_diff_devnull "$at_stderr" || at_failed=: 3177$at_diff expout "$at_stdout" || at_failed=: 3178at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:29" 3179$at_failed && at_fn_log_failure 3180$at_traceon; } 3181 3182 3183 set +x 3184 $at_times_p && times >"$at_times_file" 3185) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3186read at_status <"$at_status_file" 3187#AT_STOP_18 3188#AT_START_19 3189at_fn_group_banner 19 'test_parse_info2.at:32' \ 3190 "INFO2 Sample 5 - 2000" " " 3 3191at_xfail=no 3192( 3193 $as_echo "19. $at_setup_line: testing $at_desc ..." 3194 $at_traceon 3195 3196 3197 3198 { set +x 3199$as_echo "$at_srcdir/test_parse_info2.at:34: 3200 rm -f expout 3201 \$as_ln_s \$sample/INFO2-2k-cht-1.txt expout 3202 cd \$sample 3203 \$progf INFO2-2k-cht-1 3204 " 3205at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:34" 3206( $at_check_trace; 3207 rm -f expout 3208 $as_ln_s $sample/INFO2-2k-cht-1.txt expout 3209 cd $sample 3210 $progf INFO2-2k-cht-1 3211 3212) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3213at_status=$? at_failed=false 3214$at_check_filter 3215at_fn_diff_devnull "$at_stderr" || at_failed=: 3216$at_diff expout "$at_stdout" || at_failed=: 3217at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:34" 3218$at_failed && at_fn_log_failure 3219$at_traceon; } 3220 3221 3222 set +x 3223 $at_times_p && times >"$at_times_file" 3224) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3225read at_status <"$at_status_file" 3226#AT_STOP_19 3227#AT_START_20 3228at_fn_group_banner 20 'test_parse_info2.at:37' \ 3229 "INFO2 Sample 6 - XP/03" " " 3 3230at_xfail=no 3231( 3232 $as_echo "20. $at_setup_line: testing $at_desc ..." 3233 $at_traceon 3234 3235 3236 3237 { set +x 3238$as_echo "$at_srcdir/test_parse_info2.at:39: 3239 rm -f expout 3240 \$as_ln_s \$sample/INFO2-sample1.txt expout 3241 cd \$sample 3242 \$progf INFO2-sample1 3243 " 3244at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:39" 3245( $at_check_trace; 3246 rm -f expout 3247 $as_ln_s $sample/INFO2-sample1.txt expout 3248 cd $sample 3249 $progf INFO2-sample1 3250 3251) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3252at_status=$? at_failed=false 3253$at_check_filter 3254at_fn_diff_devnull "$at_stderr" || at_failed=: 3255$at_diff expout "$at_stdout" || at_failed=: 3256at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:39" 3257$at_failed && at_fn_log_failure 3258$at_traceon; } 3259 3260 3261 set +x 3262 $at_times_p && times >"$at_times_file" 3263) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3264read at_status <"$at_status_file" 3265#AT_STOP_20 3266#AT_START_21 3267at_fn_group_banner 21 'test_parse_info2.at:42' \ 3268 "INFO2 - UNC legacy path 1" " " 3 3269at_xfail=no 3270( 3271 $as_echo "21. $at_setup_line: testing $at_desc ..." 3272 $at_traceon 3273 3274 3275 3276 { set +x 3277$as_echo "$at_srcdir/test_parse_info2.at:44: 3278 rm -f expout 3279 \$as_ln_s \$sample/INFO2-me-en-uncpath.txt expout 3280 cd \$sample 3281 \$progf -l ASCII INFO2-me-en-uncpath 3282 " 3283at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:44" 3284( $at_check_trace; 3285 rm -f expout 3286 $as_ln_s $sample/INFO2-me-en-uncpath.txt expout 3287 cd $sample 3288 $progf -l ASCII INFO2-me-en-uncpath 3289 3290) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3291at_status=$? at_failed=false 3292$at_check_filter 3293at_fn_diff_devnull "$at_stderr" || at_failed=: 3294$at_diff expout "$at_stdout" || at_failed=: 3295at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:44" 3296$at_failed && at_fn_log_failure 3297$at_traceon; } 3298 3299 3300 set +x 3301 $at_times_p && times >"$at_times_file" 3302) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3303read at_status <"$at_status_file" 3304#AT_STOP_21 3305#AT_START_22 3306at_fn_group_banner 22 'test_parse_info2.at:47' \ 3307 "INFO2 - UNC legacy path 2" " " 3 3308at_xfail=no 3309( 3310 $as_echo "22. $at_setup_line: testing $at_desc ..." 3311 $at_traceon 3312 3313 3314 3315 { set +x 3316$as_echo "$at_srcdir/test_parse_info2.at:49: 3317 rm -f expout 3318 \$as_ln_s \$sample/INFO2-2k-tw-uncpath.txt expout 3319 cd \$sample 3320 \$progf -l \${big5_name} INFO2-2k-tw-uncpath 3321 " 3322at_fn_check_prepare_notrace 'a ${...} parameter expansion' "test_parse_info2.at:49" 3323( $at_check_trace; 3324 rm -f expout 3325 $as_ln_s $sample/INFO2-2k-tw-uncpath.txt expout 3326 cd $sample 3327 $progf -l ${big5_name} INFO2-2k-tw-uncpath 3328 3329) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3330at_status=$? at_failed=false 3331$at_check_filter 3332at_fn_diff_devnull "$at_stderr" || at_failed=: 3333$at_diff expout "$at_stdout" || at_failed=: 3334at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:49" 3335$at_failed && at_fn_log_failure 3336$at_traceon; } 3337 3338 3339 set +x 3340 $at_times_p && times >"$at_times_file" 3341) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3342read at_status <"$at_status_file" 3343#AT_STOP_22 3344#AT_START_23 3345at_fn_group_banner 23 'test_parse_info2.at:52' \ 3346 "INFO2 - UNC unicode path" " " 3 3347at_xfail=no 3348( 3349 $as_echo "23. $at_setup_line: testing $at_desc ..." 3350 $at_traceon 3351 3352 3353 3354 { set +x 3355$as_echo "$at_srcdir/test_parse_info2.at:54: 3356 rm -f expout 3357 \$as_ln_s \$sample/INFO2-03-tw-uncpath.txt expout 3358 cd \$sample 3359 \$progf INFO2-03-tw-uncpath 3360 " 3361at_fn_check_prepare_notrace 'an embedded newline' "test_parse_info2.at:54" 3362( $at_check_trace; 3363 rm -f expout 3364 $as_ln_s $sample/INFO2-03-tw-uncpath.txt expout 3365 cd $sample 3366 $progf INFO2-03-tw-uncpath 3367 3368) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3369at_status=$? at_failed=false 3370$at_check_filter 3371at_fn_diff_devnull "$at_stderr" || at_failed=: 3372$at_diff expout "$at_stdout" || at_failed=: 3373at_fn_check_status 0 $at_status "$at_srcdir/test_parse_info2.at:54" 3374$at_failed && at_fn_log_failure 3375$at_traceon; } 3376 3377 3378 set +x 3379 $at_times_p && times >"$at_times_file" 3380) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3381read at_status <"$at_status_file" 3382#AT_STOP_23 3383#AT_START_24 3384at_fn_group_banner 24 'test_parse_dir.at:6' \ 3385 "Empty \$Recycle.bin" " " 4 3386at_xfail=no 3387( 3388 $as_echo "24. $at_setup_line: testing $at_desc ..." 3389 $at_traceon 3390 3391 3392 3393 { set +x 3394$as_echo "$at_srcdir/test_parse_dir.at:8: 3395 rm -f expout 3396 \$as_ln_s \$sample/dir-empty.txt expout 3397 cd \$sample 3398 \$progd dir-empty 3399 " 3400at_fn_check_prepare_notrace 'an embedded newline' "test_parse_dir.at:8" 3401( $at_check_trace; 3402 rm -f expout 3403 $as_ln_s $sample/dir-empty.txt expout 3404 cd $sample 3405 $progd dir-empty 3406 3407) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3408at_status=$? at_failed=false 3409$at_check_filter 3410at_fn_diff_devnull "$at_stderr" || at_failed=: 3411$at_diff expout "$at_stdout" || at_failed=: 3412at_fn_check_status 0 $at_status "$at_srcdir/test_parse_dir.at:8" 3413$at_failed && at_fn_log_failure 3414$at_traceon; } 3415 3416 3417 set +x 3418 $at_times_p && times >"$at_times_file" 3419) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3420read at_status <"$at_status_file" 3421#AT_STOP_24 3422#AT_START_25 3423at_fn_group_banner 25 'test_parse_dir.at:11' \ 3424 "\$Recycle.bin Sample 1 - Vista" " " 4 3425at_xfail=no 3426( 3427 $as_echo "25. $at_setup_line: testing $at_desc ..." 3428 $at_traceon 3429 3430 3431 3432 { set +x 3433$as_echo "$at_srcdir/test_parse_dir.at:13: 3434 rm -f expout 3435 \$as_ln_s \$sample/dir-sample1.txt expout 3436 cd \$sample 3437 \$progd dir-sample1 3438 " 3439at_fn_check_prepare_notrace 'an embedded newline' "test_parse_dir.at:13" 3440( $at_check_trace; 3441 rm -f expout 3442 $as_ln_s $sample/dir-sample1.txt expout 3443 cd $sample 3444 $progd dir-sample1 3445 3446) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3447at_status=$? at_failed=false 3448$at_check_filter 3449at_fn_diff_devnull "$at_stderr" || at_failed=: 3450$at_diff expout "$at_stdout" || at_failed=: 3451at_fn_check_status 0 $at_status "$at_srcdir/test_parse_dir.at:13" 3452$at_failed && at_fn_log_failure 3453$at_traceon; } 3454 3455 3456 set +x 3457 $at_times_p && times >"$at_times_file" 3458) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3459read at_status <"$at_status_file" 3460#AT_STOP_25 3461#AT_START_26 3462at_fn_group_banner 26 'test_parse_dir.at:16' \ 3463 "\$Recycle.bin Sample 2 - Win 10" " " 4 3464at_xfail=no 3465( 3466 $as_echo "26. $at_setup_line: testing $at_desc ..." 3467 $at_traceon 3468 3469 3470 3471 { set +x 3472$as_echo "$at_srcdir/test_parse_dir.at:18: 3473 rm -f expout 3474 \$as_ln_s \$sample/dir-win10-01.txt expout 3475 cd \$sample 3476 \$progd dir-win10-01 3477 " 3478at_fn_check_prepare_notrace 'an embedded newline' "test_parse_dir.at:18" 3479( $at_check_trace; 3480 rm -f expout 3481 $as_ln_s $sample/dir-win10-01.txt expout 3482 cd $sample 3483 $progd dir-win10-01 3484 3485) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3486at_status=$? at_failed=false 3487$at_check_filter 3488at_fn_diff_devnull "$at_stderr" || at_failed=: 3489$at_diff expout "$at_stdout" || at_failed=: 3490at_fn_check_status 0 $at_status "$at_srcdir/test_parse_dir.at:18" 3491$at_failed && at_fn_log_failure 3492$at_traceon; } 3493 3494 3495 set +x 3496 $at_times_p && times >"$at_times_file" 3497) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3498read at_status <"$at_status_file" 3499#AT_STOP_26 3500#AT_START_27 3501at_fn_group_banner 27 'test_parse_dir.at:21' \ 3502 "\$Recycle.bin single index file" " " 4 3503at_xfail=no 3504( 3505 $as_echo "27. $at_setup_line: testing $at_desc ..." 3506 $at_traceon 3507 3508 3509{ set +x 3510$as_echo "$at_srcdir/test_parse_dir.at:23: 3511 grep 'IHO61YT' \$sample/dir-win10-01.txt > expout 3512 \$progd -n \$sample/dir-win10-01/\\\$IHO61YT 3513" 3514at_fn_check_prepare_notrace 'an embedded newline' "test_parse_dir.at:23" 3515( $at_check_trace; 3516 grep 'IHO61YT' $sample/dir-win10-01.txt > expout 3517 $progd -n $sample/dir-win10-01/\$IHO61YT 3518 3519) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3520at_status=$? at_failed=false 3521$at_check_filter 3522at_fn_diff_devnull "$at_stderr" || at_failed=: 3523$at_diff expout "$at_stdout" || at_failed=: 3524at_fn_check_status 0 $at_status "$at_srcdir/test_parse_dir.at:23" 3525$at_failed && at_fn_log_failure 3526$at_traceon; } 3527 3528 set +x 3529 $at_times_p && times >"$at_times_file" 3530) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3531read at_status <"$at_status_file" 3532#AT_STOP_27 3533#AT_START_28 3534at_fn_group_banner 28 'test_parse_dir.at:29' \ 3535 "\$Recycle.bin UNC path" " " 4 3536at_xfail=no 3537( 3538 $as_echo "28. $at_setup_line: testing $at_desc ..." 3539 $at_traceon 3540 3541 3542 3543 { set +x 3544$as_echo "$at_srcdir/test_parse_dir.at:31: 3545 rm -f expout 3546 \$as_ln_s \$sample/dir-2019-uncpath.txt expout 3547 cd \$sample 3548 \$progd dir-2019-uncpath 3549 " 3550at_fn_check_prepare_notrace 'an embedded newline' "test_parse_dir.at:31" 3551( $at_check_trace; 3552 rm -f expout 3553 $as_ln_s $sample/dir-2019-uncpath.txt expout 3554 cd $sample 3555 $progd dir-2019-uncpath 3556 3557) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3558at_status=$? at_failed=false 3559$at_check_filter 3560at_fn_diff_devnull "$at_stderr" || at_failed=: 3561$at_diff expout "$at_stdout" || at_failed=: 3562at_fn_check_status 0 $at_status "$at_srcdir/test_parse_dir.at:31" 3563$at_failed && at_fn_log_failure 3564$at_traceon; } 3565 3566 3567 set +x 3568 $at_times_p && times >"$at_times_file" 3569) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3570read at_status <"$at_status_file" 3571#AT_STOP_28 3572#AT_START_29 3573at_fn_group_banner 29 'test_faulty_dir.at:6' \ 3574 "Index files of different versions" " " 5 3575at_xfail=no 3576( 3577 $as_echo "29. $at_setup_line: testing $at_desc ..." 3578 $at_traceon 3579 3580 3581 3582_ax_at_check_pattern_prepare_original_at_diff="$at_diff" 3583at_diff='ax_at_diff_pattern' 3584{ set +x 3585$as_echo "$at_srcdir/test_faulty_dir.at:8: 3586 cd \$sample 3587 \$progd dir-mixed 3588" 3589at_fn_check_prepare_notrace 'an embedded newline' "test_faulty_dir.at:8" 3590( $at_check_trace; 3591 cd $sample 3592 $progd dir-mixed 3593 3594) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3595at_status=$? at_failed=false 3596$at_check_filter 3597echo >>"$at_stderr"; $as_echo "Index files come from multiple versions of Windows\\..* 3598" | \ 3599 $at_diff - "$at_stderr" || at_failed=: 3600at_fn_diff_devnull "$at_stdout" || at_failed=: 3601at_fn_check_status 3 $at_status "$at_srcdir/test_faulty_dir.at:8" 3602if $at_failed; then : 3603 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3604else 3605 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3606fi 3607$at_failed && at_fn_log_failure 3608$at_traceon; } 3609 3610 3611 set +x 3612 $at_times_p && times >"$at_times_file" 3613) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3614read at_status <"$at_status_file" 3615#AT_STOP_29 3616#AT_START_30 3617at_fn_group_banner 30 'test_faulty_dir.at:16' \ 3618 "Directory w/o Windows access permission" " " 5 3619at_xfail=no 3620( 3621 $as_echo "30. $at_setup_line: testing $at_desc ..." 3622 $at_traceon 3623 3624 3625{ set +x 3626$as_echo "$at_srcdir/test_faulty_dir.at:18: which icacls.exe > /dev/null || exit 77" 3627at_fn_check_prepare_trace "test_faulty_dir.at:18" 3628( $at_check_trace; which icacls.exe > /dev/null || exit 77 3629) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3630at_status=$? at_failed=false 3631$at_check_filter 3632at_fn_diff_devnull "$at_stderr" || at_failed=: 3633at_fn_diff_devnull "$at_stdout" || at_failed=: 3634at_fn_check_status 0 $at_status "$at_srcdir/test_faulty_dir.at:18" 3635$at_failed && at_fn_log_failure 3636$at_traceon; } 3637$as_echo "test_faulty_dir.at:19" >"$at_check_line_file" 3638(! $is_mingw) \ 3639 && at_fn_check_skip 77 "$at_srcdir/test_faulty_dir.at:19" 3640{ set +x 3641$as_echo "$at_srcdir/test_faulty_dir.at:24: 3642 cp -pR \$sample/dir-win10-01 dir1 3643 icacls.exe dir1 /inheritance:r > /dev/null 3644 icacls.exe dir1 /grant:r \"Users:(OI)(CI)(S,REA)\" > /dev/null 3645 \$progd dir1 3646" 3647at_fn_check_prepare_notrace 'an embedded newline' "test_faulty_dir.at:24" 3648( $at_check_trace; 3649 cp -pR $sample/dir-win10-01 dir1 3650 icacls.exe dir1 /inheritance:r > /dev/null 3651 icacls.exe dir1 /grant:r "Users:(OI)(CI)(S,REA)" > /dev/null 3652 $progd dir1 3653 3654) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3655at_status=$? at_failed=false 3656$at_check_filter 3657echo >>"$at_stderr"; $as_echo "Error listing directory: Insufficient permission. 3658" | \ 3659 $at_diff - "$at_stderr" || at_failed=: 3660at_fn_diff_devnull "$at_stdout" || at_failed=: 3661at_fn_check_status 2 $at_status "$at_srcdir/test_faulty_dir.at:24" 3662if $at_failed; then : 3663 MSYS2_ARG_CONV_EXCL="/reset" icacls.exe dir1 /reset > /dev/null 3664else 3665 MSYS2_ARG_CONV_EXCL="/reset" icacls.exe dir1 /reset > /dev/null 3666fi 3667$at_failed && at_fn_log_failure 3668$at_traceon; } 3669 3670 set +x 3671 $at_times_p && times >"$at_times_file" 3672) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3673read at_status <"$at_status_file" 3674#AT_STOP_30 3675#AT_START_31 3676at_fn_group_banner 31 'test_faulty_dir.at:38' \ 3677 "Directory w/o Unix access permission" " " 5 3678at_xfail=no 3679( 3680 $as_echo "31. $at_setup_line: testing $at_desc ..." 3681 $at_traceon 3682 3683 3684$as_echo "test_faulty_dir.at:40" >"$at_check_line_file" 3685($is_mingw) \ 3686 && at_fn_check_skip 77 "$at_srcdir/test_faulty_dir.at:40" 3687$as_echo "test_faulty_dir.at:42" >"$at_check_line_file" 3688(test "`id -u`" = "0") \ 3689 && at_fn_check_skip 77 "$at_srcdir/test_faulty_dir.at:42" 3690 3691_ax_at_check_pattern_prepare_original_at_diff="$at_diff" 3692at_diff='ax_at_diff_pattern' 3693{ set +x 3694$as_echo "$at_srcdir/test_faulty_dir.at:43: 3695 cp -pR \$sample/dir-win10-01 dir1 3696 chmod u= dir1 3697 \$progd dir1 3698" 3699at_fn_check_prepare_notrace 'an embedded newline' "test_faulty_dir.at:43" 3700( $at_check_trace; 3701 cp -pR $sample/dir-win10-01 dir1 3702 chmod u= dir1 3703 $progd dir1 3704 3705) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3706at_status=$? at_failed=false 3707$at_check_filter 3708echo >>"$at_stderr"; $as_echo "Error opening directory 'dir1': Error opening directory .+dir1.+: Permission denied 3709" | \ 3710 $at_diff - "$at_stderr" || at_failed=: 3711at_fn_diff_devnull "$at_stdout" || at_failed=: 3712at_fn_check_status 2 $at_status "$at_srcdir/test_faulty_dir.at:43" 3713if $at_failed; then : 3714 at_diff="$_ax_at_check_pattern_prepare_original_at_diff";chmod u=rwx dir1 3715else 3716 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3717fi 3718$at_failed && at_fn_log_failure 3719$at_traceon; } 3720 3721 3722 set +x 3723 $at_times_p && times >"$at_times_file" 3724) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3725read at_status <"$at_status_file" 3726#AT_STOP_31 3727#AT_START_32 3728at_fn_group_banner 32 'test_encoding.at:9' \ 3729 "Unicode characters in file argument" " " 6 3730at_xfail=no 3731( 3732 $as_echo "32. $at_setup_line: testing $at_desc ..." 3733 $at_traceon 3734 3735 3736{ set +x 3737$as_echo "$at_srcdir/test_encoding.at:11: 3738 \$as_ln_s \$sample/japanese-path-file.txt expout 3739 cd \$sample 3740 \$progf ./ごみ箱/INFO2-empty 3741" 3742at_fn_check_prepare_notrace 'an embedded newline' "test_encoding.at:11" 3743( $at_check_trace; 3744 $as_ln_s $sample/japanese-path-file.txt expout 3745 cd $sample 3746 $progf ./ごみ箱/INFO2-empty 3747 3748) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3749at_status=$? at_failed=false 3750$at_check_filter 3751at_fn_diff_devnull "$at_stderr" || at_failed=: 3752$at_diff expout "$at_stdout" || at_failed=: 3753at_fn_check_status 0 $at_status "$at_srcdir/test_encoding.at:11" 3754$at_failed && at_fn_log_failure 3755$at_traceon; } 3756 3757 3758{ set +x 3759$as_echo "$at_srcdir/test_encoding.at:17: 3760 rm -f expout 3761 \$as_ln_s \$sample/japanese-path-dir.txt expout 3762 cd \$sample 3763 \$progd ./ごみ箱/dir-empty 3764" 3765at_fn_check_prepare_notrace 'an embedded newline' "test_encoding.at:17" 3766( $at_check_trace; 3767 rm -f expout 3768 $as_ln_s $sample/japanese-path-dir.txt expout 3769 cd $sample 3770 $progd ./ごみ箱/dir-empty 3771 3772) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3773at_status=$? at_failed=false 3774$at_check_filter 3775at_fn_diff_devnull "$at_stderr" || at_failed=: 3776$at_diff expout "$at_stdout" || at_failed=: 3777at_fn_check_status 0 $at_status "$at_srcdir/test_encoding.at:17" 3778$at_failed && at_fn_log_failure 3779$at_traceon; } 3780 3781 set +x 3782 $at_times_p && times >"$at_times_file" 3783) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3784read at_status <"$at_status_file" 3785#AT_STOP_32 3786#AT_START_33 3787at_fn_group_banner 33 'test_encoding.at:25' \ 3788 "Legacy path encoding - correct" " " 6 3789at_xfail=no 3790( 3791 $as_echo "33. $at_setup_line: testing $at_desc ..." 3792 $at_traceon 3793 3794$as_echo "test_encoding.at:26" >"$at_check_line_file" 3795(test -z "${gbk_name}") \ 3796 && at_fn_check_skip 77 "$at_srcdir/test_encoding.at:26" 3797 3798 3799 { set +x 3800$as_echo "$at_srcdir/test_encoding.at:28: 3801 rm -f expout 3802 \$as_ln_s \$sample/INFO2-sample1-alt.txt expout 3803 cd \$sample 3804 \$progf -l \"\${gbk_name}\" INFO2-sample1 3805 " 3806at_fn_check_prepare_notrace 'a ${...} parameter expansion' "test_encoding.at:28" 3807( $at_check_trace; 3808 rm -f expout 3809 $as_ln_s $sample/INFO2-sample1-alt.txt expout 3810 cd $sample 3811 $progf -l "${gbk_name}" INFO2-sample1 3812 3813) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3814at_status=$? at_failed=false 3815$at_check_filter 3816at_fn_diff_devnull "$at_stderr" || at_failed=: 3817$at_diff expout "$at_stdout" || at_failed=: 3818at_fn_check_status 0 $at_status "$at_srcdir/test_encoding.at:28" 3819$at_failed && at_fn_log_failure 3820$at_traceon; } 3821 3822 3823 set +x 3824 $at_times_p && times >"$at_times_file" 3825) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3826read at_status <"$at_status_file" 3827#AT_STOP_33 3828#AT_START_34 3829at_fn_group_banner 34 'test_encoding.at:31' \ 3830 "Legacy path encoding - illegal (1)" " " 6 3831at_xfail=no 3832( 3833 $as_echo "34. $at_setup_line: testing $at_desc ..." 3834 $at_traceon 3835 3836 3837 3838_ax_at_check_pattern_prepare_original_at_diff="$at_diff" 3839at_diff='ax_at_diff_pattern' 3840{ set +x 3841$as_echo "$at_srcdir/test_encoding.at:33: 3842 cd \$sample 3843 \$progf -l xxx INFO2-sample1 3844" 3845at_fn_check_prepare_notrace 'an embedded newline' "test_encoding.at:33" 3846( $at_check_trace; 3847 cd $sample 3848 $progf -l xxx INFO2-sample1 3849 3850) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3851at_status=$? at_failed=false 3852$at_check_filter 3853echo >>"$at_stderr"; $as_echo ".* encoding is not supported by glib library on this system\\..* 3854 3855 https://.* 3856" | \ 3857 $at_diff - "$at_stderr" || at_failed=: 3858at_fn_diff_devnull "$at_stdout" || at_failed=: 3859at_fn_check_status 1 $at_status "$at_srcdir/test_encoding.at:33" 3860if $at_failed; then : 3861 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3862else 3863 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3864fi 3865$at_failed && at_fn_log_failure 3866$at_traceon; } 3867 3868 3869 set +x 3870 $at_times_p && times >"$at_times_file" 3871) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3872read at_status <"$at_status_file" 3873#AT_STOP_34 3874#AT_START_35 3875at_fn_group_banner 35 'test_encoding.at:46' \ 3876 "Legacy path encoding - illegal (2)" " " 6 3877at_xfail=no 3878( 3879 $as_echo "35. $at_setup_line: testing $at_desc ..." 3880 $at_traceon 3881 3882 3883$as_echo "test_encoding.at:48" >"$at_check_line_file" 3884(test -z "${ebcdic_latin1_name}") \ 3885 && at_fn_check_skip 77 "$at_srcdir/test_encoding.at:48" 3886 3887_ax_at_check_pattern_prepare_original_at_diff="$at_diff" 3888at_diff='ax_at_diff_pattern' 3889{ set +x 3890$as_echo "$at_srcdir/test_encoding.at:49: 3891 cd \$sample 3892 \$progf -l \"\${ebcdic_latin1_name}\" INFO2-sample1 3893" 3894at_fn_check_prepare_notrace 'a ${...} parameter expansion' "test_encoding.at:49" 3895( $at_check_trace; 3896 cd $sample 3897 $progf -l "${ebcdic_latin1_name}" INFO2-sample1 3898 3899) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3900at_status=$? at_failed=false 3901$at_check_filter 3902echo >>"$at_stderr"; $as_echo ".* can't possibly be a code page or compatible encoding .* 3903" | \ 3904 $at_diff - "$at_stderr" || at_failed=: 3905at_fn_diff_devnull "$at_stdout" || at_failed=: 3906at_fn_check_status 1 $at_status "$at_srcdir/test_encoding.at:49" 3907if $at_failed; then : 3908 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3909else 3910 at_diff="$_ax_at_check_pattern_prepare_original_at_diff"; 3911fi 3912$at_failed && at_fn_log_failure 3913$at_traceon; } 3914 3915 3916 set +x 3917 $at_times_p && times >"$at_times_file" 3918) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3919read at_status <"$at_status_file" 3920#AT_STOP_35 3921#AT_START_36 3922at_fn_group_banner 36 'test_encoding.at:61' \ 3923 "Legacy path encoding - wrong" " " 6 3924at_xfail=no 3925( 3926 $as_echo "36. $at_setup_line: testing $at_desc ..." 3927 $at_traceon 3928 3929 3930$as_echo "test_encoding.at:63" >"$at_check_line_file" 3931(test -z "${sjis_name}") \ 3932 && at_fn_check_skip 77 "$at_srcdir/test_encoding.at:63" 3933{ set +x 3934$as_echo "$at_srcdir/test_encoding.at:64: 3935 \$as_ln_s \$sample/INFO2-sample2-wrong-enc.txt expout 3936 cd \$sample 3937 \$progf -l \"\${sjis_name}\" INFO2-sample2 3938" 3939at_fn_check_prepare_notrace 'a ${...} parameter expansion' "test_encoding.at:64" 3940( $at_check_trace; 3941 $as_ln_s $sample/INFO2-sample2-wrong-enc.txt expout 3942 cd $sample 3943 $progf -l "${sjis_name}" INFO2-sample2 3944 3945) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3946at_status=$? at_failed=false 3947$at_check_filter 3948echo stderr:; cat "$at_stderr" 3949$at_diff expout "$at_stdout" || at_failed=: 3950at_fn_check_status 5 $at_status "$at_srcdir/test_encoding.at:64" 3951$at_failed && at_fn_log_failure 3952$at_traceon; } 3953 3954 set +x 3955 $at_times_p && times >"$at_times_file" 3956) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3957read at_status <"$at_status_file" 3958#AT_STOP_36 3959#AT_START_37 3960at_fn_group_banner 37 'test_encoding.at:74' \ 3961 "Bad unicode path" " " 6 3962at_xfail=no 3963( 3964 $as_echo "37. $at_setup_line: testing $at_desc ..." 3965 $at_traceon 3966 3967 3968{ set +x 3969$as_echo "$at_srcdir/test_encoding.at:76: 3970 \$as_ln_s \$sample/dir-bad-uni.txt expout 3971 cd \$sample 3972 \$progd dir-bad-uni 3973" 3974at_fn_check_prepare_notrace 'an embedded newline' "test_encoding.at:76" 3975( $at_check_trace; 3976 $as_ln_s $sample/dir-bad-uni.txt expout 3977 cd $sample 3978 $progd dir-bad-uni 3979 3980) >>"$at_stdout" 2>>"$at_stderr" 5>&- 3981at_status=$? at_failed=false 3982$at_check_filter 3983echo stderr:; cat "$at_stderr" 3984$at_diff expout "$at_stdout" || at_failed=: 3985at_fn_check_status 5 $at_status "$at_srcdir/test_encoding.at:76" 3986$at_failed && at_fn_log_failure 3987$at_traceon; } 3988 3989 set +x 3990 $at_times_p && times >"$at_times_file" 3991) 5>&1 2>&1 7>&- | eval $at_tee_pipe 3992read at_status <"$at_status_file" 3993#AT_STOP_37 3994#AT_START_38 3995at_fn_group_banner 38 'test_xml.at:6' \ 3996 "INFO2: XML validation" " " 7 3997at_xfail=no 3998( 3999 $as_echo "38. $at_setup_line: testing $at_desc ..." 4000 $at_traceon 4001 4002 4003$as_echo "test_xml.at:8" >"$at_check_line_file" 4004(! $has_xmllint) \ 4005 && at_fn_check_skip 77 "$at_srcdir/test_xml.at:8" 4006{ set +x 4007$as_echo "$at_srcdir/test_xml.at:9: 4008 \$progf -x \$sample/INFO2-sample1 | \\ 4009 \$xmllint --noout - 4010" 4011at_fn_check_prepare_notrace 'an embedded newline' "test_xml.at:9" 4012( $at_check_trace; 4013 $progf -x $sample/INFO2-sample1 | \ 4014 $xmllint --noout - 4015 4016) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4017at_status=$? at_failed=false 4018$at_check_filter 4019at_fn_diff_devnull "$at_stderr" || at_failed=: 4020at_fn_diff_devnull "$at_stdout" || at_failed=: 4021at_fn_check_status 0 $at_status "$at_srcdir/test_xml.at:9" 4022$at_failed && at_fn_log_failure 4023$at_traceon; } 4024 4025 set +x 4026 $at_times_p && times >"$at_times_file" 4027) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4028read at_status <"$at_status_file" 4029#AT_STOP_38 4030#AT_START_39 4031at_fn_group_banner 39 'test_xml.at:15' \ 4032 "INFO2: DTD validation" " " 7 4033at_xfail=no 4034( 4035 $as_echo "39. $at_setup_line: testing $at_desc ..." 4036 $at_traceon 4037 4038 4039$as_echo "test_xml.at:17" >"$at_check_line_file" 4040(! $has_xmllint) \ 4041 && at_fn_check_skip 77 "$at_srcdir/test_xml.at:17" 4042{ set +x 4043$as_echo "$at_srcdir/test_xml.at:18: 4044 \$progf -x \$sample/INFO2-sample1 | \\ 4045 \$xmllint --noout --dtdvalid \$srcdir/rifiuti.dtd - 4046" 4047at_fn_check_prepare_notrace 'an embedded newline' "test_xml.at:18" 4048( $at_check_trace; 4049 $progf -x $sample/INFO2-sample1 | \ 4050 $xmllint --noout --dtdvalid $srcdir/rifiuti.dtd - 4051 4052) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4053at_status=$? at_failed=false 4054$at_check_filter 4055at_fn_diff_devnull "$at_stderr" || at_failed=: 4056at_fn_diff_devnull "$at_stdout" || at_failed=: 4057at_fn_check_status 0 $at_status "$at_srcdir/test_xml.at:18" 4058$at_failed && at_fn_log_failure 4059$at_traceon; } 4060 4061 set +x 4062 $at_times_p && times >"$at_times_file" 4063) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4064read at_status <"$at_status_file" 4065#AT_STOP_39 4066#AT_START_40 4067at_fn_group_banner 40 'test_xml.at:24' \ 4068 "\$Recycle.bin: XML validation" " " 7 4069at_xfail=no 4070( 4071 $as_echo "40. $at_setup_line: testing $at_desc ..." 4072 $at_traceon 4073 4074 4075$as_echo "test_xml.at:26" >"$at_check_line_file" 4076(! $has_xmllint) \ 4077 && at_fn_check_skip 77 "$at_srcdir/test_xml.at:26" 4078{ set +x 4079$as_echo "$at_srcdir/test_xml.at:27: 4080 \$progd -x \$sample/dir-sample1 | \\ 4081 \$xmllint --noout - 4082" 4083at_fn_check_prepare_notrace 'an embedded newline' "test_xml.at:27" 4084( $at_check_trace; 4085 $progd -x $sample/dir-sample1 | \ 4086 $xmllint --noout - 4087 4088) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4089at_status=$? at_failed=false 4090$at_check_filter 4091at_fn_diff_devnull "$at_stderr" || at_failed=: 4092at_fn_diff_devnull "$at_stdout" || at_failed=: 4093at_fn_check_status 0 $at_status "$at_srcdir/test_xml.at:27" 4094$at_failed && at_fn_log_failure 4095$at_traceon; } 4096 4097 set +x 4098 $at_times_p && times >"$at_times_file" 4099) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4100read at_status <"$at_status_file" 4101#AT_STOP_40 4102#AT_START_41 4103at_fn_group_banner 41 'test_xml.at:33' \ 4104 "\$Recycle.bin: DTD validation" " " 7 4105at_xfail=no 4106( 4107 $as_echo "41. $at_setup_line: testing $at_desc ..." 4108 $at_traceon 4109 4110 4111$as_echo "test_xml.at:35" >"$at_check_line_file" 4112(! $has_xmllint) \ 4113 && at_fn_check_skip 77 "$at_srcdir/test_xml.at:35" 4114{ set +x 4115$as_echo "$at_srcdir/test_xml.at:36: 4116 \$progd -x \$sample/dir-sample1 | \\ 4117 \$xmllint --noout --dtdvalid \$srcdir/rifiuti.dtd - 4118" 4119at_fn_check_prepare_notrace 'an embedded newline' "test_xml.at:36" 4120( $at_check_trace; 4121 $progd -x $sample/dir-sample1 | \ 4122 $xmllint --noout --dtdvalid $srcdir/rifiuti.dtd - 4123 4124) >>"$at_stdout" 2>>"$at_stderr" 5>&- 4125at_status=$? at_failed=false 4126$at_check_filter 4127at_fn_diff_devnull "$at_stderr" || at_failed=: 4128at_fn_diff_devnull "$at_stdout" || at_failed=: 4129at_fn_check_status 0 $at_status "$at_srcdir/test_xml.at:36" 4130$at_failed && at_fn_log_failure 4131$at_traceon; } 4132 4133 set +x 4134 $at_times_p && times >"$at_times_file" 4135) 5>&1 2>&1 7>&- | eval $at_tee_pipe 4136read at_status <"$at_status_file" 4137#AT_STOP_41 4138