these freakin tests suck
[p5sagit/Data-Dumper-Concise.git] / t / sugar.t
1 use strict;
2 use warnings;
3 use Data::Dumper::Concise::Sugar;
4
5 use Data::Dumper::Concise ();
6
7 use Test::More qw(no_plan);
8 use Test::Warn;
9
10 my @foo;
11 warnings_like {
12    @foo = Dwarn 'warn', 'friend';
13 } [qr/"warn"/,qr/friend/], "Dwarn warns";
14
15 ok eq_array(\@foo, ['warn']), 'Dwarn passes through correctly';
16
17 my $bar;
18 warning_like {
19    $bar = DwarnS 'robot',2,3;
20 } qr{^"robot"$}, "DwarnS warns";
21
22 is $bar, 'robot', 'DwarnS passes through correctly';