(delurking)

I always wondered what that "dubious" meant.

Mike Scott
QA Software Developer
BBC News Interactive



-----Original Message-----
From: Michael G Schwern [mailto:[EMAIL PROTECTED] 
Sent: 19 July 2004 16:09
To: [EMAIL PROTECTED]
Subject: Exit status code from Test::More might go away


Short version:  I'm considering dropping the exit code feature from the 
default behavior of Test::Builder and making it something you can turn
on 
instead.  Does anyone find this feature useful or otherwise wish to
protest its removal in 0.50?


Long version:
Test::More (and, in fact, most any Test::Builder derived module) sets
the exit code to be the number of tests which failed.  This somewhat
dubious feature was meant to allow folks to determine if a test script
passed or failed without using Test::Harness.  It was also meant to make
Test::More easier to use with Aegis and other testing systems that use
the exit code of the test process.

It doesn't seem to be working out that way.

Very few Perl programmers use Aegis, you have to write your own custom 
harness anyway to make the output readable and Aegis wants a simple 0 or
1 
as the exit code.  So its not much help there.

Test::Harness is slowly becoming more flexible such that sometime RSN
we'll have custom formatters reducing the need to interpret tests
outside of T::H.

The exit code information adds unnecessary extra information to an
already crowded set of diagnostics.  Observe the difference.

With...
foo....NOK 3

#     Failed test (foo.t at line 7)
#          got: '1'
#     expected: '2'
# Looks like you failed 1 test of 4.
foo....dubious

        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 3
        Failed 1/4 tests, 75.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
------------------------------------------------------------------------
-------
foo.t          1   256     4    1  25.00%  3
Failed 1/1 test scripts, 0.00% okay. 1/4 subtests failed, 75.00% okay.

Without...
foo....NOK 3

#     Failed test (foo.t at line 8)
#          got: '1'
#     expected: '2'
# Looks like you failed 1 test of 4.
foo....FAILED test 3

        Failed 1/4 tests, 75.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
------------------------------------------------------------------------
-------
foo.t                      4    1  25.00%  3
Failed 1/1 test scripts, 0.00% okay. 1/4 subtests failed, 75.00% okay.


-- 
Michael G Schwern        [EMAIL PROTECTED]
http://www.pobox.com/~schwern/
The key, my friend, is hash browns.
        http://www.goats.com/archive/980402.html

http://www.bbc.co.uk/ - World Wide Wonderland

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

Reply via email to