[CMake] testing with standard output
Henrique Almeida
hdante at gmail.com
Tue Jul 14 10:44:29 EDT 2009
Also, is there a way to escape a string to convert it to a literal
regular expression ?
2009/7/14 Henrique Almeida <hdante at gmail.com>:
> Quite good. :-) Are there equivalents for stdin and stderr ?
>
> 2009/7/14 Bill Hoffman <bill.hoffman at kitware.com>:
>> Henrique Almeida wrote:
>>>
>>> Hello,
>>>
>>> When running "make test", some of my unit tests require that the
>>> result is given by a correct output, instead of (just) the correct
>>> return value (because, I'm specifically testing the ability to do
>>> output). Is there a way to configure CTest to report a successful
>>> result for certain tests by comparing their outputs to a reference
>>> output ?
>>>
>>> In the most general case I'd need something like:
>>>
>>> add_test(test source1 source2 INPUT test.input EXPECTED_OUTPUT
>>> test.output EXPECTED_ERROR test.error)
>>>
>>> I'd provide test.input as stdin, test.output as expected stdout and
>>> test.error as expected stderr.
>>>
>>
>>
>> http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Properties%20on%20Tests
>>
>>
>> -Bill
>>
>
>
>
> --
> Henrique Dante de Almeida
> hdante at gmail.com
>
--
Henrique Dante de Almeida
hdante at gmail.com
More information about the CMake
mailing list