HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/Test-Warnings-0.033-0/examples/synopsis_2.t
use strict;
use warnings;

# this test demonstrates that we can capture warnings and test its contents,
# and that captured warning will not fail the had-no-warnings test which is
# added at the end

use Test::More tests => 3;
use Test::Warnings ':all';

pass('yay!');
like(warning { warn "oh noes!" }, qr/^oh noes/, 'we warned');