#! /bin/sh
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi


# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
do
  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`


# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  as_mkdir_p=false
fi

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH

# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  as_mkdir_p=false
fi

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH



SHELL=${CONFIG_SHELL-/bin/sh}

# How were we run?
at_cli_args="$@"

# Load the config file.
for at_file in atconfig atlocal
do
  test -r $at_file || continue
  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
   { (exit 1); exit 1; }; }
done

# atconfig delivers paths relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
  builddir=../..
  for at_dir in srcdir top_srcdir top_builddir
  do
    at_val=`eval echo '${'at_$at_dir'}'`
    eval "$at_dir=$at_val/../.."
  done
fi

# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times_skip=:
(times) >/dev/null 2>&1 && at_times_skip=false

# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose?
at_verbose=:
at_quiet=echo

# Shall we keep the debug scripts?  Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# List test groups?
at_list_p=false
# Test groups to run
at_groups=

# The directory we are in.
at_dir=`pwd`
# The directory the whole suite works in.
# Should be absolutely to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_suite_dir/at-check-line
# The files containing the output of the tested commands.
at_stdout=$at_suite_dir/at-stdout
at_stder1=$at_suite_dir/at-stder1
at_stderr=$at_suite_dir/at-stderr
# The file containing dates.
at_times_file=$at_suite_dir/at-times

# List of the tested programs.
at_tested='m4'
# List of the all the test groups.
at_groups_all=' banner-1 1 2 3 4 5 6 banner-2 7 8 9 10 11 12 13 14 15 16 17 18 19 20 banner-3 21 22 banner-4 23 24 25 26 27 28 29 30 31 32 banner-5 33 34 35 36 37 38 39 40 41 42 banner-6 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79'
# As many dots as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='..'
# Description of all the test groups.
at_help_all=
at_help_all=$at_help_all'1;macros.at:29;Arity and defn;
'
at_help_all=$at_help_all'2;macros.at:71;Arity, defn, and freeze;
'
at_help_all=$at_help_all'3;macros.at:105;pushdef/popdef;
'
at_help_all=$at_help_all'4;macros.at:152;Tracing Hanoi Towers;
'
at_help_all=$at_help_all'5;macros.at:282;Propagation of traceon;
'
at_help_all=$at_help_all'6;macros.at:350;Propagation of --trace;
'
at_help_all=$at_help_all'7;builtins.at:26;divert;
'
at_help_all=$at_help_all'8;builtins.at:48;debug;
'
at_help_all=$at_help_all'9;builtins.at:86;esyscmd;
'
at_help_all=$at_help_all'10;builtins.at:112;exp;
'
at_help_all=$at_help_all'11;builtins.at:140;gmp;
'
at_help_all=$at_help_all'12;builtins.at:273;include;
'
at_help_all=$at_help_all'13;builtins.at:318;indir;
'
at_help_all=$at_help_all'14;builtins.at:356;multiquotes;
'
at_help_all=$at_help_all'15;builtins.at:424;patsubst;
'
at_help_all=$at_help_all'16;builtins.at:462;regexp;
'
at_help_all=$at_help_all'17;builtins.at:517;sync-lines;
'
at_help_all=$at_help_all'18;builtins.at:566;translit;
'
at_help_all=$at_help_all'19;builtins.at:598;undivert;
'
at_help_all=$at_help_all'20;builtins.at:630;wrap;
'
at_help_all=$at_help_all'21;options.at:26;Discard comments;
'
at_help_all=$at_help_all'22;options.at:52;import-environment;
'
at_help_all=$at_help_all'23;others.at:46;Capitalize;
'
at_help_all=$at_help_all'24;others.at:71;Comments;
'
at_help_all=$at_help_all'25;others.at:79;foreach;
'
at_help_all=$at_help_all'26;others.at:145;forloop;
'
at_help_all=$at_help_all'27;others.at:183;fstab;
'
at_help_all=$at_help_all'28;others.at:213;hanoi;
'
at_help_all=$at_help_all'29;others.at:255;iso8859;
'
at_help_all=$at_help_all'30;others.at:293;misc;
'
at_help_all=$at_help_all'31;others.at:322;reverse;
'
at_help_all=$at_help_all'32;others.at:346;sysv-args;
'
at_help_all=$at_help_all'33;modules.at:27;Freezing modules;
'
at_help_all=$at_help_all'34;modules.at:111;--module-directory: absolute path;module
'
at_help_all=$at_help_all'35;modules.at:114;--module-directory: relative path;module
'
at_help_all=$at_help_all'36;modules.at:117;M4MODPATH: absolute path;module
'
at_help_all=$at_help_all'37;modules.at:120;M4MODPATH: relative path;module
'
at_help_all=$at_help_all'38;modules.at:123;LTDL_LIBRARY_PATH: absolute path;module
'
at_help_all=$at_help_all'39;modules.at:126;LTDL_LIBRARY_PATH: relative path;module
'
at_help_all=$at_help_all'40;modules.at:135;modules: shadow;
'
at_help_all=$at_help_all'41;modules.at:275;modules: unload;
'
at_help_all=$at_help_all'42;modules.at:343;modules: trace;
'
at_help_all=$at_help_all'43;generated.at:14;Inhibiting Invocation;documentation
'
at_help_all=$at_help_all'44;generated.at:48;Define;documentation
'
at_help_all=$at_help_all'45;generated.at:88;Arguments;documentation
'
at_help_all=$at_help_all'46;generated.at:144;Pseudo Arguments;documentation
'
at_help_all=$at_help_all'47;generated.at:219;Undefine;documentation
'
at_help_all=$at_help_all'48;generated.at:246;Defn;documentation
'
at_help_all=$at_help_all'49;generated.at:284;Pushdef;documentation
'
at_help_all=$at_help_all'50;generated.at:340;Indir;documentation
'
at_help_all=$at_help_all'51;generated.at:363;Symbols;documentation
'
at_help_all=$at_help_all'52;generated.at:382;Ifdef;documentation
'
at_help_all=$at_help_all'53;generated.at:405;Ifelse;documentation
'
at_help_all=$at_help_all'54;generated.at:452;Loops;documentation
'
at_help_all=$at_help_all'55;generated.at:491;Dumpdef;documentation
'
at_help_all=$at_help_all'56;generated.at:517;Trace;documentation
'
at_help_all=$at_help_all'57;generated.at:547;Dnl;documentation
'
at_help_all=$at_help_all'58;generated.at:567;Changequote;documentation
'
at_help_all=$at_help_all'59;generated.at:618;Changecom;documentation
'
at_help_all=$at_help_all'60;generated.at:658;Changesyntax;documentation
'
at_help_all=$at_help_all'61;generated.at:812;M4wrap;documentation
'
at_help_all=$at_help_all'62;generated.at:837;Include;documentation
'
at_help_all=$at_help_all'63;generated.at:895;Divert;documentation
'
at_help_all=$at_help_all'64;generated.at:932;Undivert;documentation
'
at_help_all=$at_help_all'65;generated.at:998;Divnum;documentation
'
at_help_all=$at_help_all'66;generated.at:1027;Cleardiv;documentation
'
at_help_all=$at_help_all'67;generated.at:1059;Len;documentation
'
at_help_all=$at_help_all'68;generated.at:1080;Index;documentation
'
at_help_all=$at_help_all'69;generated.at:1101;Eregexp and Regexp;documentation
'
at_help_all=$at_help_all'70;generated.at:1140;Substr;documentation
'
at_help_all=$at_help_all'71;generated.at:1161;Translit;documentation
'
at_help_all=$at_help_all'72;generated.at:1184;Epatsubst and Patsubst;documentation
'
at_help_all=$at_help_all'73;generated.at:1274;Format;documentation
'
at_help_all=$at_help_all'74;generated.at:1295;Incr;documentation
'
at_help_all=$at_help_all'75;generated.at:1316;Eval;documentation
'
at_help_all=$at_help_all'76;generated.at:1368;Esyscmd;documentation
'
at_help_all=$at_help_all'77;generated.at:1390;Sysval;documentation
'
at_help_all=$at_help_all'78;generated.at:1415;Errprint;documentation
'
at_help_all=$at_help_all'79;generated.at:1449;M4exit;documentation
'



while test $# -gt 0; do
  case $1 in
    --help | -h )
        at_help_p=:
        ;;

    --list | -l )
        at_list_p=:
        ;;

    --version | -V )
        echo "$as_me (GNU m4 1.4q)"
        exit 0
        ;;

    --clean | -c )
        rm -rf $at_suite_dir $as_me.log
        exit 0
        ;;

    --debug | -d )
        at_debug_p=:
        ;;

    --errexit | -e )
        at_debug_p=:
        at_errexit_p=:
        ;;

    --verbose | -v )
        at_verbose=echo; at_quiet=:
        ;;

    --trace | -x )
        at_traceon='set -vx'; at_traceoff='set +vx'
        ;;

    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
        at_groups="$at_groups$1 "
        ;;

    # Ranges
    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
        at_range_start=`echo $1 |tr -d '-'`
        at_range=`echo " $at_groups_all " | \
          sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,'`
        at_groups="$at_groups$at_range "
        ;;

    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
        at_range_end=`echo $1 |tr -d '-'`
        at_range=`echo " $at_groups_all " | \
          sed -e 's, '$at_range_end' .*$, '$at_range_end','`
        at_groups="$at_groups$at_range "
        ;;

    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
        at_range_start=`echo $1 |sed 's,-.*,,'`
        at_range_end=`echo $1 |sed 's,.*-,,'`
        # FIXME: Maybe test to make sure start <= end?
        at_range=`echo " $at_groups_all " | \
          sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,' \
              -e 's, '$at_range_end' .*$, '$at_range_end','`
        at_groups="$at_groups$at_range "
        ;;

    # Keywords.
    --keywords | -k )
        shift
        at_groups_selected=$at_help_all
        for at_keyword in `IFS=,; set X $1; shift; echo ${1+$@}`
        do
          # It is on purpose that we match the test group titles too.
          at_groups_selected=`echo "$at_groups_selected" |
			      grep -i "^[^;]*;[^;]*;.*$at_keyword"`
        done
        at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
	# Smash the end of lines.
	at_groups_selected=`echo $at_groups_selected`
        at_groups="$at_groups$at_groups_selected "
        ;;

    *=*)
  	at_envvar=`expr "x$1" : 'x\([^=]*\)='`
  	# Reject names that are not valid shell variable names.
  	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
  	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
   { (exit 1); exit 1; }; }
  	at_value=`expr "x$1" : 'x[^=]*=\(.*\)'`
  	at_value=`echo "$at_value" | sed "s/'/'\\\\\\\\''/g"`
  	eval "$at_envvar='$at_value'"
  	export $at_envvar
	# Propagate to debug scripts.
  	at_debug_args="$at_debug_args $1"
  	;;

     *) echo "$as_me: invalid option: $1" >&2
        echo "Try \`$0 --help' for more information." >&2
        exit 1
        ;;
  esac
  shift
done

# Selected test groups.
test -z "$at_groups" && at_groups=$at_groups_all

# Help message.
if $at_help_p; then
  cat <<_ATEOF
Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]

Run all the tests, or the selected TESTS, and save a detailed log file.
Upon failure, create debugging scripts.

You should not change environment variables unless explicitly passed
as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
to exercise.  Each relative directory is expanded as build and source
directories relatively to the top level of this distribution.  E.g.,

  $ $0 AUTOTEST_PATH=bin

possibly amounts into

  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH

Operation modes:
  -h, --help     print the help message, then exit
  -V, --version  print version number, then exit
  -c, --clean    remove all the files this test suite might create and exit
  -l, --list     describes all the tests, or the selected TESTS

Execution tuning:
  -k, --keywords=KEYWORDS
                 select the tests matching all the comma separated KEYWORDS
                 accumulates
  -e, --errexit  abort as soon as a test fails; implies --debug
  -v, --verbose  force more detailed output
                 default for debugging scripts
  -d, --debug    inhibit clean up and debug script creation
                 default for debugging scripts
  -x, --trace    enable tests shell tracing

Report bugs to <bug-m4@gnu.org>.
_ATEOF
  exit 0
fi

# List of tests.
if $at_list_p; then
  cat <<_ATEOF
GNU m4 1.4q test suite test groups:

 NUM: FILENAME:LINE      TEST-GROUP-NAME
      KEYWORDS

_ATEOF
  # "  1 42  45 " => "^(1|42|45);".
  at_groups_pattern=`echo "$at_groups" | sed 's/^  *//;s/  *$//;s/  */|/g'`
  echo "$at_help_all" |
    awk 'BEGIN { FS = ";" }
         { if ($1 !~ /^('"$at_groups_pattern"')$/) next }
         { if ($1) printf " %3d: %-18s %s\n", $1, $2, $3
           if ($4) printf "      %s\n", $4 } '
  exit 0
fi

# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package.  Then expand it into build/src parts, since users
# may create executables in both places.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
at_path=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $AUTOTEST_PATH $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
  [\\/]* | ?:[\\/]* )
    at_path=$at_path$PATH_SEPARATOR$as_dir
    ;;
  * )
    if test -z "$at_top_builddir"; then
      # Stand-alone test suite.
      at_path=$at_path$PATH_SEPARATOR$as_dir
    else
      # Embedded test suite.
      at_path=$at_path$PATH_SEPARATOR$at_top_builddir/$as_dir
      at_path=$at_path$PATH_SEPARATOR$at_top_srcdir/$as_dir
    fi
    ;;
esac
done


# Now build and simplify PATH.
PATH=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $at_path
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
test -d "$as_dir" || continue
case $PATH in
                  $as_dir                 | \
                  $as_dir$PATH_SEPARATOR* | \
  *$PATH_SEPARATOR$as_dir                 | \
  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;

  '') PATH=$as_dir ;;
   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
esac
done

export PATH

# Setting up the FDs.
# 5 is stdout conditioned by verbosity.
if test $at_verbose = echo; then
  exec 5>&1
else
  exec 5>/dev/null
fi

# 6 is the log file.  To be preserved if `-d'.

if $at_debug_p; then
  exec 6>/dev/null
else
  exec 6>$as_me.log
fi

