From: Arthur Axel 'fREW' Schmidt <frioux@gmail.com>
Date: Tue, 8 Dec 2009 06:27:19 +0000 (-0600)
Subject: these freakin tests suck
X-Git-Tag: v2.000~16
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=884bc377c628147227def33cb6ec558dd9154b25;p=p5sagit%2FData-Dumper-Concise.git

these freakin tests suck
---

diff --git a/t/sugar.t b/t/sugar.t
new file mode 100644
index 0000000..280f44d
--- /dev/null
+++ b/t/sugar.t
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+use Data::Dumper::Concise::Sugar;
+
+use Data::Dumper::Concise ();
+
+use Test::More qw(no_plan);
+use Test::Warn;
+
+my @foo;
+warnings_like {
+   @foo = Dwarn 'warn', 'friend';
+} [qr/"warn"/,qr/friend/], "Dwarn warns";
+
+ok eq_array(\@foo, ['warn']), 'Dwarn passes through correctly';
+
+my $bar;
+warning_like {
+   $bar = DwarnS 'robot',2,3;
+} qr{^"robot"$}, "DwarnS warns";
+
+is $bar, 'robot', 'DwarnS passes through correctly';