]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/10-args.t
Rename some test files
[perl/modules/indirect.git] / t / 10-args.t
diff --git a/t/10-args.t b/t/10-args.t
new file mode 100644 (file)
index 0000000..6b7b61c
--- /dev/null
@@ -0,0 +1,17 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+{
+ local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
+ eval <<HERE;
+die qq{shouldn't even compile\n};
+no indirect ':fatal';
+my \$x = new Hlagh;
+\$x = new Fail;
+HERE
+ like($@, qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"Hlagh"/, 'croak when :fatal is specified');
+}