[Scons-dev] Does SCons test support negative tests?

Bill Deegan bill at baddogconsulting.com
Tue Sep 29 12:08:40 EDT 2015


Gary,

For this test I ended up just having the full expected output, in this case
I effectively checked for the output not being there.
It worked for the negative case because the output is pretty short.

Can you use must_not_contain on stdout?
I'm thinking our test framework docs are pretty sparse.

-Bill


On Tue, Sep 29, 2015 at 9:01 AM, Gary Oberbrunner <garyo at oberbrunner.com>
wrote:

> Can you just have two tests, one must_contain() and the other
> must_not_contain()?
>
> On Tue, Sep 29, 2015 at 11:47 AM, Bill Deegan <bill at baddogconsulting.com>
> wrote:
>
>> Greetings,
>>
>> I'm looking through the test logic and I don't see a way to say:
>> 1) Output must have xyz in it
>> 2) AND must NOT have abc in it
>>
>> I'm working on a test for the append flag for Help() and depending on
>> it's setting the output from
>> scons -h
>>
>> should or shouldn't contain help from AddOption()'s.
>>
>> I could specify the exact full output expected, but it would seem easier
>> to maintain if I only check for 1 and 2 above.
>>
>> Thanks,
>> Bill
>>
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>>
>
>
> --
> Gary
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20150929/fb9bb5cb/attachment.html>


More information about the Scons-dev mailing list