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

2015-09-29 Thread Gary Oberbrunner
On Tue, Sep 29, 2015 at 12:08 PM, Bill Deegan 
wrote:

> 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.
>

There's a _small_ amount in the wiki, at
https://bitbucket.org/scons/scons/wiki/DeveloperGuide/TestingMethodology/QMTestMethods
 and
https://bitbucket.org/scons/scons/wiki/DeveloperGuide/TestingMethodology.
The README in the QMTest dir is not all that helpful; that'd be a good
place for some of this IMHO.


-- 
Gary
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


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

2015-09-29 Thread Bill Deegan
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 
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 
> 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@scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>>
>
>
> --
> Gary
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


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

2015-09-29 Thread Bill Deegan
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@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


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

2015-09-29 Thread William Blevins
I added the functionality for (1) in the CL-patch since I wanted to look
for contents without haven't to include stdout of unrelated information.

V/R,
William

On Tue, Sep 29, 2015 at 6:10 PM, Gary Oberbrunner 
wrote:

>
> On Tue, Sep 29, 2015 at 12:08 PM, Bill Deegan 
> wrote:
>
>> 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.
>>
>
> There's a _small_ amount in the wiki, at
> https://bitbucket.org/scons/scons/wiki/DeveloperGuide/TestingMethodology/QMTestMethods
>  and
> https://bitbucket.org/scons/scons/wiki/DeveloperGuide/TestingMethodology.
> The README in the QMTest dir is not all that helpful; that'd be a good
> place for some of this IMHO.
>
>
> --
> Gary
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev