Date: | Mon, 23 Aug 2004 14:52:04 -0400 |
From: | Kirrily Skud Robert <skud [...] infotrope.net> |
To: | bug-acme-test-buffy [...] rt.cpan.org |
Subject: | Bug in t/01basic.t of Acme-Test-Buffy-0.01 |
I used A::T::B to learn how to use Test::Builder and
Test::Builder::Tester today, and found a problem with the tests provided
in 01basic.t
not ok 8 - works when incorrect
# Failed test (10.basic.pl at line 84)
# STDERR is:
# # File aaa.txt does not match string provided
# # Failed test (10.basic.pl at line 80)
#
# not:
# # Failed test (10.basic.pl at line 80)
# # File aaa.txt does not match string provided
#
# as expected
As you can see, the lines are in the opposite order from what's
expected. I asked on #perl-qa and Andy Lester looked into it, and told
me to switch the order of the test_fail and test_diag statements. This
fixed the problem.
Unfortunately I can't replicate the problem using A::T::B itself, but
my own .t file can be found at http://paste.husk.org/1485 if you're
interested. The relevant lines are:
test_out("not ok 1 - file contents match string");
test_fail(+2);
test_diag("File aaa.txt does not match string provided");
file_contents_is("aaa.txt", "bbb");
test_test("file_contents_is works when incorrect");
So, in short, I think lines 68 and 72 of the 01basic.t provided with
Acme::Test::Buffy need to be switched around to prevent similar
weirdness with other people following your guide.
K.
--
Kirrily 'Skud' Robert - skud@infotrope.net - http://infotrope.net/
Just one nuclear family can ruin your whole life.