autoconf
[Top][All Lists]
Advanced

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

Re: Matching variable output with AT_CHECK


From: Ralf Wildenhues
Subject: Re: Matching variable output with AT_CHECK
Date: Sun, 21 Oct 2007 10:32:57 +0200
User-agent: Mutt/1.5.16 (2007-10-11)

Hello Braden,

* Braden McDaniel wrote on Sun, Oct 21, 2007 at 07:58:59AM CEST:
> I'm trying to match the expected output of a command with AT_CHECK as
> follows:
> 
>         AT_CHECK([test-prog $abs_top_srcdir/path/to/input-file],
>                  [0], [],
>                  [$abs_top_srcdir/path/to/input-file:3:17: warning: don't do 
> that
>         ])
> 
> The problem is that the shell variable isn't expanded in the expected
> output, so the check always fails.

Yes, the STDOUT and STDERR arguments to AT_CHECK are expected to be
literal, no shell expansion is done on them.

> How can I get this value into the expected output?

Use instead as argument `stderr', then the standard error output will be
saved in a file named `stderr', which you can further check in a
subsequent test, e.g.,
  AT_CHECK([command], [0], [], [stderr])
  AT_CHECK([cmp -s stderr ...])

Cheers,
Ralf




reply via email to

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