# Banners and logs.
cat <<\_ASBOX
## ----------------------- ##
## GNU m4 1.4q test suite. ##
## ----------------------- ##
_ASBOX
{
  cat <<\_ASBOX
## ----------------------- ##
## GNU m4 1.4q test suite. ##
## ----------------------- ##
_ASBOX
  echo

  echo "$as_me: command line was:"
  echo "  $ $0 $at_cli_args"
  echo

  # Try to find a few ChangeLogs in case it might help determining the
  # exact version.  Use the relative dir: if the top dir is a symlink,
  # find will not follow it (and options to follow the links are not
  # portable), which would result in no output here.
  if test -n "$at_top_srcdir"; then
    cat <<\_ASBOX
## ----------- ##
## ChangeLogs. ##
## ----------- ##
_ASBOX
    echo
    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
    do
      echo "$as_me: $at_file:"
      sed 's/^/| /;10q' $at_file
      echo
    done

    {
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done

}
    echo
  fi

  # Contents of the config files.
  for at_file in atconfig atlocal
  do
    test -r $at_file || continue
    echo "$as_me: $at_file:"
    sed 's/^/| /' $at_file
    echo
  done

  cat <<\_ASBOX
## ---------------- ##
## Tested programs. ##
## ---------------- ##
_ASBOX
  echo
} >&6

# Report what programs are being tested.
for at_program in : $at_tested
do
  test "$at_program" = : && continue
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -f $as_dir/$at_program && break
done

  if test -f $as_dir/$at_program; then
    {
      echo "testsuite.at:50: $as_dir/$at_program --version"
      $as_dir/$at_program --version
      echo
    } >&6 2>&1
  else
    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&6
echo "$as_me: error: cannot find $at_program" >&2;}
   { (exit 1); exit 1; }; }
  fi
done

{
  cat <<\_ASBOX
## --------------------------- ##
## Silently running the tests. ##
## --------------------------- ##
_ASBOX
} >&6

at_start_date=`date`
at_start_time=`(date +%s) 2>/dev/null`
echo "$as_me: starting at: $at_start_date" >&6
at_pass_list=
at_fail_list=
at_skip_list=
at_group_count=0

# Create the master directory if it doesn't already exist.
test -d $at_suite_dir ||
  mkdir $at_suite_dir ||
  { { echo "$as_me:$LINENO: error: cannot create $at_suite_dir" >&6
echo "$as_me: error: cannot create $at_suite_dir" >&2;}
   { (exit 1); exit 1; }; }

# Can we diff with `/dev/null'?  DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
  at_devnull=/dev/null
else
  at_devnull=$at_suite_dir/devnull
  cp /dev/null $at_devnull
fi

# Use `diff -u' when possible.
if diff -u $at_devnull $at_devnull >/dev/null 2>&1; then
  at_diff='diff -u'
else
  at_diff=diff
fi


for at_group in $at_groups
do
  # Be sure to come back to the top test directory.
  cd $at_suite_dir

  case $at_group in
    banner-*) ;;
    *)
     # Skip tests we already run (using --keywords makes it easy to get
     # duplication).
     case " $at_pass_test $at_skip_test $at_fail_test " in
       *" $at_group "* ) continue;;
     esac

     # Normalize the test group number.
     at_group_normalized=`expr "00000$at_group" : ".*\($at_format\)"`

     # Create a fresh directory for the next test group, and enter.
     at_group_dir=$at_suite_dir/$at_group_normalized
     rm -rf $at_group_dir
     mkdir $at_group_dir ||
       { { echo "$as_me:$LINENO: error: cannot create $at_group_dir" >&6
echo "$as_me: error: cannot create $at_group_dir" >&2;}
   { (exit 1); exit 1; }; }
     cd $at_group_dir
    ;;
  esac

  at_status=0
  # Clearly separate the test groups when verbose.
  test $at_group_count != 0 && $at_verbose
  case $at_group in

  banner-1 ) # Banner 1. macros.at:19
    cat <<\_ATEOF

Macro definitions.

