Test for warnings and the lack of them
37.74 KB
built 2026-10-17 01:39:57 GMT
Description
If you've ever tried to use Test::NoWarnings to confirm there are no warnings
generated by your tests, combined with the convenience of done_testing to not
have to declare a test count, you'll have discovered that these two features do
not play well together, as the test count will be calculated before the
warnings test is run, resulting in a TAP error (see examples/test_nowarnings.pl
in this distribution for a demonstration).
This module is intended to be used as a drop-in replacement for
Test::NoWarnings: it also adds an extra test, but runs this test before
done_testing calculates the test count, rather than after. It does this by
hooking into done_testing as well as via an END block. You can declare a plan,
or not, and things will still Just Work.
It is actually equivalent to:
use Test::NoWarnings 1.04 ':early';
as warnings are still printed normally as they occur. You are safe, and
enthusiastically encouraged, to perform a global search-replace of the above
with use Test::Warnings; whether or not your tests have a plan.
Dependencies
15 totalRequires12
- perl(Carp)
- perl(Exporter)
- perl(Test::Builder)
- perl(Test::Warnings)
- perl(parent)
- perl(strict)
- perl(warnings)
- perl-libs
- rpmlib(CompressedFileNames) <= 3.0.4-1
- rpmlib(FileDigests) <= 4.6.0-1
- rpmlib(PayloadFilesHavePrefix) <= 4.0-1
- rpmlib(PayloadIsZstd) <= 5.4.18-1
Provides3
- perl(Test2::Warnings) = 0.038
- perl(Test::Warnings) = 0.038
- perl-Test-Warnings = 0.038-4.fc45
ObsoletesNo Obsoletes
ConflictsNo Conflicts
RecommendsNo Recommends
SuggestsNo Suggests
SupplementsNo Supplements
EnhancesNo Enhances
Files
22
Files 1–22 of 22
Component of
buildroots that installed this RPMBuildroot ![]() |
Created | State |
|---|---|---|
| f45-build-50169-888 | 2026-10-29 13:01:27 | expired |
| f45-build-46747-857 | 2026-10-29 02:15:40 | expired |
| f45-build-27742-625 | 2026-10-17 02:56:03 | expired |
| f45-build-27632-625 | 2026-10-17 02:48:48 | expired |
| f45-build-27562-624 | 2026-10-17 02:39:26 | expired |
| f45-build-27467-624 | 2026-10-17 02:30:18 | expired |
| f45-build-27394-622 | 2026-10-17 02:24:00 | expired |
| f45-build-27317-622 | 2026-10-17 02:12:39 | expired |
| f45-build-27316-622 | 2026-10-17 02:12:36 | expired |
| f45-build-27314-622 | 2026-10-17 02:12:36 | expired |
| f45-build-27149-621 | 2026-10-17 02:00:15 | expired |
Buildroots 1–11 of 11

