summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-09 13:47:10 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-09 13:47:10 +0000
commite5c68ceb8259daf713db735fd29cd28671b93245 (patch)
tree3464be1fbcaef869f4530c6852fd9b6d7abf81a0 /ext
parentc175ccb5febc8a76b30f78e84345b465464a9239 (diff)
downloadperl-e5c68ceb8259daf713db735fd29cd28671b93245.tar.gz
Test that Opcode loads without warnings.
This will fail if there are untagged ops.
Diffstat (limited to 'ext')
-rw-r--r--ext/Opcode/t/Opcode.t16
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/Opcode/t/Opcode.t b/ext/Opcode/t/Opcode.t
index a648373ebc..1c0b427f9d 100644
--- a/ext/Opcode/t/Opcode.t
+++ b/ext/Opcode/t/Opcode.t
@@ -13,12 +13,22 @@ BEGIN {
use strict;
use Test::More;
-BEGIN {
- use_ok('Opcode', qw(
+{
+ my @warnings;
+
+ BEGIN {
+ local $SIG{__WARN__} = sub {
+ push @warnings, "@_";
+ };
+
+ use_ok('Opcode', qw(
opcodes opdesc opmask verify_opset
opset opset_to_ops opset_to_hex invert_opset
opmask_add full_opset empty_opset define_optag
- ));
+ ));
+ }
+
+ is_deeply(\@warnings, [], "No warnings loading Opcode");
}
# --- opset_to_ops and opset