Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 100_bugs / 012_DEMOLISH_eats_mini.t
index c8465a6..976275e 100644 (file)
@@ -1,7 +1,4 @@
 #!/usr/bin/perl
-# This is automatically generated by author/import-moose-test.pl.
-# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
-use t::lib::MooseCompat;
 
 use strict;
 use warnings;
@@ -81,4 +78,30 @@ use Test::Exception;
         if Baz->meta->is_mutable
 }
 
+# The following tests will fail on 5.13.0, so skipt them :(
+if($] >= 5.013) {
+    done_testing;
+    exit;
+}
+
+{
+    package Quux;
+    use Mouse;
+
+    sub DEMOLISH {
+        die "foo\n";
+    }
+}
+
+{
+    local $@ = 42;
+
+    eval { my $obj = Quux->new };
+
+    like( $@, qr/foo/, '$@ contains error from demolish when demolish dies' );
+
+    Quux->meta->make_immutable, redo
+        if Quux->meta->is_mutable
+}
+
 done_testing;