X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fgiven_when.t;h=9f4a79dcfdcae639fcdcf1348c6af75c0f5ee0b8;hb=1d1a1b199a488e6fa4f4f6bc69e2cb5e454c6b92;hp=4ae9baa8673f396d11db9f556ed1234e4f996bbf;hpb=8d2ee8319218941658f8513f03e3f063da941def;p=p5sagit%2FTry-Tiny.git diff --git a/t/given_when.t b/t/given_when.t index 4ae9baa..9f4a79d 100644 --- a/t/given_when.t +++ b/t/given_when.t @@ -1,17 +1,17 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; BEGIN { - plan skip_all => "Perl 5.10 is required" unless eval { require 5.010 }; - plan tests => 3; - use_ok("Try::Tiny"); + plan skip_all => 'Perl 5.010 is required' unless "$]" >= '5.010'; + plan tests => 2; } +use Try::Tiny; + use 5.010; +no if "$]" >= 5.017011, warnings => 'experimental::smartmatch'; my ( $error, $topic ); @@ -29,9 +29,9 @@ given ("foo") { is( $error, "blah\n", "error caught" ); { - local $TODO = "perhaps a workaround can be found"; + local $TODO = "perhaps a workaround can be found" + if "$]" < 5.017003; is( $topic, $error, 'error is also in $_' ); } # ex: set sw=4 et: -