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