[Bug 992734] perl-Test-Class: FTBFS in rawhide
bugzilla at redhat.com
bugzilla at redhat.com
Wed Aug 7 13:52:33 UTC 2013
https://bugzilla.redhat.com/show_bug.cgi?id=992734
--- Comment #6 from Petr Pisar <ppisar at redhat.com> ---
There are mysterious failure with Test-Simple 0.98_05. They are caused with
this Test-Simple commit:
commit 1d69410753cf233807ef9526b75d74afbddf92d8
Author: nnutter <iam at nnutter.com>
Date: Thu Apr 4 22:27:28 2013 -0500
fix bug when test_fail is called via a do statement
test_fail used $0 as the filename instead of the filename reported by
caller. Under normal execution these would be the same but if the test
is executed by a do block then these would no longer be the same.
diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm
index f84e630..d9ac9e7 100644
--- a/lib/Test/Builder/Tester.pm
+++ b/lib/Test/Builder/Tester.pm
@@ -222,7 +222,7 @@ sub test_fail {
$line = $line + ( shift() || 0 ); # prevent warnings
# expect that on stderr
- $err->expect("# Failed test ($0 at line $line)");
+ $err->expect("# Failed test ($filename at line $line)");
}
=item test_diag
They happen when Test-Class test calls test_err(qr//):
[test at fedora-20 test-class]$ perl -I/tmp/Test-Simple-0.98_05/lib/ -T -Ilib
t/runtests_return.t
1..2
ok 1 - early return handled (skip)
not ok 2 - early return handled (fail)
# Failed test 'early return handled (fail)'
# at t/runtests_return.t line 42.
# STDERR is:
# # Failed test '(Bar::darwin_only returned before plan complete)'
# # at lib/Test/Class.pm line 392.
# # (in Bar->darwin_only)
# # Failed test '(Bar::darwin_only returned before plan complete)'
# # at lib/Test/Class.pm line 392.
# # (in Bar->darwin_only)
#
# not:
# (?^s:.*in Bar->darwin_only.*)
#
# as expected
But I don't understand why that fails because it nowhere checks the file name.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=j6PdgJcwql&a=cc_unsubscribe
More information about the perl-devel
mailing list