X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstrictures.t;fp=t%2Fstrictures.t;h=8312e718585a7659b9131352fd7537700a71810f;hb=23c0b85d1580eb07a49da0096e4913debc21e8fa;hp=41d39a59fe8ba046909dfcb3c3aeb329300b9886;hpb=967e00d7d5e8094ad88b79db3c0ae7db9b55d473;p=p5sagit%2Fstrictures.git diff --git a/t/strictures.t b/t/strictures.t index 41d39a5..8312e71 100644 --- a/t/strictures.t +++ b/t/strictures.t @@ -30,8 +30,24 @@ sub test_hints { BEGIN { test_hints "version 1" } } +{ + use strict; + BEGIN { + warnings->import('all'); + warnings->import(FATAL => @strictures::WARNING_CATEGORIES); + warnings->import(NONFATAL => @strictures::V2_NONFATAL); + warnings->unimport(@strictures::V2_DISABLE); + } + BEGIN { capture_hints } +} + +{ + use strictures 2; + BEGIN { test_hints "version 2" } +} + my $v; eval { $v = strictures->VERSION; 1 } or diag $@; is $v, $strictures::VERSION, '->VERSION returns version correctly'; -ok(!eval q{use strictures 2; 1; }, "Can't use strictures 2 (this is version 1)"); +ok(!eval q{use strictures 3; 1; }, "Can't use strictures 3 (this is version 2)");