diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-09 13:47:10 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-09 13:47:10 +0000 |
commit | e5c68ceb8259daf713db735fd29cd28671b93245 (patch) | |
tree | 3464be1fbcaef869f4530c6852fd9b6d7abf81a0 /ext | |
parent | c175ccb5febc8a76b30f78e84345b465464a9239 (diff) | |
download | perl-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.t | 16 |
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 |