bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.53a m4sh.at:74 failure


From: Patrick Welche
Subject: Re: 2.53a m4sh.at:74 failure
Date: Thu, 25 Apr 2002 18:13:21 +0100
User-agent: Mutt/1.3.19i

On Thu, Apr 25, 2002 at 02:40:14PM +0200, Akim Demaille wrote:
> 
> Thanks,
> 
> I think I have it!
> 
> Question: do you have a testsuite.lineno in tests?

Yes

> I'm quite sure it
> is so.  Also, I bet that diff -u testsuite testsuite.lineno will have
> somewhere a
> 
> - Line: $LINENO
> + Line: 2897

Yes.

Ah finally! That is where
cat >test/test-1.as <<'_ATEOF'
AS_INIT
if false; then
  # If we can't unset LINENO, then this test makes no sense: skip it.
  AS_UNSET([LINENO]) ||
    AS_ERROR([cannot unset LINENO], 77)
fi    
_AS_PREPARE
echo "Line: 2897"
grep 'Line: .*LINENO' $[0] >/dev/null ||  
  AS_ERROR([cannot find original script])
exit 0
_ATEOF

lives.

I just had a go at:

m4_define([AT_PACKAGE_STRING],[small check])
m4_define([AT_PACKAGE_BUGREPORT],[me])
AT_CONFIG([.])
AT_INIT
m4_pattern_allow([^AS_EXIT$])
AT_SETUP([LINENO])
_AS_LINENO_WORKS || {
echo "Lineno doesn't work";
}

exit;

Which is actually bad syntax, so I fiddled it to:

  case $at_group in
  1 ) # 1. small.at:12: LINENO
    at_setup_line='small.at:12'
    $at_verbose "1. small.at:12: testing LINENO..."
    $at_quiet $ECHO_N "  1: small.at:12       $ECHO_C"
    (
      $at_traceon



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  if ( test "x$as_lineno_1" != "x$as_lineno_2" &&
       test "x$as_lineno_3"  = "x$as_lineno_2" )
  then echo "Lineno does work";
  else echo "Lineno doesn't work";
  fi;

and surprisingly got:

% sh foobar
## ----------------------- ##
## small check test suite. ##
## ----------------------- ##
  1: small.at:12       Lineno does work
ok


Cheers,

Patrick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]