From: Graham Knop Date: Wed, 27 May 2015 07:13:33 +0000 (-0400) Subject: calculate next version to test rather than hard coding X-Git-Tag: v2.000001~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd7827626c6ee8af1df33c3a2fd92322593e1ff1;p=p5sagit%2Fstrictures.git calculate next version to test rather than hard coding --- diff --git a/t/strictures.t b/t/strictures.t index cf09a9d..9cf35bd 100644 --- a/t/strictures.t +++ b/t/strictures.t @@ -54,7 +54,8 @@ my $v; eval { $v = strictures->VERSION; 1 } or diag $@; is $v, $strictures::VERSION, '->VERSION returns version correctly'; -eval q{ use strictures 3; }; +my $next = int $v + 1; +eval qq{ use strictures $next; }; -like $@, qr/strictures version 3 required/, - "Can't use strictures 3 (this is version 2)"; +like $@, qr/strictures version $next required/, + "Can't use strictures $next (this is version $v)";