_ATEOF
    ;;

  1 ) # 1. macros.at:29: Arity and defn
    at_setup_line='macros.at:29'
    $at_verbose "1. macros.at:29: testing Arity and defn..."
    $at_quiet $ECHO_N "  1: macros.at:29      $ECHO_C"
    (
      $at_traceon


# Check that the arity checking of define is correctly propagated.

cat >input.m4 <<'_ATEOF'
define(`defun', defn(`define'))
define
define(`foo')
define(`foo', `bar')
define(`foo', `bar', baz')

defun
defun(`foo')
defun(`foo', `bar')
defun(`foo', `bar', baz')
_ATEOF


cat >expout <<'_ATEOF'

define




defun



_ATEOF


$at_traceoff
$at_verbose "macros.at:62: m4 -b -d input.m4"
echo macros.at:62 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 5: Warning: define: too many arguments (ignored): 3 > 2
m4: input.m4: 10: Warning: defun: too many arguments (ignored): 3 > 2
" | $at_diff - $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:62: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  2 ) # 2. macros.at:71: Arity, defn, and freeze
    at_setup_line='macros.at:71'
    $at_verbose "2. macros.at:71: testing Arity, defn, and freeze..."
    $at_quiet $ECHO_N "  2: macros.at:71      $ECHO_C"
    (
      $at_traceon


cat >freezeme.m4 <<'_ATEOF'
define(`defun', defn(`define'))dnl
undefine(`define')dnl
_ATEOF


$at_traceoff
$at_verbose "macros.at:78: m4 -b -d --freeze-state=frozen.m4f freezeme.m4"
echo macros.at:78 >$at_check_line_file
( $at_traceon; m4 -b -d --freeze-state=frozen.m4f freezeme.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:78: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



cat >input.m4 <<'_ATEOF'
defun
defun(`foo')
defun(`foo', `bar')
defun(`foo', `bar', baz')
_ATEOF


cat >expout <<'_ATEOF'
defun



_ATEOF


$at_traceoff
$at_verbose "macros.at:96: m4 -b -d --reload-state=frozen.m4f input.m4"
echo macros.at:96 >$at_check_line_file
( $at_traceon; m4 -b -d --reload-state=frozen.m4f input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 4: Warning: defun: too many arguments (ignored): 3 > 2
" | $at_diff - $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:96: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  3 ) # 3. macros.at:105: pushdef/popdef
    at_setup_line='macros.at:105'
    $at_verbose "3. macros.at:105: testing pushdef/popdef..."
    $at_quiet $ECHO_N "  3: macros.at:105     $ECHO_C"
    (
      $at_traceon


cat >pushpop.m4 <<'_ATEOF'
divert(-1)
pushdef(`hej', `def 1.')
dumpdef(`hej')
pushdef(`hej', `def 2.')
dumpdef(`hej')
pushdef(`hej', `def 3.')
dumpdef(`hej')
pushdef(`hej', `def 4.')
dumpdef(`hej')

popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')

dumpdef(`mac2')
popdef(`mac2')
_ATEOF


$at_traceoff
$at_verbose "macros.at:142: m4 -b -d pushpop.m4"
echo macros.at:142 >$at_check_line_file
( $at_traceon; m4 -b -d pushpop.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "hej:	\`def 1.'
hej:	\`def 2.'
hej:	\`def 3.'
hej:	\`def 4.'
hej:	\`def 3.'
hej:	\`def 2.'
hej:	\`def 1.'
m4: pushpop.m4: 18: Warning: dumpdef: undefined name: hej
m4: pushpop.m4: 20: Warning: dumpdef: undefined name: mac2
m4: pushpop.m4: 21: Warning: popdef: undefined name: mac2
" | $at_diff - $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:142: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  4 ) # 4. macros.at:152: Tracing Hanoi Towers
    at_setup_line='macros.at:152'
    $at_verbose "4. macros.at:152: testing Tracing Hanoi Towers..."
    $at_quiet $ECHO_N "  4: macros.at:152     $ECHO_C"
    (
      $at_traceon


cat >trace.m4 <<'_ATEOF'
divert(-1)

# move(from, to)
define(`move', `Move one disk from `$1' to `$2'.
')

# _hanoi (cnt, from, to, aux)
define(`_hanoi', `ifelse(eval(`$1'<=1), 1, `move($2, $3)',
`_hanoi(decr($1), $2, $4, $3)move($2, $3)_hanoi(decr($1), $4, $3, $2)')')

# hanoi (cnt)
define(`hanoi', `_hanoi(`$1', source, destination, auxilliary)')
divert`'dnl

# Debugmode t
debugmode(`t')
hanoi(2)

# Debugmode taeq
debugmode(`taeq')
hanoi(2)

# Debugmode OFF
debugmode
hanoi(2)

# Debugmode ae
debugmode(`ae')
traceon(`move', `_hanoi')
hanoi(2)
_ATEOF


cat >expout <<'_ATEOF'

# Debugmode t

Move one disk from source to auxilliary.
Move one disk from source to destination.
Move one disk from auxilliary to destination.


# Debugmode taeq

Move one disk from source to auxilliary.
Move one disk from source to destination.
Move one disk from auxilliary to destination.


# Debugmode OFF

Move one disk from source to auxilliary.
Move one disk from source to destination.
Move one disk from auxilliary to destination.


# Debugmode ae


Move one disk from source to auxilliary.
Move one disk from source to destination.
Move one disk from auxilliary to destination.

_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- hanoi
m4trace: -1- _hanoi
m4trace: -2- eval
m4trace: -1- ifelse
m4trace: -2- decr
m4trace: -1- _hanoi
m4trace: -2- eval
m4trace: -1- ifelse
m4trace: -1- move
m4trace: -1- move
m4trace: -2- decr
m4trace: -1- _hanoi
m4trace: -2- eval
m4trace: -1- ifelse
m4trace: -1- move

m4trace: -1- hanoi(`2') -> `_hanoi(`2', source, destination, auxilliary)'
m4trace: -1- _hanoi(`2', `source', `destination', `auxilliary') -> `ifelse(eval(`2'<=1), 1, `move(source, destination)',
`_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)')'
m4trace: -2- eval(`2<=1') -> `0'
m4trace: -1- ifelse(`0', `1', `move(source, destination)', `_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)') -> `_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)'
m4trace: -2- decr(`2') -> `1'
m4trace: -1- _hanoi(`1', `source', `auxilliary', `destination') -> `ifelse(eval(`1'<=1), 1, `move(source, auxilliary)',
`_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)')'
m4trace: -2- eval(`1<=1') -> `1'
m4trace: -1- ifelse(`1', `1', `move(source, auxilliary)', `_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)') -> `move(source, auxilliary)'
m4trace: -1- move(`source', `auxilliary') -> `Move one disk from `source' to `auxilliary'.
'
m4trace: -1- move(`source', `destination') -> `Move one disk from `source' to `destination'.
'
m4trace: -2- decr(`2') -> `1'
m4trace: -1- _hanoi(`1', `auxilliary', `destination', `source') -> `ifelse(eval(`1'<=1), 1, `move(auxilliary, destination)',
`_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)')'
m4trace: -2- eval(`1<=1') -> `1'
m4trace: -1- ifelse(`1', `1', `move(auxilliary, destination)', `_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)') -> `move(auxilliary, destination)'
m4trace: -1- move(`auxilliary', `destination') -> `Move one disk from `auxilliary' to `destination'.
'
m4trace: -1- debugmode
m4trace: -1- _hanoi(2, source, destination, auxilliary) -> ifelse(eval(`2'<=1), 1, `move(source, destination)',
`_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)')
m4trace: -1- _hanoi(1, source, auxilliary, destination) -> ifelse(eval(`1'<=1), 1, `move(source, auxilliary)',
`_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)')
m4trace: -1- move(source, auxilliary) -> Move one disk from `source' to `auxilliary'.

m4trace: -1- move(source, destination) -> Move one disk from `source' to `destination'.

m4trace: -1- _hanoi(1, auxilliary, destination, source) -> ifelse(eval(`1'<=1), 1, `move(auxilliary, destination)',
`_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)')
m4trace: -1- move(auxilliary, destination) -> Move one disk from `auxilliary' to `destination'.

_ATEOF


$at_traceoff
$at_verbose "macros.at:272: m4 -b -d trace.m4"
echo macros.at:272 >$at_check_line_file
( $at_traceon; m4 -b -d trace.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:272: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  5 ) # 5. macros.at:282: Propagation of traceon
    at_setup_line='macros.at:282'
    $at_verbose "5. macros.at:282: testing Propagation of traceon..."
    $at_quiet $ECHO_N "  5: macros.at:282     $ECHO_C"
    (
      $at_traceon


cat >trace2.m4 <<'_ATEOF'
traceon(`define')
debugmode(`aeq')

# copy the `define' builtin definition to another symbol
define(`my_define', defn(`define'))

# delete the original
undefine(`define')

# Does it work?
my_define(`foo', `bar')

# Use the new definition to redefine the original symbol
my_define(`define', defn(`my_define'))

# Torture the flag propogation
undefine(`my_define')
define(`my_define', defn(`define'))

# There are now 2 symbols pointing to the same builtin function
my_define(`foo', `bar')
define(`foo', `bar')
_ATEOF


cat >expout <<'_ATEOF'



# copy the `define' builtin definition to another symbol


# delete the original


# Does it work?


# Use the new definition to redefine the original symbol


# Torture the flag propogation



# There are now 2 symbols pointing to the same builtin function


_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- define(`my_define', <define>)
m4trace: -1- define(`my_define', <define>)
m4trace: -1- define(`foo', `bar')
_ATEOF


$at_traceoff
$at_verbose "macros.at:340: m4 -b -d trace2.m4"
echo macros.at:340 >$at_check_line_file
( $at_traceon; m4 -b -d trace2.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:340: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  6 ) # 6. macros.at:350: Propagation of --trace
    at_setup_line='macros.at:350'
    $at_verbose "6. macros.at:350: testing Propagation of --trace..."
    $at_quiet $ECHO_N "  6: macros.at:350     $ECHO_C"
    (
      $at_traceon


cat >trace3.m4 <<'_ATEOF'
# copy the `define' builtin definition to another symbol
define(`my_define', defn(`define'))

# delete the original
undefine(`define')

# Does it work?
my_define(`foo', `bar')

# Use the new definition to redefine the original symbol
my_define(`define', defn(`my_define'))

# Torture the flag propogation
undefine(`my_define')
define(`my_define', defn(`define'))

# There are now 2 symbols pointing to the same builtin function
my_define(`foo', `bar')
define(`foo', `bar')
_ATEOF


cat >expout <<'_ATEOF'
# copy the `define' builtin definition to another symbol


# delete the original


# Does it work?


# Use the new definition to redefine the original symbol


# Torture the flag propogation



# There are now 2 symbols pointing to the same builtin function


_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- define(`my_define', <define>)
m4trace: -1- define(`my_define', <define>)
m4trace: -1- define(`foo', `bar')
_ATEOF


$at_traceoff
$at_verbose "macros.at:402: m4 -b -d -t define -daeq trace3.m4"
echo macros.at:402 >$at_check_line_file
( $at_traceon; m4 -b -d -t define -daeq trace3.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "macros.at:402: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  banner-2 ) # Banner 2. builtins.at:19
    cat <<\_ATEOF

Torturing builtins.

_ATEOF
    ;;

  7 ) # 7. builtins.at:26: divert
    at_setup_line='builtins.at:26'
    $at_verbose "7. builtins.at:26: testing divert..."
    $at_quiet $ECHO_N "  7: builtins.at:26    $ECHO_C"
    (
      $at_traceon


cat >divert.m4 <<'_ATEOF'
divert(1)Text diverted a first time.
divert(0)undivert(1)dnl
divert(1)Text diverted a second time.
divert(0)undivert(1)dnl
_ATEOF


$at_traceoff
$at_verbose "builtins.at:38: m4 -b -d divert.m4"
echo builtins.at:38 >$at_check_line_file
( $at_traceon; m4 -b -d divert.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "Text diverted a first time.
Text diverted a second time.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:38: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  8 ) # 8. builtins.at:48: debug
    at_setup_line='builtins.at:48'
    $at_verbose "8. builtins.at:48: testing debug..."
    $at_quiet $ECHO_N "  8: builtins.at:48    $ECHO_C"
    (
      $at_traceon


cat >debug.m4 <<'_ATEOF'
define(`countdown', `$1 ifelse(eval($1 > 0), 1, `countdown(decr($1))', `Liftoff')')
debugmode(`aeqc')
traceon(`countdown')
countdown(2)
_ATEOF


cat >expout <<'_ATEOF'



2 1 0 Liftoff
_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- countdown ...
m4trace: -1- countdown(`2') -> ???
m4trace: -1- countdown(...) -> `2 ifelse(eval(2 > 0), 1, `countdown(decr(2))', `Liftoff')'
m4trace: -1- countdown ...
m4trace: -1- countdown(`1') -> ???
m4trace: -1- countdown(...) -> `1 ifelse(eval(1 > 0), 1, `countdown(decr(1))', `Liftoff')'
m4trace: -1- countdown ...
m4trace: -1- countdown(`0') -> ???
m4trace: -1- countdown(...) -> `0 ifelse(eval(0 > 0), 1, `countdown(decr(0))', `Liftoff')'
_ATEOF


$at_traceoff
$at_verbose "builtins.at:76: m4 -b -d debug.m4"
echo builtins.at:76 >$at_check_line_file
( $at_traceon; m4 -b -d debug.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:76: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  9 ) # 9. builtins.at:86: esyscmd
    at_setup_line='builtins.at:86'
    $at_verbose "9. builtins.at:86: testing esyscmd..."
    $at_quiet $ECHO_N "  9: builtins.at:86    $ECHO_C"
    (
      $at_traceon


cat >esyscmd.m4 <<'_ATEOF'
# Cannot use real hostname program because test would fail
define(`hostname', esyscmd(`echo www.gnu.org'))dnl
`hostname = >>'hostname`<<'
define(`hostname',
pushdef(`_tmp', `$1')_tmp(translit(esyscmd(`echo www.gnu.org'), `.', `,'))`'popdef(`_tmp'))dnl
`hostname = >>'hostname`<<'
_ATEOF


$at_traceoff
$at_verbose "builtins.at:102: m4 -b -d esyscmd.m4"
echo builtins.at:102 >$at_check_line_file
( $at_traceon; m4 -b -d esyscmd.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "# Cannot use real hostname program because test would fail
hostname = >>www.gnu.org
<<
hostname = >>www<<
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:102: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  10 ) # 10. builtins.at:112: exp
    at_setup_line='builtins.at:112'
    $at_verbose "10. builtins.at:112: testing exp..."
    $at_quiet $ECHO_N " 10: builtins.at:112   $ECHO_C"
    (
      $at_traceon


cat >exp.m4 <<'_ATEOF'
define(`countdown', `$1
ifelse(eval($1 > 0), 1, `countdown(decr($1))', `Done')')dnl
countdown(7)
_ATEOF


$at_traceoff
$at_verbose "builtins.at:130: m4 -b -d exp.m4"
echo builtins.at:130 >$at_check_line_file
( $at_traceon; m4 -b -d exp.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "7
6
5
4
3
2
1
0
Done
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:130: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  11 ) # 11. builtins.at:140: gmp
    at_setup_line='builtins.at:140'
    $at_verbose "11. builtins.at:140: testing gmp..."
    $at_quiet $ECHO_N " 11: builtins.at:140   $ECHO_C"
    (
      $at_traceon


# cannot perform test without --with-gmp
$at_traceoff
$at_verbose "builtins.at:143: test \"\$USE_GMP\" = yes || exit 77"
echo builtins.at:143 >$at_check_line_file
( $at_traceon; test "$USE_GMP" = yes || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:143: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >in <<'_ATEOF'
divert(-1)
# forloop(i, from, to, stmt)

define(`forloop', `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
define(`_forloop',
       `$4`'ifelse($1, `$3', ,
			 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
divert
forloop(`x', 1, 100, `2**x = mpeval(2**x)
')
_ATEOF


cat >expout <<'_ATEOF'

2**1 = 2
2**2 = 4
2**3 = 8
2**4 = 16
2**5 = 32
2**6 = 64
2**7 = 128
2**8 = 256
2**9 = 512
2**10 = 1024
2**11 = 2048
2**12 = 4096
2**13 = 8192
2**14 = 16384
2**15 = 32768
2**16 = 65536
2**17 = 131072
2**18 = 262144
2**19 = 524288
2**20 = 1048576
2**21 = 2097152
2**22 = 4194304
2**23 = 8388608
2**24 = 16777216
2**25 = 33554432
2**26 = 67108864
2**27 = 134217728
2**28 = 268435456
2**29 = 536870912
2**30 = 1073741824
2**31 = 2147483648
2**32 = 4294967296
2**33 = 8589934592
2**34 = 17179869184
2**35 = 34359738368
2**36 = 68719476736
2**37 = 137438953472
2**38 = 274877906944
2**39 = 549755813888
2**40 = 1099511627776
2**41 = 2199023255552
2**42 = 4398046511104
2**43 = 8796093022208
2**44 = 17592186044416
2**45 = 35184372088832
2**46 = 70368744177664
2**47 = 140737488355328
2**48 = 281474976710656
2**49 = 562949953421312
2**50 = 1125899906842624
2**51 = 2251799813685248
2**52 = 4503599627370496
2**53 = 9007199254740992
2**54 = 18014398509481984
2**55 = 36028797018963968
2**56 = 72057594037927936
2**57 = 144115188075855872
2**58 = 288230376151711744
2**59 = 576460752303423488
2**60 = 1152921504606846976
2**61 = 2305843009213693952
2**62 = 4611686018427387904
2**63 = 9223372036854775808
2**64 = 18446744073709551616
2**65 = 36893488147419103232
2**66 = 73786976294838206464
2**67 = 147573952589676412928
2**68 = 295147905179352825856
2**69 = 590295810358705651712
2**70 = 1180591620717411303424
2**71 = 2361183241434822606848
2**72 = 4722366482869645213696
2**73 = 9444732965739290427392
2**74 = 18889465931478580854784
2**75 = 37778931862957161709568
2**76 = 75557863725914323419136
2**77 = 151115727451828646838272
2**78 = 302231454903657293676544
2**79 = 604462909807314587353088
2**80 = 1208925819614629174706176
2**81 = 2417851639229258349412352
2**82 = 4835703278458516698824704
2**83 = 9671406556917033397649408
2**84 = 19342813113834066795298816
2**85 = 38685626227668133590597632
2**86 = 77371252455336267181195264
2**87 = 154742504910672534362390528
2**88 = 309485009821345068724781056
2**89 = 618970019642690137449562112
2**90 = 1237940039285380274899124224
2**91 = 2475880078570760549798248448
2**92 = 4951760157141521099596496896
2**93 = 9903520314283042199192993792
2**94 = 19807040628566084398385987584
2**95 = 39614081257132168796771975168
2**96 = 79228162514264337593543950336
2**97 = 158456325028528675187087900672
2**98 = 316912650057057350374175801344
2**99 = 633825300114114700748351602688
2**100 = 1267650600228229401496703205376

_ATEOF


$at_traceoff
$at_verbose "builtins.at:263: m4 -b -d -m mpeval in"
echo builtins.at:263 >$at_check_line_file
( $at_traceon; m4 -b -d -m mpeval in ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:263: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  12 ) # 12. builtins.at:273: include
    at_setup_line='builtins.at:273'
    $at_verbose "12. builtins.at:273: testing include..."
    $at_quiet $ECHO_N " 12: builtins.at:273   $ECHO_C"
    (
      $at_traceon


cat >include.m4 <<'_ATEOF'
Beginning.
include(`NOFILE')
Intermediate
include(`incl-test.m4')
After
include(`NOFILE')
very late
_ATEOF


cat >incl-test.m4 <<'_ATEOF'
dnl noauto
`include test file.'
define()
_ATEOF


cat >expout <<'_ATEOF'
Beginning.

Intermediate
include test file.


After

very late
_ATEOF


cat >experr <<'_ATEOF'
m4: include.m4: 2: Cannot open NOFILE: No such file or directory
m4: include.m4: 6: Cannot open NOFILE: No such file or directory
_ATEOF


$at_traceoff
$at_verbose "builtins.at:308: m4 -b -d include.m4"
echo builtins.at:308 >$at_check_line_file
( $at_traceon; m4 -b -d include.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:308: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  13 ) # 13. builtins.at:318: indir
    at_setup_line='builtins.at:318'
    $at_verbose "13. builtins.at:318: testing indir..."
    $at_quiet $ECHO_N " 13: builtins.at:318   $ECHO_C"
    (
      $at_traceon


cat >indir.m4 <<'_ATEOF'
define(`%%$$##', `>>>$0<<< cnt $#')

# indir(`%%$$##', nonsense, nonsense)
indir(`%%$$##', nonsense, nonsense)

# indir(`indir', `%%$$##', nonsense)
indir(`indir', `%%$$##', nonsense)

# indir(`indir', `indir', `indir', `indir', `%%$$##')
indir(`indir', `indir', `indir', `indir', `%%$$##')
_ATEOF


cat >expout <<'_ATEOF'


# indir(`%%$$##', nonsense, nonsense)
>>>%%$$##<<< cnt 2

# indir(`indir', `%%$$##', nonsense)
>>>%%$$##<<< cnt 1

# indir(`indir', `indir', `indir', `indir', `%%$$##')
>>>%%$$##<<< cnt 0
_ATEOF


$at_traceoff
$at_verbose "builtins.at:346: m4 -b -d indir.m4"
echo builtins.at:346 >$at_check_line_file
( $at_traceon; m4 -b -d indir.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:346: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  14 ) # 14. builtins.at:356: multiquotes
    at_setup_line='builtins.at:356'
    $at_verbose "14. builtins.at:356: testing multiquotes..."
    $at_quiet $ECHO_N " 14: builtins.at:356   $ECHO_C"
    (
      $at_traceon


cat >multiquotes.m4 <<'_ATEOF'
traceon
changequote([,])dnl
changequote([``], [''])dnl
````traceon''''
define(``foo'', ````FOO'''')dnl
dumpdef(``foo'')dnl
changequote(``!'', ``!'')dnl
!foo!
foo
dumpdef(!foo!)dnl
define(!bar!, !BAR!)
bar
changequote(!>*>*>*>*>!, !<*<*<*<*<!)dnl five of each
>*>*>*>*>foo bar<*<*<*<*<
foo bar
>*>*>*>*>*>*><*<*<*<*<*<*<
dumpdef(>*>*>*>*>foo<*<*<*<*<, >*>*>*>*>bar<*<*<*<*<)dnl
_ATEOF


cat >expout <<'_ATEOF'

``traceon''
foo
``FOO''

BAR
foo bar
``FOO'' BAR
*>*>*<*<
_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- changequote(`[', `]')
m4trace: -1- dnl
m4trace: -1- changequote([``], [''])
m4trace: -1- dnl
m4trace: -1- define(``foo'', ````FOO'''')
m4trace: -1- dnl
foo:	````FOO''''
m4trace: -1- dumpdef(``foo'')
m4trace: -1- dnl
m4trace: -1- changequote(``!'', ``!'')
m4trace: -1- dnl
foo:	!``FOO''!
m4trace: -1- dumpdef(!foo!)
m4trace: -1- dnl
m4trace: -1- define(!bar!, !BAR!)
m4trace: -1- changequote(!>*>*>*>*>!, !<*<*<*<*<!)
m4trace: -1- dnl
bar:	>*>*>*>*>BAR<*<*<*<*<
foo:	>*>*>*>*>``FOO''<*<*<*<*<
m4trace: -1- dumpdef(>*>*>*>*>foo<*<*<*<*<, >*>*>*>*>bar<*<*<*<*<)
m4trace: -1- dnl
_ATEOF


$at_traceoff
$at_verbose "builtins.at:414: m4 -b -d multiquotes.m4"
echo builtins.at:414 >$at_check_line_file
( $at_traceon; m4 -b -d multiquotes.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:414: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  15 ) # 15. builtins.at:424: patsubst
    at_setup_line='builtins.at:424'
    $at_verbose "15. builtins.at:424: testing patsubst..."
    $at_quiet $ECHO_N " 15: builtins.at:424   $ECHO_C"
    (
      $at_traceon


cat >patsubst.m4 <<'_ATEOF'
# traceon(`patsubst')
patsubst(`GNUs not Unix.', `^', `OBS: ')
patsubst(`GNUs not Unix.', `\<', `OBS: ')
patsubst(`GNUs not Unix.', `\<\w', `\0=')
patsubst(`GNUs not Unix.', `\w*', `(\0)')
patsubst(`GNUs not Unix.', `\w+', `(\0)')
patsubst(`GNUs not Unix.', `\w+')
patsubst(`GNUs	 not  	 Unix.', `[ 	]+', ` ')
_ATEOF


cat >expout <<'_ATEOF'
# traceon(`patsubst')
OBS: GNUs not Unix.
OBS: GNUs OBS: not OBS: Unix.
G=NUs n=ot U=nix.
(GNUs)() (not)() (Unix)().
(GNUs) (not) (Unix).
  .
GNUs not Unix.
_ATEOF


cat >experr <<'_ATEOF'
m4: patsubst.m4: 4: WARNING: \0 will disappear, use \& instead in replacements
_ATEOF


$at_traceoff
$at_verbose "builtins.at:452: m4 -b -d patsubst.m4"
echo builtins.at:452 >$at_check_line_file
( $at_traceon; m4 -b -d patsubst.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:452: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  16 ) # 16. builtins.at:462: regexp
    at_setup_line='builtins.at:462'
    $at_verbose "16. builtins.at:462: testing regexp..."
    $at_quiet $ECHO_N " 16: builtins.at:462   $ECHO_C"
    (
      $at_traceon


cat >regexp.m4 <<'_ATEOF'
traceon(`regexp')dnl
regexp(`hej med dig', `.*', `>>\0<<')
regexp(`hej med dig', `\w*', `>>\0<<')
regexp(`hej med dig', `.+', `>>\0<<')
regexp(`hej med dig', `m\w+', `>>\0<<')
regexp(`hej med dig', `m\(.*\)', `>>\0<< >>\1<<')

regexp(`hej med dig', `.*')
regexp(`hej med dig', `\w*')
regexp(`hej med dig', `.+')
regexp(`hej med dig', `m\w+')
regexp(`hej med dig', `m\(.*\)')
_ATEOF


cat >expout <<'_ATEOF'
>>hej med dig<<
>>hej<<
>>hej med dig<<
>>med<<
>>med dig<< >>ed dig<<

0
0
0
4
4
_ATEOF


cat >experr <<'_ATEOF'
m4: regexp.m4: 2: WARNING: \0 will disappear, use \& instead in replacements
m4trace: -1- regexp(`hej med dig', `.*', `>>\0<<') -> `>>hej med dig<<'
m4trace: -1- regexp(`hej med dig', `\w*', `>>\0<<') -> `>>hej<<'
m4trace: -1- regexp(`hej med dig', `.+', `>>\0<<') -> `>>hej med dig<<'
m4trace: -1- regexp(`hej med dig', `m\w+', `>>\0<<') -> `>>med<<'
m4trace: -1- regexp(`hej med dig', `m\(.*\)', `>>\0<< >>\1<<') -> `>>med dig<< >>ed dig<<'
m4trace: -1- regexp(`hej med dig', `.*') -> `0'
m4trace: -1- regexp(`hej med dig', `\w*') -> `0'
m4trace: -1- regexp(`hej med dig', `.+') -> `0'
m4trace: -1- regexp(`hej med dig', `m\w+') -> `4'
m4trace: -1- regexp(`hej med dig', `m\(.*\)') -> `4'
_ATEOF


$at_traceoff
$at_verbose "builtins.at:507: m4 -b -d regexp.m4"
echo builtins.at:507 >$at_check_line_file
( $at_traceon; m4 -b -d regexp.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:507: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  17 ) # 17. builtins.at:517: sync-lines
    at_setup_line='builtins.at:517'
    $at_verbose "17. builtins.at:517: testing sync-lines..."
    $at_quiet $ECHO_N " 17: builtins.at:517   $ECHO_C"
    (
      $at_traceon


cat >in <<'_ATEOF'
syncoutput(on)dnl
# Several input lines, expanding to one
define(`foo', ``foo' line one.
`foo' line two.
`foo' line three.') xyz
foo
# Several input lines, expanding to none
define(`foo', ``foo' line one.
`foo' line two.
`foo' line three.')dnl
# one input line, expanding to several output lines
foo foo
_ATEOF


$at_traceoff
$at_verbose "builtins.at:556: m4 -b -d in"
echo builtins.at:556 >$at_check_line_file
( $at_traceon; m4 -b -d in ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "#line 2 \"in\"
# Several input lines, expanding to one
#line 5
 xyz
foo line one.
#line 6
foo line two.
#line 6
foo line three.
# Several input lines, expanding to none
#line 11
# one input line, expanding to several output lines
foo line one.
#line 12
foo line two.
#line 12
foo line three. foo line one.
#line 12
foo line two.
#line 12
foo line three.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:556: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  18 ) # 18. builtins.at:566: translit
    at_setup_line='builtins.at:566'
    $at_verbose "18. builtins.at:566: testing translit..."
    $at_quiet $ECHO_N " 18: builtins.at:566   $ECHO_C"
    (
      $at_traceon


cat >translit.m4 <<'_ATEOF'
# traceon(`translit')dnl
translit(`GNUs not Unix', `a-z')
translit(`GNUs not Unix', `a-z', `A-Z')
translit(`GNUs not Unix', `A-Z', `a-z')
translit(`GNUs not Unix', `A-Z')
translit(`a-z', `a-')
translit(`A-Z', `A-Z-', `-A-Z')
translit(`GNUs not Unix', `Z-A', `a-z')
_ATEOF


$at_traceoff
$at_verbose "builtins.at:588: m4 -b -d translit.m4"
echo builtins.at:588 >$at_check_line_file
( $at_traceon; m4 -b -d translit.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "# traceon(\`translit')dnl
GNU  U
GNUS NOT UNIX
gnus not unix
s not nix
z
-ZY
tmfs not fnix
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:588: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  19 ) # 19. builtins.at:598: undivert
    at_setup_line='builtins.at:598'
    $at_verbose "19. builtins.at:598: testing undivert..."
    $at_quiet $ECHO_N " 19: builtins.at:598   $ECHO_C"
    (
      $at_traceon


cat >undivert.m4 <<'_ATEOF'
define(`undiverted', `UNDIVERTED')
# undiverted file.
undivert(`undivert.incl')
# included file.
include(`undivert.incl')
_ATEOF


cat >undivert.incl <<'_ATEOF'
This is to be undiverted soon.
_ATEOF


$at_traceoff
$at_verbose "builtins.at:620: m4 -b -d undivert.m4"
echo builtins.at:620 >$at_check_line_file
( $at_traceon; m4 -b -d undivert.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
# undiverted file.
This is to be undiverted soon.

# included file.
This is to be UNDIVERTED soon.

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:620: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  20 ) # 20. builtins.at:630: wrap
    at_setup_line='builtins.at:630'
    $at_verbose "20. builtins.at:630: testing wrap..."
    $at_quiet $ECHO_N " 20: builtins.at:630   $ECHO_C"
    (
      $at_traceon


cat >wrap.m4 <<'_ATEOF'
divert(-1)
m4wrap(`Wrapper no. 1
')

m4wrap(`Wrapper no. 2
m4wrap(`Wrapper no. 3
m4wrap(`Wrapper no. 4
')')')
divert
No. 33: The End.
_ATEOF


$at_traceoff
$at_verbose "builtins.at:652: m4 -b -d wrap.m4"
echo builtins.at:652 >$at_check_line_file
( $at_traceon; m4 -b -d wrap.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
No. 33: The End.
Wrapper no. 2
Wrapper no. 1
Wrapper no. 3
Wrapper no. 4
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "builtins.at:652: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  banner-3 ) # Banner 3. options.at:19
    cat <<\_ATEOF

Options.

_ATEOF
    ;;

  21 ) # 21. options.at:26: Discard comments
    at_setup_line='options.at:26'
    $at_verbose "21. options.at:26: testing Discard comments..."
    $at_quiet $ECHO_N " 21: options.at:26     $ECHO_C"
    (
      $at_traceon


cat >in <<'_ATEOF'
This is not a comment # but this is.
# This line should dissappear completely.
This should not disappear.
changecom(`<!--', `-->')
html <!--
comment
 --> ends.
_ATEOF


$at_traceoff
$at_verbose "options.at:42: m4 -b -d -c in"
echo options.at:42 >$at_check_line_file
( $at_traceon; m4 -b -d -c in ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "This is not a comment This should not disappear.

html  ends.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "options.at:42: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  22 ) # 22. options.at:52: import-environment
    at_setup_line='options.at:52'
    $at_verbose "22. options.at:52: testing import-environment..."
    $at_quiet $ECHO_N " 22: options.at:52     $ECHO_C"
    (
      $at_traceon


cat >in <<'_ATEOF'
`TEST'=TEST
`ZAPPED'=ZAPPED
`OVERRIDE'=OVERRIDE
_ATEOF


TEST='This is an environment variable'
export TEST

ZAPPED='This is an environment variable which we will delete'
export ZAPPED

OVERRIDE='This is an environment variable which we will change'
export OVERRIDE

$at_traceoff
$at_verbose "options.at:73: m4 -b -d --import-environment -UZAPPED -DOVERRIDE='It is changed.' in"
echo options.at:73 >$at_check_line_file
( $at_traceon; m4 -b -d --import-environment -UZAPPED -DOVERRIDE='It is changed.' in ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "TEST=This is an environment variable
ZAPPED=ZAPPED
OVERRIDE=It is changed.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "options.at:73: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  banner-4 ) # Banner 4. others.at:19
    cat <<\_ATEOF

Composite macros.

_ATEOF
    ;;

  23 ) # 23. others.at:46: Capitalize
    at_setup_line='others.at:46'
    $at_verbose "23. others.at:46: testing Capitalize..."
    $at_quiet $ECHO_N " 23: others.at:46      $ECHO_C"
    (
      $at_traceon

cat >input.m4 <<'_ATEOF'
dnl
dnl convert to upper- resp. lowercase
define(`upcase', `translit(`$*', `a-z', `A-Z')')
define(`downcase', `translit(`$*', `A-Z', `a-z')')
upcase(`Convert to upper case')
downcase(`Convert To LOWER Case')
dnl
dnl capitalize a single word
define(`capitalize1', `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')
define(`capitalize', `patsubst(`$1', `\w+', ``'capitalize1(`\&')')')
capitalize(`This sentence should be capitalized')
_ATEOF

$at_traceoff
$at_verbose "others.at:46: m4 -b -d input.m4"
echo others.at:46 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

CONVERT TO UPPER CASE
convert to lower case


This Sentence Should Be Capitalized
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:46: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  24 ) # 24. others.at:71: Comments
    at_setup_line='others.at:71'
    $at_verbose "24. others.at:71: testing Comments..."
    $at_quiet $ECHO_N " 24: others.at:71      $ECHO_C"
    (
      $at_traceon

cat >input.m4 <<'_ATEOF'
# An ordinary comment
define(`foo', # A comment in a macro
`Macro `foo' expansion')
foo
define(`comment', `*** Macro `comment' expansion ***')
changecom(`@', `@')
foo
_ATEOF

$at_traceoff
$at_verbose "others.at:71: m4 -b -d input.m4"
echo others.at:71 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "# An ordinary comment

# A comment in a macro
Macro foo expansion


# A *** Macro comment expansion *** in a macro
Macro foo expansion
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:71: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  25 ) # 25. others.at:79: foreach
    at_setup_line='others.at:79'
    $at_verbose "25. others.at:79: testing foreach..."
    $at_quiet $ECHO_N " 25: others.at:79      $ECHO_C"
    (
      $at_traceon


cat >foreach.m4 <<'_ATEOF'
divert(-1)
# foreach(x, (item_1, item_2, ..., item_n), stmt)
define(`foreach', `pushdef(`$1', `')_foreach($@)popdef(`$1')')
define(`_arg1', ``$1'')
define(`_foreach',
       `ifelse($2, `()', ,
               `define(`$1', `_arg1$2')$3`'_foreach(`$1', `(shift$2)', `$3')')')

# traceon(`define', `foreach', `_foreach', `ifelse')

define(a, 1)
define(b, 2)
define(c, 3)
divert
foreach(`x', `(foo, bar, foobar)', `Word was: x
')

# Quote torture from Akim Demaille <akim@epita.fr>
foreach(`x', `(`a', `(b', `c)')', `Word was: x
')

# Something more complex, from Pierre Gaumond <gaumondp@ere.umontreal.ca>.
define(`case', `  $1)
    $2=" -$1";;
')dnl
define(`_cat', `$1$2')dnl
`case' "$1" in
foreach(`x', ((a, vara), (b, varb), (c, varc)), `_cat(`case', x)')dnl
esac
_ATEOF


$at_traceoff
$at_verbose "others.at:135: m4 -b -d foreach.m4"
echo others.at:135 >$at_check_line_file
( $at_traceon; m4 -b -d foreach.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Word was: foo
Word was: bar
Word was: foobar


# Quote torture from Akim Demaille <akim@epita.fr>
Word was: a
Word was: (b
Word was: c)


# Something more complex, from Pierre Gaumond <gaumondp@ere.umontreal.ca>.
case \"\$1\" in
  1)
    vara=\" -1\";;
  2)
    varb=\" -2\";;
  3)
    varc=\" -3\";;
esac
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:135: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  26 ) # 26. others.at:145: forloop
    at_setup_line='others.at:145'
    $at_verbose "26. others.at:145: testing forloop..."
    $at_quiet $ECHO_N " 26: others.at:145     $ECHO_C"
    (
      $at_traceon


cat >forloop.m4 <<'_ATEOF'
divert(-1)
# forloop(i, from, to, stmt)

define(`forloop', `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
define(`_forloop',
       `$4`'ifelse($1, `$3', ,
			 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
divert
forloop(`x', 1, 10, `2**x = eval(2**x)
')
_ATEOF


$at_traceoff
$at_verbose "others.at:173: m4 -b -d forloop.m4"
echo others.at:173 >$at_check_line_file
( $at_traceon; m4 -b -d forloop.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
2**1 = 2
2**2 = 4
2**3 = 8
2**4 = 16
2**5 = 32
2**6 = 64
2**7 = 128
2**8 = 256
2**9 = 512
2**10 = 1024

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:173: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  27 ) # 27. others.at:183: fstab
    at_setup_line='others.at:183'
    $at_verbose "27. others.at:183: testing fstab..."
    $at_quiet $ECHO_N " 27: others.at:183     $ECHO_C"
    (
      $at_traceon


cat >fstab.m4 <<'_ATEOF'
define(`concat', `translit(``$*'', ` 	')')
define(`fsent', `format(`%-25s %-16s nfs    %-16s 0 0', `$1:$2', `$3', concat$4)')

fsent(freja, /home/gevn, /home/gevn, (rw, soft, bg, grpid))
fsent(freja, /home/freja, /home/freja, (rw, soft, grpid))
fsent(rimfaxe, /home/rimfaxe, /home/rimfaxe, (rw, soft, bg))

_ATEOF


$at_traceoff
$at_verbose "others.at:203: m4 -b -d fstab.m4"
echo others.at:203 >$at_check_line_file
( $at_traceon; m4 -b -d fstab.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "


freja:/home/gevn          /home/gevn       nfs    rw,soft,bg,grpid 0 0
freja:/home/freja         /home/freja      nfs    rw,soft,grpid    0 0
rimfaxe:/home/rimfaxe     /home/rimfaxe    nfs    rw,soft,bg       0 0

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:203: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  28 ) # 28. others.at:213: hanoi
    at_setup_line='others.at:213'
    $at_verbose "28. others.at:213: testing hanoi..."
    $at_quiet $ECHO_N " 28: others.at:213     $ECHO_C"
    (
      $at_traceon


cat >hanoi.m4 <<'_ATEOF'
divert(-1)

# move(from, to)
define(`move', `Move one disk from `$1' to `$2'.
')

# _hanoi (cnt, from, to, aux)
define(`_hanoi', `ifelse(eval(`$1'<=1), 1, `move($2, $3)',
`_hanoi(decr($1), $2, $4, $3)move($2, $3)_hanoi(decr($1), $4, $3, $2)')')

# hanoi (cnt)
define(`hanoi', `_hanoi(`$1', source, destination, auxilliary)')

# traceon(`move', `_hanoi', `decr')
divert`'dnl

hanoi(3)
_ATEOF


$at_traceoff
$at_verbose "others.at:245: m4 -b -d hanoi.m4"
echo others.at:245 >$at_check_line_file
( $at_traceon; m4 -b -d hanoi.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Move one disk from source to destination.
Move one disk from source to auxilliary.
Move one disk from destination to auxilliary.
Move one disk from source to destination.
Move one disk from auxilliary to source.
Move one disk from auxilliary to destination.
Move one disk from source to destination.

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:245: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  29 ) # 29. others.at:255: iso8859
    at_setup_line='others.at:255'
    $at_verbose "29. others.at:255: testing iso8859..."
    $at_quiet $ECHO_N " 29: others.at:255     $ECHO_C"
    (
      $at_traceon


# Eh eh eh...
# We can't embed iso8859.m4 in here since precisly this file demonstrates
# an M4 ``bug'': it's inability to handle the NUL character.  So there
# is no use in trying to handle it here...  Well, until autom4te provides
# us with means to.

cat >expout <<'_ATEOF'
# Testing quotes
DEFINE			# eol
CHANGEQUOTE(,)	# eol
0 TEST			# TEST
1 test			# test
2 test		# test
3 test		# test
CHANGEQUOTE(,)	# eol
0 TEST			# TEST
1 TEST		# TEST
2 TEST		# TEST
3 test			# test
# Test use of all iso8859 characters except ^Z (win32 EOF) and NUL  ` '
Length of string is: 254
Comparing strings: MATCH
# NUL does not pass through
This will be seen.
_ATEOF


$at_traceoff
$at_verbose "others.at:283: m4 -b -d \$abs_srcdir/iso8859.m4"
echo others.at:283 >$at_check_line_file
( $at_traceon; m4 -b -d $abs_srcdir/iso8859.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:283: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  30 ) # 30. others.at:293: misc
    at_setup_line='others.at:293'
    $at_verbose "30. others.at:293: testing misc..."
    $at_quiet $ECHO_N " 30: others.at:293     $ECHO_C"
    (
      $at_traceon


cat >expout <<EOF

`sed -n '/^root:/{ s/^root:[^:]*://;s/:.*$//;p;q;}' /etc/passwd`

EOF

cat >misc.m4 <<'_ATEOF'
divert(-1)
define(`USER', `root')
define(`TMP', maketemp(`/tmp/hejXXXXXX'))
syscmd(`grep "^'USER`:" /etc/passwd | awk -F: "{print \$3}"'  > TMP)
define(`UID', include(TMP))
syscmd(`rm -f' TMP)
divert
UID
_ATEOF


$at_traceoff
$at_verbose "others.at:312: m4 -b -d misc.m4"
echo others.at:312 >$at_check_line_file
( $at_traceon; m4 -b -d misc.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:312: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  31 ) # 31. others.at:322: reverse
    at_setup_line='others.at:322'
    $at_verbose "31. others.at:322: testing reverse..."
    $at_quiet $ECHO_N " 31: others.at:322     $ECHO_C"
    (
      $at_traceon


cat >reverse.m4 <<'_ATEOF'
define(`reverse', `ifelse(eval($# > 1), 1, `reverse(shift($@)), `$1'', ``$1'')')
``'' => reverse.
``hej'' => reverse(hej).
``hej, med, dig'' => reverse(hej, med, dig).
_ATEOF


$at_traceoff
$at_verbose "others.at:336: m4 -b -d reverse.m4"
echo others.at:336 >$at_check_line_file
( $at_traceon; m4 -b -d reverse.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
\`' => .
\`hej' => hej.
\`hej, med, dig' => dig, med, hej.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:336: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  32 ) # 32. others.at:346: sysv-args
    at_setup_line='others.at:346'
    $at_verbose "32. others.at:346: testing sysv-args..."
    $at_quiet $ECHO_N " 32: others.at:346     $ECHO_C"
    (
      $at_traceon


cat >sysv-args.m4 <<'_ATEOF'
divert(-1)
define(`nargs', `$#')
define(`concat', `ifelse(1, $#, `$1', `$1` 'concat(shift($@))')')
traceon(`concat', `nargs')
divert

nargs
nargs()
nargs(1,2,3,4,5,6)

concat()
concat(`hej', `med', `dig')
concat(`hej', `med', `dig', `en gang igen')
concat(an, awful, lot, of, argument, at, least, more, that, ten, silly, arguments)
_ATEOF


cat >expout <<'_ATEOF'


0
1
6


hej med dig
hej med dig en gang igen
an awful lot of argument at least more that ten silly arguments
_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- nargs -> `0'
m4trace: -1- nargs(`') -> `1'
m4trace: -1- nargs(`1', `2', `3', `4', `5', `6') -> `6'
m4trace: -1- concat(`') -> `ifelse(1, 1, `', `` 'concat(shift(`'))')'
m4trace: -1- concat(`hej', `med', `dig') -> `ifelse(1, 3, `hej', `hej` 'concat(shift(`hej',`med',`dig'))')'
m4trace: -1- concat(`med', `dig') -> `ifelse(1, 2, `med', `med` 'concat(shift(`med',`dig'))')'
m4trace: -1- concat(`dig') -> `ifelse(1, 1, `dig', `dig` 'concat(shift(`dig'))')'
m4trace: -1- concat(`hej', `med', `dig', `en gang igen') -> `ifelse(1, 4, `hej', `hej` 'concat(shift(`hej',`med',`dig',`en gang igen'))')'
m4trace: -1- concat(`med', `dig', `en gang igen') -> `ifelse(1, 3, `med', `med` 'concat(shift(`med',`dig',`en gang igen'))')'
m4trace: -1- concat(`dig', `en gang igen') -> `ifelse(1, 2, `dig', `dig` 'concat(shift(`dig',`en gang igen'))')'
m4trace: -1- concat(`en gang igen') -> `ifelse(1, 1, `en gang igen', `en gang igen` 'concat(shift(`en gang igen'))')'
m4trace: -1- concat(`an', `awful', `lot', `of', `argument', `at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 12, `an', `an` 'concat(shift(`an',`awful',`lot',`of',`argument',`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`awful', `lot', `of', `argument', `at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 11, `awful', `awful` 'concat(shift(`awful',`lot',`of',`argument',`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`lot', `of', `argument', `at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 10, `lot', `lot` 'concat(shift(`lot',`of',`argument',`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`of', `argument', `at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 9, `of', `of` 'concat(shift(`of',`argument',`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`argument', `at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 8, `argument', `argument` 'concat(shift(`argument',`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`at', `least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 7, `at', `at` 'concat(shift(`at',`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`least', `more', `that', `ten', `silly', `arguments') -> `ifelse(1, 6, `least', `least` 'concat(shift(`least',`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`more', `that', `ten', `silly', `arguments') -> `ifelse(1, 5, `more', `more` 'concat(shift(`more',`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`that', `ten', `silly', `arguments') -> `ifelse(1, 4, `that', `that` 'concat(shift(`that',`ten',`silly',`arguments'))')'
m4trace: -1- concat(`ten', `silly', `arguments') -> `ifelse(1, 3, `ten', `ten` 'concat(shift(`ten',`silly',`arguments'))')'
m4trace: -1- concat(`silly', `arguments') -> `ifelse(1, 2, `silly', `silly` 'concat(shift(`silly',`arguments'))')'
m4trace: -1- concat(`arguments') -> `ifelse(1, 1, `arguments', `arguments` 'concat(shift(`arguments'))')'
_ATEOF


$at_traceoff
$at_verbose "others.at:404: m4 -b -d sysv-args.m4"
echo others.at:404 >$at_check_line_file
( $at_traceon; m4 -b -d sysv-args.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "others.at:404: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  banner-5 ) # Banner 5. modules.at:20
    cat <<\_ATEOF

Module support.

_ATEOF
    ;;

  33 ) # 33. modules.at:27: Freezing modules
    at_setup_line='modules.at:27'
    $at_verbose "33. modules.at:27: testing Freezing modules..."
    $at_quiet $ECHO_N " 33: modules.at:27     $ECHO_C"
    (
      $at_traceon


cat >frozen.m4 <<'_ATEOF'
divert(1)dnl
define(`test', `local::`test'')dnl
define(`test1', defn(`test'))dnl
->test
load(`modtest')
define(`test2', defn(`test'))dnl
->test
load(`shadow')
define(`test3', defn(`test'))dnl
->test
_ATEOF


cat >unfrozen.m4 <<'_ATEOF'
undivert(1)dnl
test1
test2
test3
_ATEOF


# First generate the `expout' ouput by running over the sources before
# freezeing.
$at_traceoff
$at_verbose "modules.at:52: m4 -b -d -m load frozen.m4 unfrozen.m4"
echo modules.at:52 >$at_check_line_file
( $at_traceon; m4 -b -d -m load frozen.m4 unfrozen.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; tee stderr <$at_stderr) >&5
(echo stdout:; tee stdout <$at_stdout) >&5
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:52: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



mv stdout expout
mv stderr experr

# Now freeze the first source file.
$at_traceoff
$at_verbose "modules.at:59: m4 -b -d -m load -F frozen.m4f frozen.m4"
echo modules.at:59 >$at_check_line_file
( $at_traceon; m4 -b -d -m load -F frozen.m4f frozen.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
(echo stdout:; cat $at_stdout) >&5
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:59: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# Now rerun the original sequence, but using the frozen file.
$at_traceoff
$at_verbose "modules.at:63: m4 -b -d -R frozen.m4f unfrozen.m4"
echo modules.at:63 >$at_check_line_file
( $at_traceon; m4 -b -d -R frozen.m4f unfrozen.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:63: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  34 ) # 34. modules.at:111: --module-directory: absolute path
    at_setup_line='modules.at:111'
    $at_verbose "34. modules.at:111: testing --module-directory: absolute path..."
    $at_quiet $ECHO_N " 34: modules.at:111    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:111: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:111 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:111: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:111:  m4 -m load -d input.m4 -M \$top_buildpath/modules"
echo modules.at:111 >$at_check_line_file
( $at_traceon;  m4 -m load -d input.m4 -M $top_buildpath/modules ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:111: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  35 ) # 35. modules.at:114: --module-directory: relative path
    at_setup_line='modules.at:114'
    $at_verbose "35. modules.at:114: testing --module-directory: relative path..."
    $at_quiet $ECHO_N " 35: modules.at:114    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:114: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:114 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:114: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:114:  m4 -m load -d input.m4 -M \$top_builddir/modules"
echo modules.at:114 >$at_check_line_file
( $at_traceon;  m4 -m load -d input.m4 -M $top_builddir/modules ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:114: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  36 ) # 36. modules.at:117: M4MODPATH: absolute path
    at_setup_line='modules.at:117'
    $at_verbose "36. modules.at:117: testing M4MODPATH: absolute path..."
    $at_quiet $ECHO_N " 36: modules.at:117    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:117: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:117 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:117: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:117: M4MODPATH=\$top_buildpath/modules m4 -m load -d input.m4 "
echo modules.at:117 >$at_check_line_file
( $at_traceon; M4MODPATH=$top_buildpath/modules m4 -m load -d input.m4  ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:117: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  37 ) # 37. modules.at:120: M4MODPATH: relative path
    at_setup_line='modules.at:120'
    $at_verbose "37. modules.at:120: testing M4MODPATH: relative path..."
    $at_quiet $ECHO_N " 37: modules.at:120    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:120: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:120 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:120: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:120: M4MODPATH=\$top_builddir/modules m4 -m load -d input.m4 "
echo modules.at:120 >$at_check_line_file
( $at_traceon; M4MODPATH=$top_builddir/modules m4 -m load -d input.m4  ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:120: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  38 ) # 38. modules.at:123: LTDL_LIBRARY_PATH: absolute path
    at_setup_line='modules.at:123'
    $at_verbose "38. modules.at:123: testing LTDL_LIBRARY_PATH: absolute path..."
    $at_quiet $ECHO_N " 38: modules.at:123    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:123: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:123 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:123: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:123: LTDL_LIBRARY_PATH=\$top_buildpath/modules m4 -m load -d input.m4 "
echo modules.at:123 >$at_check_line_file
( $at_traceon; LTDL_LIBRARY_PATH=$top_buildpath/modules m4 -m load -d input.m4  ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:123: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  39 ) # 39. modules.at:126: LTDL_LIBRARY_PATH: relative path
    at_setup_line='modules.at:126'
    $at_verbose "39. modules.at:126: testing LTDL_LIBRARY_PATH: relative path..."
    $at_quiet $ECHO_N " 39: modules.at:126    $ECHO_C"
    (
      $at_traceon



$at_traceoff
$at_verbose "modules.at:126: test -f \$top_builddir/modules/modtest.la || exit 77"
echo modules.at:126 >$at_check_line_file
( $at_traceon; test -f $top_builddir/modules/modtest.la || exit 77 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:126: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


cat >input.m4 <<'_ATEOF'
load(`modtest')
test
Dumpdef: dumpdef(`test').
unload(`modtest')
test
Dumpdef: dumpdef(`test').
_ATEOF


$at_traceoff
$at_verbose "modules.at:126: LTDL_LIBRARY_PATH=\$top_builddir/modules m4 -m load -d input.m4 "
echo modules.at:126 >$at_check_line_file
( $at_traceon; LTDL_LIBRARY_PATH=$top_builddir/modules m4 -m load -d input.m4  ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Test module loaded.
test:	<test>
Test module unloaded.
m4: input.m4: 6: Warning: dumpdef: undefined name: test
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Test module called.
Dumpdef: .

test
Dumpdef: .
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:126: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon


    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  40 ) # 40. modules.at:135: modules: shadow
    at_setup_line='modules.at:135'
    $at_verbose "40. modules.at:135: testing modules: shadow..."
    $at_quiet $ECHO_N " 40: modules.at:135    $ECHO_C"
    (
      $at_traceon


cat >input.m4 <<'_ATEOF'
# no modules loaded yet
test
shadow

# define our own macros for `test' and `shadow'
define(`test', `local::`test'')
define(`shadow', `local::`shadow'')
test
shadow

# module Shadow defines `shadow' and `test' macros
load(`shadow')
dumpdef(`test')
dumpdef(`shadow')
test
shadow

# save the definition of `test' from the Shadow module
define(`Shadow::test', defn(`test'))

# module Modtest also defines a `test' macro
load(`modtest')
dumpdef(`test')
dumpdef(`shadow')
test
shadow

# Reloading Shadow shouldn't affect anything
load(`shadow')
dumpdef(`test')
dumpdef(`shadow')
test
shadow

# Unloading Modtest will unshadow the test definition in Shadow
unload(`modtest')
dumpdef(`test')
dumpdef(`shadow')
test
shadow

# Unloading Shadow once has no effect (we loaded it twice)
unload(`shadow')
dumpdef(`test')
dumpdef(`shadow')
test
shadow

# Unloading Shadow again will revert to copying `test' and the local
# `shadow' macro.
unload(`shadow')
test
shadow
_ATEOF


cat >expout <<'_ATEOF'
# no modules loaded yet
test
shadow

# define our own macros for `test' and `shadow'


local::test
local::shadow

# module Shadow defines `shadow' and `test' macros
Shadow module loaded.


Shadow::test called.
Shadow::shadow called.

# save the definition of `test' from the Shadow module


# module Modtest also defines a `test' macro



Test module called.
Shadow::shadow called.

# Reloading Shadow shouldn't affect anything



Test module called.
Shadow::shadow called.

# Unloading Modtest will unshadow the test definition in Shadow



Shadow::test called.
Shadow::shadow called.

# Unloading Shadow once has no effect (we loaded it twice)



Shadow::test called.
Shadow::shadow called.

# Unloading Shadow again will revert to copying `test' and the local
# `shadow' macro.

local::test
local::shadow
_ATEOF


cat >experr <<'_ATEOF'
test:	<test>
shadow:	<shadow>
Test module loaded.
test:	<test>
shadow:	<shadow>
test:	<test>
shadow:	<shadow>
Test module unloaded.
test:	<test>
shadow:	<shadow>
test:	<test>
shadow:	<shadow>
_ATEOF


$at_traceoff
$at_verbose "modules.at:265: m4 -b -d -m load input.m4"
echo modules.at:265 >$at_check_line_file
( $at_traceon; m4 -b -d -m load input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:265: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  41 ) # 41. modules.at:275: modules: unload
    at_setup_line='modules.at:275'
    $at_verbose "41. modules.at:275: testing modules: unload..."
    $at_quiet $ECHO_N " 41: modules.at:275    $ECHO_C"
    (
      $at_traceon


cat >input.m4 <<'_ATEOF'
test
__test__
load(`modtest')
test
__test__
load(`shadow')
test
__test__
unload(`modtest')
test
__test__
load(`modtest')
test
__test__
unload(`modtest')
test
__test__
unload(`shadow')
test
__test__
_ATEOF


cat >expout <<'_ATEOF'
test
__test__

Test module called.
modtest
Shadow module loaded.
Shadow::test called.
shadow

Shadow::test called.
shadow

Test module called.
modtest

Shadow::test called.
shadow

test
__test__
_ATEOF


cat >experr <<'_ATEOF'
Test module loaded.
Test module unloaded.
Test module loaded.
Test module unloaded.
_ATEOF



$at_traceoff
$at_verbose "modules.at:331: m4 -b -d -m load input.m4"
echo modules.at:331 >$at_check_line_file
( $at_traceon; m4 -b -d -m load input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:331: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  42 ) # 42. modules.at:343: modules: trace
    at_setup_line='modules.at:343'
    $at_verbose "42. modules.at:343: testing modules: trace..."
    $at_quiet $ECHO_N " 42: modules.at:343    $ECHO_C"
    (
      $at_traceon


cat >input.m4 <<'_ATEOF'
test
load(`shadow')
test
unload(`shadow')
test
load(`shadow')
test
_ATEOF


cat >expout <<'_ATEOF'
test
Shadow module loaded.
Shadow::test called.

test
Shadow module loaded.
Shadow::test called.
_ATEOF


cat >experr <<'_ATEOF'
m4trace: -1- test -> `Shadow::`test' called.'
m4trace: -1- test -> `Shadow::`test' called.'
_ATEOF



$at_traceoff
$at_verbose "modules.at:371: m4 -b -d -m load -t test input.m4"
echo modules.at:371 >$at_check_line_file
( $at_traceon; m4 -b -d -m load -t test input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff experr $at_stderr >&5 || at_failed=:
$at_diff expout $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "modules.at:371: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  banner-6 ) # Banner 6. generated.at:6
    cat <<\_ATEOF

Documentation examples.

_ATEOF
    ;;

  43 ) # 43. generated.at:14: Inhibiting Invocation
    at_setup_line='generated.at:14'
    $at_verbose "43. generated.at:14: testing Inhibiting Invocation..."
    $at_quiet $ECHO_N " 43: generated.at:14   $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:859
cat >input.m4 <<'_ATEOF'
define(`x', `substr(ab')
define(`y', `cde, 3, 2)')
x`'y
_ATEOF


$at_traceoff
$at_verbose "generated.at:28: m4 -b -d input.m4"
echo generated.at:28 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

de
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:28: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:885
cat >input.m4 <<'_ATEOF'
define(`macro', `di$1')
macro(`v')`ert'
_ATEOF


$at_traceoff
$at_verbose "generated.at:39: m4 -b -d input.m4"
echo generated.at:39 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
divert
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:39: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  44 ) # 44. generated.at:48: Define
    at_setup_line='generated.at:48'
    $at_verbose "44. generated.at:48: testing Define..."
    $at_quiet $ECHO_N " 44: generated.at:48   $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1023
cat >input.m4 <<'_ATEOF'
define(`foo', `Hello world.')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:60: m4 -b -d input.m4"
echo generated.at:60 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Hello world.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:60: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1043
cat >input.m4 <<'_ATEOF'
define(`array', `defn(format(``array[%d]'', `$1'))')
define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
array_set(4, `array element no. 4')
array_set(17, `array element no. 17')
array(4)
array(eval(`10 + 7'))
_ATEOF


$at_traceoff
$at_verbose "generated.at:79: m4 -b -d input.m4"
echo generated.at:79 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "



array element no. 4
array element no. 17
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:79: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  45 ) # 45. generated.at:88: Arguments
    at_setup_line='generated.at:88'
    $at_verbose "45. generated.at:88: testing Arguments..."
    $at_quiet $ECHO_N " 45: generated.at:88   $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1070
cat >input.m4 <<'_ATEOF'
define(`exch', `$2, $1')
exch(`arg1', `arg2')
_ATEOF


$at_traceoff
$at_verbose "generated.at:100: m4 -b -d input.m4"
echo generated.at:100 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
arg2, arg1
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:100: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1080
cat >input.m4 <<'_ATEOF'
define(`exch', `$2, $1')
define(exch(``expansion text'', ``macro''))
macro
_ATEOF


$at_traceoff
$at_verbose "generated.at:113: m4 -b -d input.m4"
echo generated.at:113 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

expansion text
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:113: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1100
cat >input.m4 <<'_ATEOF'
define(`test', ``Macro name: $0'')
test
_ATEOF


$at_traceoff
$at_verbose "generated.at:124: m4 -b -d input.m4"
echo generated.at:124 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Macro name: test
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:124: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1110
cat >input.m4 <<'_ATEOF'
define(`foo', `This is macro `foo'.')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:135: m4 -b -d input.m4"
echo generated.at:135 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
This is macro foo.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:135: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  46 ) # 46. generated.at:144: Pseudo Arguments
    at_setup_line='generated.at:144'
    $at_verbose "46. generated.at:144: testing Pseudo Arguments..."
    $at_quiet $ECHO_N " 46: generated.at:144  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1134
cat >input.m4 <<'_ATEOF'
define(`nargs', `$#')
nargs
nargs()
nargs(arg1, arg2, arg3)
_ATEOF


$at_traceoff
$at_verbose "generated.at:160: m4 -b -d input.m4"
echo generated.at:160 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
0
1
3
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:160: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1148
cat >input.m4 <<'_ATEOF'
define(`echo', `$*')
echo(arg1,    arg2, arg3 , arg4)
_ATEOF


$at_traceoff
$at_verbose "generated.at:171: m4 -b -d input.m4"
echo generated.at:171 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
arg1,arg2,arg3 ,arg4
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:171: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1159
cat >input.m4 <<'_ATEOF'
define(`echo', `$@')
echo(arg1,    arg2, arg3 , arg4)
_ATEOF


$at_traceoff
$at_verbose "generated.at:182: m4 -b -d input.m4"
echo generated.at:182 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
arg1,arg2,arg3 ,arg4
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:182: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1169
cat >input.m4 <<'_ATEOF'
define(`echo1', `$*')
define(`echo2', `$@')
define(`foo', `This is macro `foo'.')
echo1(foo)
echo2(foo)
_ATEOF


$at_traceoff
$at_verbose "generated.at:199: m4 -b -d input.m4"
echo generated.at:199 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "


This is macro This is macro foo..
This is macro foo.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:199: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1189
cat >input.m4 <<'_ATEOF'
define(`foo', `$$$ hello $$$')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:210: m4 -b -d input.m4"
echo generated.at:210 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
\$\$\$ hello \$\$\$
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:210: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  47 ) # 47. generated.at:219: Undefine
    at_setup_line='generated.at:219'
    $at_verbose "47. generated.at:219: testing Undefine..."
    $at_quiet $ECHO_N " 47: generated.at:219  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1216
cat >input.m4 <<'_ATEOF'
foo
define(`foo', `expansion text')
foo
undefine(`foo')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:237: m4 -b -d input.m4"
echo generated.at:237 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "foo

expansion text

foo
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:237: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  48 ) # 48. generated.at:246: Defn
    at_setup_line='generated.at:246'
    $at_verbose "48. generated.at:246: testing Defn..."
    $at_quiet $ECHO_N " 48: generated.at:246  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1254
cat >input.m4 <<'_ATEOF'
define(`zap', defn(`undefine'))
zap(`undefine')
undefine(`zap')
_ATEOF


$at_traceoff
$at_verbose "generated.at:260: m4 -b -d input.m4"
echo generated.at:260 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

undefine(zap)
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:260: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1274
cat >input.m4 <<'_ATEOF'
define(`string', `The macro dnl is very useful
')
string
defn(`string')
_ATEOF


$at_traceoff
$at_verbose "generated.at:275: m4 -b -d input.m4"
echo generated.at:275 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
The macro 
The macro dnl is very useful

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:275: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  49 ) # 49. generated.at:284: Pushdef
    at_setup_line='generated.at:284'
    $at_verbose "49. generated.at:284: testing Pushdef..."
    $at_quiet $ECHO_N " 49: generated.at:284  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1316
cat >input.m4 <<'_ATEOF'
define(`foo', `Expansion one.')
foo
pushdef(`foo', `Expansion two.')
foo
popdef(`foo')
foo
popdef(`foo')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:308: m4 -b -d input.m4"
echo generated.at:308 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Expansion one.

Expansion two.

Expansion one.

foo
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:308: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1340
cat >input.m4 <<'_ATEOF'
define(`foo', `Expansion one.')
foo
pushdef(`foo', `Expansion two.')
foo
define(`foo', `Second expansion two.')
foo
undefine(`foo')
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:331: m4 -b -d input.m4"
echo generated.at:331 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Expansion one.

Expansion two.

Second expansion two.

foo
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:331: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  50 ) # 50. generated.at:340: Indir
    at_setup_line='generated.at:340'
    $at_verbose "50. generated.at:340: testing Indir..."
    $at_quiet $ECHO_N " 50: generated.at:340  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1386
cat >input.m4 <<'_ATEOF'
define(`$$internal$macro', `Internal macro (name `$0')')
$$internal$macro
indir(`$$internal$macro')
_ATEOF


$at_traceoff
$at_verbose "generated.at:354: m4 -b -d input.m4"
echo generated.at:354 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
\$\$internal\$macro
Internal macro (name \$\$internal\$macro)
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:354: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  51 ) # 51. generated.at:363: Symbols
    at_setup_line='generated.at:363'
    $at_verbose "51. generated.at:363: testing Symbols..."
    $at_quiet $ECHO_N " 51: generated.at:363  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1432
cat >input.m4 <<'_ATEOF'
symbols(`ifndef', `ifdef', `define', `undef')
_ATEOF


$at_traceoff
$at_verbose "generated.at:373: m4 -b -d input.m4"
echo generated.at:373 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "define,ifdef
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:373: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  52 ) # 52. generated.at:382: Ifdef
    at_setup_line='generated.at:382'
    $at_verbose "52. generated.at:382: testing Ifdef..."
    $at_quiet $ECHO_N " 52: generated.at:382  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1468
cat >input.m4 <<'_ATEOF'
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
define(`foo', `')
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
_ATEOF


$at_traceoff
$at_verbose "generated.at:396: m4 -b -d input.m4"
echo generated.at:396 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "foo is not defined

foo is defined
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:396: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  53 ) # 53. generated.at:405: Ifelse
    at_setup_line='generated.at:405'
    $at_verbose "53. generated.at:405: testing Ifelse..."
    $at_quiet $ECHO_N " 53: generated.at:405  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1494
cat >input.m4 <<'_ATEOF'
ifelse(`some comments')
ifelse(`foo', `bar')
_ATEOF


$at_traceoff
$at_verbose "generated.at:419: m4 -b -d input.m4"
echo generated.at:419 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 2: Warning: ifelse: too few arguments: 2 < 3
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:419: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1506
cat >input.m4 <<'_ATEOF'
ifelse(`foo', `bar', `true')
ifelse(`foo', `foo', `true')
ifelse(`foo', `bar', `true', `false')
ifelse(`foo', `foo', `true', `false')
_ATEOF


$at_traceoff
$at_verbose "generated.at:434: m4 -b -d input.m4"
echo generated.at:434 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
true
false
true
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:434: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1525
cat >input.m4 <<'_ATEOF'
ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth', `seventh')
_ATEOF


$at_traceoff
$at_verbose "generated.at:443: m4 -b -d input.m4"
echo generated.at:443 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "seventh
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:443: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  54 ) # 54. generated.at:452: Loops
    at_setup_line='generated.at:452'
    $at_verbose "54. generated.at:452: testing Loops..."
    $at_quiet $ECHO_N " 54: generated.at:452  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1557
cat >input.m4 <<'_ATEOF'
shift
shift(`bar')
shift(`foo', `bar', `baz')
_ATEOF


$at_traceoff
$at_verbose "generated.at:466: m4 -b -d input.m4"
echo generated.at:466 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

bar,baz
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:466: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1570
cat >input.m4 <<'_ATEOF'
define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
			  `reverse(shift($@)), `$1'')')
reverse
reverse(`foo')
reverse(`foo', `bar', `gnats', `and gnus')
_ATEOF


$at_traceoff
$at_verbose "generated.at:482: m4 -b -d input.m4"
echo generated.at:482 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

foo
and gnus, gnats, bar, foo
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:482: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  55 ) # 55. generated.at:491: Dumpdef
    at_setup_line='generated.at:491'
    $at_verbose "55. generated.at:491: testing Dumpdef..."
    $at_quiet $ECHO_N " 55: generated.at:491  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1681
cat >input.m4 <<'_ATEOF'
define(`foo', `Hello world.')
dumpdef(`foo')
dumpdef(`define')
_ATEOF


$at_traceoff
$at_verbose "generated.at:508: m4 -b -d input.m4"
echo generated.at:508 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "foo:	\`Hello world.'
define:	<define>
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "


" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:508: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  56 ) # 56. generated.at:517: Trace
    at_setup_line='generated.at:517'
    $at_verbose "56. generated.at:517: testing Trace..."
    $at_quiet $ECHO_N " 56: generated.at:517  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1722
cat >input.m4 <<'_ATEOF'
define(`foo', `Hello World.')
define(`echo', `$@')
traceon(`foo', `echo')
foo
echo(`gnus', `and gnats')
_ATEOF


$at_traceoff
$at_verbose "generated.at:538: m4 -b -d input.m4"
echo generated.at:538 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4trace: -1- foo -> \`Hello World.'
m4trace: -1- echo(\`gnus', \`and gnats') -> \`\`gnus',\`and gnats''
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "


Hello World.
gnus,and gnats
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:538: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  57 ) # 57. generated.at:547: Dnl
    at_setup_line='generated.at:547'
    $at_verbose "57. generated.at:547: testing Dnl..."
    $at_quiet $ECHO_N " 57: generated.at:547  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1861
cat >input.m4 <<'_ATEOF'
define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:558: m4 -b -d input.m4"
echo generated.at:558 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "Macro foo.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:558: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  58 ) # 58. generated.at:567: Changequote
    at_setup_line='generated.at:567'
    $at_verbose "58. generated.at:567: testing Changequote..."
    $at_quiet $ECHO_N " 58: generated.at:567  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1895
cat >input.m4 <<'_ATEOF'
changequote([, ])
define([foo], [Macro [foo].])
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:581: m4 -b -d input.m4"
echo generated.at:581 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

Macro foo.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:581: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1907
cat >input.m4 <<'_ATEOF'
changequote([[, ]])
define([[foo]], [[Macro [[[foo]]].]])
foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:594: m4 -b -d input.m4"
echo generated.at:594 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

Macro [foo].
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:594: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1919
cat >input.m4 <<'_ATEOF'
define(`foo', `Macro `FOO'.')
changequote(, )
foo
`foo'
_ATEOF


$at_traceoff
$at_verbose "generated.at:609: m4 -b -d input.m4"
echo generated.at:609 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

Macro \`FOO'.
\`Macro \`FOO'.'
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:609: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  59 ) # 59. generated.at:618: Changecom
    at_setup_line='generated.at:618'
    $at_verbose "59. generated.at:618: testing Changecom..."
    $at_quiet $ECHO_N " 59: generated.at:618  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:1962
cat >input.m4 <<'_ATEOF'
define(`comment', `COMMENT')
# A normal comment
changecom(`/*', `*/')
# Not a comment anymore
But: /* this is a comment now */ while this is not a comment
_ATEOF


$at_traceoff
$at_verbose "generated.at:636: m4 -b -d input.m4"
echo generated.at:636 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
# A normal comment

# Not a COMMENT anymore
But: /* this is a comment now */ while this is not a COMMENT
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:636: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:1980
cat >input.m4 <<'_ATEOF'
define(`comment', `COMMENT')
changecom
# Not a comment anymore
_ATEOF


$at_traceoff
$at_verbose "generated.at:649: m4 -b -d input.m4"
echo generated.at:649 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

# Not a COMMENT anymore
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:649: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  60 ) # 60. generated.at:658: Changesyntax
    at_setup_line='generated.at:658'
    $at_verbose "60. generated.at:658: testing Changesyntax..."
    $at_quiet $ECHO_N " 60: generated.at:658  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2129
cat >input.m4 <<'_ATEOF'
define(`test.1', `TEST ONE')
__file__
changesyntax(`O_', `W.')
__file__
test.1
_ATEOF


$at_traceoff
$at_verbose "generated.at:676: m4 -b -d input.m4"
echo generated.at:676 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
input.m4

__file__
TEST ONE
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:676: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2145
cat >input.m4 <<'_ATEOF'
define(`test', `$#')
test(a, b, c)
changesyntax(`(<', `,|', `)>', `O(,)')
test(a, b, c)
test<a|b|c>
_ATEOF


$at_traceoff
$at_verbose "generated.at:693: m4 -b -d input.m4"
echo generated.at:693 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
3

0(a, b, c)
3
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:693: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2162
cat >input.m4 <<'_ATEOF'
define(`test', `$1$2$3')
test(`a', `b', `c')
changesyntax(`O         ')
test(a, b, c)
_ATEOF


$at_traceoff
$at_verbose "generated.at:708: m4 -b -d input.m4"
echo generated.at:708 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
abc

a b c
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:708: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2188
cat >input.m4 <<'_ATEOF'
define(`foo', `bar')
changesyntax(`@@')
foo
@foo
@changesyntax(`@\', `O@')
foo
@foo
\foo
define(`#', `No comment')
\define(`#', `No comment')
\# \foo # Comment \foo
_ATEOF


$at_traceoff
$at_verbose "generated.at:737: m4 -b -d input.m4"
echo generated.at:737 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

foo
bar

foo
@foo
bar
define(#, No comment)

No comment bar # Comment \\foo
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:737: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2217
cat >input.m4 <<'_ATEOF'
define(`@', `TEST')
@
changesyntax(`A@')
@
_ATEOF


$at_traceoff
$at_verbose "generated.at:752: m4 -b -d input.m4"
echo generated.at:752 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
@

TEST
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:752: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2241
cat >input.m4 <<'_ATEOF'
define(`test', `TEST')
changesyntax(`L<', `R>')
<test>
`test>
changequote(<[>, `]')
<test>
[test]
_ATEOF


$at_traceoff
$at_verbose "generated.at:773: m4 -b -d input.m4"
echo generated.at:773 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

test
test

<TEST>
test
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:773: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2263
cat >input.m4 <<'_ATEOF'
changesyntax(`({<', `)}>', `,;:', `O(,)')
eval{2**4-1; 2 : 8>
_ATEOF


$at_traceoff
$at_verbose "generated.at:784: m4 -b -d input.m4"
echo generated.at:784 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
00001111
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:784: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2274
cat >input.m4 <<'_ATEOF'
define(`test', `==$1==')
changequote(`<<', `>>')
changesyntax(<<L[>>, <<R]>>)
test(<<testing]>>)
test([testing>>])
test([<<testing>>])
_ATEOF


$at_traceoff
$at_verbose "generated.at:803: m4 -b -d input.m4"
echo generated.at:803 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "


==testing]==
==testing>>==
==testing==
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:803: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  61 ) # 61. generated.at:812: M4wrap
    at_setup_line='generated.at:812'
    $at_verbose "61. generated.at:812: testing M4wrap..."
    $at_quiet $ECHO_N " 61: generated.at:812  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2320
cat >input.m4 <<'_ATEOF'
define(`cleanup', `This is the `cleanup' actions.
')
m4wrap(`cleanup')
This is the first and last normal input line.
_ATEOF


$at_traceoff
$at_verbose "generated.at:828: m4 -b -d input.m4"
echo generated.at:828 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

This is the first and last normal input line.
This is the cleanup actions.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:828: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  62 ) # 62. generated.at:837: Include
    at_setup_line='generated.at:837'
    $at_verbose "62. generated.at:837: testing Include..."
    $at_quiet $ECHO_N " 62: generated.at:837  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2374
cat >input.m4 <<'_ATEOF'
include(`no-such-file')
sinclude(`no-such-file')
_ATEOF


$at_traceoff
$at_verbose "generated.at:851: m4 -b -d input.m4"
echo generated.at:851 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 1: Cannot open no-such-file: No such file or directory
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:851: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2384
cat >incl.m4 <<'_ATEOF'
Include file start
foo
Include file end
_ATEOF


# ../doc/m4.texinfo:2394
cat >input.m4 <<'_ATEOF'
define(`foo', `FOO')
include(`incl.m4')
_ATEOF


$at_traceoff
$at_verbose "generated.at:872: m4 -b -d input.m4"
echo generated.at:872 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Include file start
FOO
Include file end

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:872: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2409
cat >input.m4 <<'_ATEOF'
define(`bar', include(`incl.m4'))
This is `bar':  >>>bar<<<
_ATEOF


$at_traceoff
$at_verbose "generated.at:886: m4 -b -d input.m4"
echo generated.at:886 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
This is bar:  >>>Include file start
foo
Include file end
<<<
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:886: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  63 ) # 63. generated.at:895: Divert
    at_setup_line='generated.at:895'
    $at_verbose "63. generated.at:895: testing Divert..."
    $at_quiet $ECHO_N " 63: generated.at:895  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2492
cat >input.m4 <<'_ATEOF'
divert(1)
This text is diverted.
divert
This text is not diverted.
_ATEOF


$at_traceoff
$at_verbose "generated.at:911: m4 -b -d input.m4"
echo generated.at:911 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
This text is not diverted.

This text is diverted.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:911: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2512
cat >input.m4 <<'_ATEOF'
divert(-1)
define(`foo', `Macro `foo'.')
define(`bar', `Macro `bar'.')
divert
_ATEOF


$at_traceoff
$at_verbose "generated.at:923: m4 -b -d input.m4"
echo generated.at:923 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:923: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  64 ) # 64. generated.at:932: Undivert
    at_setup_line='generated.at:932'
    $at_verbose "64. generated.at:932: testing Undivert..."
    $at_quiet $ECHO_N " 64: generated.at:932  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2538
cat >input.m4 <<'_ATEOF'
divert(1)
This text is diverted.
divert
This text is not diverted.
undivert(1)
_ATEOF


$at_traceoff
$at_verbose "generated.at:950: m4 -b -d input.m4"
echo generated.at:950 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
This text is not diverted.

This text is diverted.

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:950: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2562
cat >input.m4 <<'_ATEOF'
divert(1)
This text is diverted first.
divert(0)undivert(1)dnl
undivert(1)
divert(1)
This text is also diverted but not appended.
divert(0)undivert(1)dnl
_ATEOF


$at_traceoff
$at_verbose "generated.at:969: m4 -b -d input.m4"
echo generated.at:969 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
This text is diverted first.


This text is also diverted but not appended.
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:969: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2589
cat >foo <<'_ATEOF'
bar
_ATEOF


# ../doc/m4.texinfo:2596
cat >input.m4 <<'_ATEOF'
define(`bar', `BAR')
undivert(`foo')
include(`foo')
_ATEOF


$at_traceoff
$at_verbose "generated.at:989: m4 -b -d input.m4"
echo generated.at:989 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
bar

BAR

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:989: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  65 ) # 65. generated.at:998: Divnum
    at_setup_line='generated.at:998'
    $at_verbose "65. generated.at:998: testing Divnum..."
    $at_quiet $ECHO_N " 65: generated.at:998  $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2616
cat >input.m4 <<'_ATEOF'
Initial divnum
divert(1)
Diversion one: divnum
divert(2)
Diversion two: divnum
divert
_ATEOF


$at_traceoff
$at_verbose "generated.at:1018: m4 -b -d input.m4"
echo generated.at:1018 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "Initial 0


Diversion one: 1

Diversion two: 2
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1018: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  66 ) # 66. generated.at:1027: Cleardiv
    at_setup_line='generated.at:1027'
    $at_verbose "66. generated.at:1027: testing Cleardiv..."
    $at_quiet $ECHO_N " 66: generated.at:1027 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2647
cat >input.m4 <<'_ATEOF'
divert(1)
Diversion one: divnum
divert(2)
Diversion two: divnum
divert(-1)
undivert
_ATEOF


$at_traceoff
$at_verbose "generated.at:1040: m4 -b -d input.m4"
echo generated.at:1040 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
$at_diff $at_devnull $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1040: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2662
cat >input.m4 <<'_ATEOF'
define(`cleardivert',
`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1050: m4 -b -d input.m4"
echo generated.at:1050 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1050: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  67 ) # 67. generated.at:1059: Len
    at_setup_line='generated.at:1059'
    $at_verbose "67. generated.at:1059: testing Len..."
    $at_quiet $ECHO_N " 67: generated.at:1059 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2843
cat >input.m4 <<'_ATEOF'
len()
len(`abcdef')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1071: m4 -b -d input.m4"
echo generated.at:1071 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "0
6
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1071: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  68 ) # 68. generated.at:1080: Index
    at_setup_line='generated.at:1080'
    $at_verbose "68. generated.at:1080: testing Index..."
    $at_quiet $ECHO_N " 68: generated.at:1080 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2863
cat >input.m4 <<'_ATEOF'
index(`gnus, gnats, and armadillos', `nat')
index(`gnus, gnats, and armadillos', `dag')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1092: m4 -b -d input.m4"
echo generated.at:1092 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "7
-1
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1092: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  69 ) # 69. generated.at:1101: Eregexp and Regexp
    at_setup_line='generated.at:1101'
    $at_verbose "69. generated.at:1101: testing Eregexp and Regexp..."
    $at_quiet $ECHO_N " 69: generated.at:1101 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2889
cat >input.m4 <<'_ATEOF'
eregexp(`GNUs not Unix', `\<[a-z]\w+')
eregexp(`GNUs not Unix', `\<Q\w*')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1113: m4 -b -d input.m4"
echo generated.at:1113 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "5
-1
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1113: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2901
cat >input.m4 <<'_ATEOF'
eregexp(`GNUs not Unix', `\w(\w+)$', `*** \& *** \1 ***')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1122: m4 -b -d input.m4"
echo generated.at:1122 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "*** Unix *** nix ***
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1122: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:2918
cat >input.m4 <<'_ATEOF'
regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1131: m4 -b -d input.m4"
echo generated.at:1131 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "*** Unix *** nix ***
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1131: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  70 ) # 70. generated.at:1140: Substr
    at_setup_line='generated.at:1140'
    $at_verbose "70. generated.at:1140: testing Substr..."
    $at_quiet $ECHO_N " 70: generated.at:1140 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2934
cat >input.m4 <<'_ATEOF'
substr(`gnus, gnats, and armadillos', 6)
substr(`gnus, gnats, and armadillos', 6, 5)
_ATEOF


$at_traceoff
$at_verbose "generated.at:1152: m4 -b -d input.m4"
echo generated.at:1152 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "gnats, and armadillos
gnats
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1152: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  71 ) # 71. generated.at:1161: Translit
    at_setup_line='generated.at:1161'
    $at_verbose "71. generated.at:1161: testing Translit..."
    $at_quiet $ECHO_N " 71: generated.at:1161 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:2972
cat >input.m4 <<'_ATEOF'
translit(`GNUs not Unix', `A-Z')
translit(`GNUs not Unix', `a-z', `A-Z')
translit(`GNUs not Unix', `A-Z', `z-a')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1175: m4 -b -d input.m4"
echo generated.at:1175 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "s not nix
GNUS NOT UNIX
tmfs not fnix
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1175: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  72 ) # 72. generated.at:1184: Epatsubst and Patsubst
    at_setup_line='generated.at:1184'
    $at_verbose "72. generated.at:1184: testing Epatsubst and Patsubst..."
    $at_quiet $ECHO_N " 72: generated.at:1184 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3021
cat >input.m4 <<'_ATEOF'
epatsubst(`GNUs not Unix', `^', `OBS: ')
epatsubst(`GNUs not Unix', `\<', `OBS: ')
epatsubst(`GNUs not Unix', `\w*', `(\&)')
epatsubst(`GNUs not Unix', `\w+', `(\&)')
epatsubst(`GNUs not Unix', `[A-Z][a-z]+')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1202: m4 -b -d input.m4"
echo generated.at:1202 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "OBS: GNUs not Unix
OBS: GNUs OBS: not OBS: Unix
(GNUs)() (not)() (Unix)
(GNUs) (not) (Unix)
GN not 
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1202: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3038
cat >input.m4 <<'_ATEOF'
define(`upcase',   `translit(`$*', `a-z', `A-Z')')dnl
define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
define(`capitalize1',
       `eregexp(`$1', `^(\w)(\w*)', `upcase(`\1')`'downcase(`\2')')')dnl
define(`capitalize',
       `epatsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
capitalize(`GNUs not Unix')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1217: m4 -b -d input.m4"
echo generated.at:1217 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "Gnus Not Unix
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1217: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3053
cat >input.m4 <<'_ATEOF'
define(`patreg',
`epatsubst($@)
eregexp($@)')dnl
patreg(`bar foo baz Foo', `foo|Foo', `FOO')
patreg(`aba abb 121', `(.)(.)\1', `\2\1\2')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1233: m4 -b -d input.m4"
echo generated.at:1233 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "bar FOO baz FOO
FOO
bab abb 212
bab
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1233: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3074
cat >input.m4 <<'_ATEOF'
patsubst(`GNUs not Unix', `^', `OBS: ')
patsubst(`GNUs not Unix', `\<', `OBS: ')
patsubst(`GNUs not Unix', `\w*', `(\&)')
patsubst(`GNUs not Unix', `\w+', `(\&)')
patsubst(`GNUs not Unix', `[A-Z][a-z]+')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1250: m4 -b -d input.m4"
echo generated.at:1250 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "OBS: GNUs not Unix
OBS: GNUs OBS: not OBS: Unix
(GNUs)() (not)() (Unix)
(GNUs) (not) (Unix)
GN not 
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1250: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3087
cat >input.m4 <<'_ATEOF'
define(`upcase',   `translit(`$*', `a-z', `A-Z')')dnl
define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
define(`capitalize1',
       `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
define(`capitalize',
       `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
capitalize(`GNUs not Unix')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1265: m4 -b -d input.m4"
echo generated.at:1265 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "Gnus Not Unix
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1265: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  73 ) # 73. generated.at:1274: Format
    at_setup_line='generated.at:1274'
    $at_verbose "73. generated.at:1274: testing Format..."
    $at_quiet $ECHO_N " 73: generated.at:1274 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3116
cat >input.m4 <<'_ATEOF'
define(`foo', `The brown fox jumped over the lazy dog')
format(`The string "%s" is %d characters long', foo, len(foo))
_ATEOF


$at_traceoff
$at_verbose "generated.at:1286: m4 -b -d input.m4"
echo generated.at:1286 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
The string \"The brown fox jumped over the lazy dog\" is 38 characters long
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1286: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  74 ) # 74. generated.at:1295: Incr
    at_setup_line='generated.at:1295'
    $at_verbose "74. generated.at:1295: testing Incr..."
    $at_quiet $ECHO_N " 74: generated.at:1295 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3176
cat >input.m4 <<'_ATEOF'
incr(4)
decr(7)
_ATEOF


$at_traceoff
$at_verbose "generated.at:1307: m4 -b -d input.m4"
echo generated.at:1307 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "5
6
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1307: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  75 ) # 75. generated.at:1316: Eval
    at_setup_line='generated.at:1316'
    $at_verbose "75. generated.at:1316: testing Eval..."
    $at_quiet $ECHO_N " 75: generated.at:1316 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3258
cat >input.m4 <<'_ATEOF'
eval(`-3 * 5')
eval(index(`Hello world', `llo') >= 0)
define(`square', `eval(`($1)**2')')
square(`9')
square(square(5)+1)
define(`foo', `666')
eval(`foo / 6')
eval(foo/6)
_ATEOF


$at_traceoff
$at_verbose "generated.at:1342: m4 -b -d input.m4"
echo generated.at:1342 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 7: Warning: eval: bad expression: foo / 6
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "-15
1

81
676


111
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1342: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3289
cat >input.m4 <<'_ATEOF'
eval(666, 10)
eval(666, 11)
eval(666, 6)
eval(666, 6, 10)
eval(-666, 6, 10)
_ATEOF


$at_traceoff
$at_verbose "generated.at:1359: m4 -b -d input.m4"
echo generated.at:1359 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "666
556
3030
0000003030
-000003030
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1359: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  76 ) # 76. generated.at:1368: Esyscmd
    at_setup_line='generated.at:1368'
    $at_verbose "76. generated.at:1368: testing Esyscmd..."
    $at_quiet $ECHO_N " 76: generated.at:1368 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3383
cat >input.m4 <<'_ATEOF'
define(`authors', `esyscmd(`m4 --version | grep Written')')
authors
_ATEOF


$at_traceoff
$at_verbose "generated.at:1381: m4 -b -d input.m4"
echo generated.at:1381 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
Written by Rene' Seindal and Gary V. Vaughan.

" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1381: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  77 ) # 77. generated.at:1390: Sysval
    at_setup_line='generated.at:1390'
    $at_verbose "77. generated.at:1390: testing Sysval..."
    $at_quiet $ECHO_N " 77: generated.at:1390 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3405
cat >input.m4 <<'_ATEOF'
syscmd(`false')
ifelse(sysval, 0, zero, nonzero)
syscmd(`true')
sysval
_ATEOF


$at_traceoff
$at_verbose "generated.at:1406: m4 -b -d input.m4"
echo generated.at:1406 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
$at_diff $at_devnull $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
nonzero

0
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1406: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  78 ) # 78. generated.at:1415: Errprint
    at_setup_line='generated.at:1415'
    $at_verbose "78. generated.at:1415: testing Errprint..."
    $at_quiet $ECHO_N " 78: generated.at:1415 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3475
cat >input.m4 <<'_ATEOF'
errprint(`Illegal arguments to forloop
')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1428: m4 -b -d input.m4"
echo generated.at:1428 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "Illegal arguments to forloop
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1428: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



# ../doc/m4.texinfo:3494
cat >input.m4 <<'_ATEOF'
errprint(`m4:'__file__:__line__: `Input error
')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1440: m4 -b -d input.m4"
echo generated.at:1440 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4:input.m4:1: Input error
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   0) ;;
   *) $at_verbose "generated.at:1440: exit code was $at_status, expected 0" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;

  79 ) # 79. generated.at:1449: M4exit
    at_setup_line='generated.at:1449'
    $at_verbose "79. generated.at:1449: testing M4exit..."
    $at_quiet $ECHO_N " 79: generated.at:1449 $ECHO_C"
    (
      $at_traceon



# ../doc/m4.texinfo:3515
cat >input.m4 <<'_ATEOF'
define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
')m4exit(1)')
fatal_error(`This is a BAD one, buster')
_ATEOF


$at_traceoff
$at_verbose "generated.at:1463: m4 -b -d input.m4"
echo generated.at:1463 >$at_check_line_file
( $at_traceon; m4 -b -d input.m4 ) >$at_stdout 2>$at_stder1
at_status=$?
grep '^ *+' $at_stder1 >&2
grep -v '^ *+' $at_stder1 >$at_stderr
at_failed=false
echo >>$at_stderr; echo "m4: input.m4: 3: fatal error: This is a BAD one, buster
" | $at_diff - $at_stderr >&5 || at_failed=:
echo >>$at_stdout; echo "
" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   1) ;;
   *) $at_verbose "generated.at:1463: exit code was $at_status, expected 1" >&2
      at_failed=:;;
esac

$at_failed && exit 1
$at_traceon



    $at_times_skip || times >$at_times_file
    )
    at_status=$?
    ;;


  * )
    echo "$as_me: no such test group: $at_group" >&2
    continue
    ;;
  esac

  # Be sure to come back to the suite directory, in particular
  # since below we might `rm' the group directory we are in currently.
  cd $at_suite_dir

  case $at_group in
    banner-*) ;;
    *)
      if test ! -f $at_check_line_file; then
        sed "s/^ */$as_me: warning: /" <<_ATEOF
        A failure happened in a test group before any test could be
        run. This means that test suite is improperly designed.  Please
        report this failure to <bug-m4@gnu.org>.
_ATEOF
    	echo "$at_setup_line" >$at_check_line_file
      fi
      at_group_count=`expr 1 + $at_group_count`
      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
      case $at_status in
        0)  at_msg="ok"
            at_pass_list="$at_pass_list $at_group"
            # Cleanup the group directory, unless the user wants the files.
            $at_debug_p || rm -rf $at_group_dir
            ;;
        77) at_msg="ok (skipped near \``cat $at_check_line_file`')"
            at_skip_list="$at_skip_list $at_group"
            # Cleanup the group directory, unless the user wants the files.
            $at_debug_p || rm -rf $at_group_dir
            ;;
        *)  at_msg="FAILED near \``cat $at_check_line_file`'"
            at_fail_list="$at_fail_list $at_group"
            # Up failure, keep the group directory for autopsy.
            # Create the debugging script.
            {
              echo "#! /bin/sh"
              echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
              echo "cd $at_dir"
              echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
                   '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
              echo 'exit 1'
            } >$at_group_dir/run
            chmod +x $at_group_dir/run
            ;;
      esac
      echo $at_msg
      at_log_msg="$at_group. $at_setup_line: $at_msg"
      # If the group failed, $at_times_file is not available.
      test -f $at_times_file &&
        at_log_msg="$at_log_msg	(`sed 1d $at_times_file`)"
      echo "$at_log_msg" >&6
      $at_errexit_p && test -n "$at_fail_list" && break
      ;;
  esac
done

# Back to the top directory, in particular because we might
# rerun the suite verbosely.
cd $at_dir

# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`(date +%s) 2>/dev/null`
echo "$as_me: ending at: $at_stop_date" >&6
at_duration_s=`(expr $at_stop_time - $at_start_time) 2>/dev/null`
at_duration_m=`(expr $at_duration_s / 60) 2>/dev/null`
at_duration_h=`(expr $at_duration_m / 60) 2>/dev/null`
at_duration_s=`(expr $at_duration_s % 60) 2>/dev/null`
at_duration_m=`(expr $at_duration_m % 60) 2>/dev/null`
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
if test "$at_duration" != "h m s"; then
  echo "$as_me: test suite duration: $at_duration" >&6
fi

# Wrap up the test suite with summary statistics.
at_skip_count=`set dummy $at_skip_list; shift; echo $#`
at_fail_count=`set dummy $at_fail_list; shift; echo $#`
if test $at_fail_count = 0; then
  if test $at_skip_count = 0; then
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## All $at_group_count tests were successful. ##
_ASBOX
  else
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## All $at_group_count tests were successful ($at_skip_count skipped). ##
_ASBOX
  fi
elif test $at_debug_p = false; then
  if $at_errexit_p; then
    cat <<\_ASBOX
## ------------------------------------------------------------ ##
## ERROR: One of the tests failed, inhibiting subsequent tests. ##
## ------------------------------------------------------------ ##
_ASBOX
  else
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## ERROR: Suite unsuccessful, $at_fail_count of $at_group_count tests failed. ##
_ASBOX
  fi

  # Normalize the names so that `ls' lists them in order.
  echo 'You may investigate any problem if you feel able to do so, in which'
  echo 'case the test suite provides a good starting point.'
  echo
  echo 'Now, failed tests will be executed again, verbosely, and logged'
  echo 'in the file '$as_me'.log.'

  {
    echo
    echo
    cat <<\_ASBOX
## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
_ASBOX

    # Summary of failed and skipped tests.
    if test $at_fail_count != 0; then
      echo "Failed tests:"
      $SHELL $0 $at_fail_list --list
      echo
    fi
    if test $at_skip_count != 0; then
      echo "Skipped tests:"
      $SHELL $0 $at_skip_list --list
      echo
    fi
    echo

    cat <<\_ASBOX
## --------------------------------------- ##
## Verbosely re-running the failing tests. ##
## --------------------------------------- ##
_ASBOX
    echo
  } >&6

  exec 6>/dev/null
  $SHELL $0 -v -d $at_debug_args $at_fail_list 2>&1 | tee -a $as_me.log
  exec 6>>$as_me.log

  {
    echo
    if test -n "$at_top_srcdir"; then
      cat <<\_ASBOX
## ------------------- ##
## Configuration logs. ##
## ------------------- ##
_ASBOX
      echo
      for at_file in `find "$at_top_srcdir" -name config.log -print`
      do
  	echo "$as_me: $at_file:"
  	sed 's/^/| /' $at_file
  	echo
      done
    fi
  } >&6


  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## $as_me.log is created. ##
_ASBOX

  echo
  echo "Please send \`$as_me.log' and all information you think might help:"
  echo
  echo "   To: <bug-m4@gnu.org>"
  echo "   Subject: [GNU m4 1.4q] $as_me:$at_fail_list failed"
  echo
  exit 1
fi

exit 0


