skeleton of test
Matt S Trout [Mon, 15 Jun 2009 18:24:01 +0000 (19:24 +0100)]
t/01simple.t [new file with mode: 0644]

diff --git a/t/01simple.t b/t/01simple.t
new file mode 100644 (file)
index 0000000..34b800b
--- /dev/null
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More;
+use Scalar::Util qw(weaken);
+
+my %real;
+my %weak;
+
+@weak{qw(one two)} = @real{qw(one two)} = ({}, {});
+
+weaken($_) for values %weak;
+
+delete @real{keys %real};
+
+cmp_ok(
+  (scalar grep defined, values %weak), '==', 0,
+  'All objects destroyed now'
+);
+
+done_testing;