Return-Path: | <skud@blizzard.mengwong.com> |
X-Original-To: | bug-acme-test-buffy@rt.cpan.org |
Delivered-To: | cpan-bug+acme-test-buffy@pallas.eruditorum.org |
Received: | from blizzard.mengwong.com (blizzard.mengwong.com [208.210.125.237]) by pallas.eruditorum.org (Postfix) with ESMTP id 24DE984C130 for <bug-acme-test-buffy@rt.cpan.org>; Mon, 23 Aug 2004 15:12:32 -0400 (EDT) |
Received: | by blizzard.mengwong.com (Postfix, from userid 3001) id 68F3B61AE7; Mon, 23 Aug 2004 14:52:04 -0400 (EDT) |
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 |
Message-Id: | <20040823185204.GB6251@infotrope.net> |
MIME-Version: | 1.0 |
Content-Type: | text/plain; charset=us-ascii |
Content-Disposition: | inline |
X-Message-Flag: | System error: operating system manufacturer corrupt. |
User-Agent: | Mutt/1.5.4i |
X-RT-Original-Encoding: | us-ascii |
Content-Length: | 1387 |
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.