diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-21 18:50:38 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-21 18:50:38 -0400 |
commit | f870cc33bcacf9872677dae83a5d781e72664fb9 (patch) | |
tree | a30753a10f7c9542d6a53261e05bff72847d49f1 /t/try | |
parent | dfed2b264de2652cfdeecbaf8cb9b059c77b44cf (diff) | |
download | parse-keyword-f870cc33bcacf9872677dae83a5d781e72664fb9.tar.gz parse-keyword-f870cc33bcacf9872677dae83a5d781e72664fb9.zip |
apparently Test::Requires doesn't allow loading without importing
Diffstat (limited to 't/try')
-rw-r--r-- | t/try/basic.t | 6 | ||||
-rw-r--r-- | t/try/context.t | 6 | ||||
-rw-r--r-- | t/try/finally.t | 6 | ||||
-rw-r--r-- | t/try/given_when.t | 6 | ||||
-rw-r--r-- | t/try/syntax.t | 6 | ||||
-rw-r--r-- | t/try/when.t | 6 |
6 files changed, 30 insertions, 6 deletions
diff --git a/t/try/basic.t b/t/try/basic.t index cc837e3..3849dad 100644 --- a/t/try/basic.t +++ b/t/try/basic.t @@ -4,7 +4,11 @@ use warnings; use Test::More; use lib 't/try/lib'; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} use Try; diff --git a/t/try/context.t b/t/try/context.t index 76ac585..dd186e3 100644 --- a/t/try/context.t +++ b/t/try/context.t @@ -4,7 +4,11 @@ use warnings; use Test::More; use lib 't/try/lib'; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} use Try; diff --git a/t/try/finally.t b/t/try/finally.t index 15bdfb3..e6f4365 100644 --- a/t/try/finally.t +++ b/t/try/finally.t @@ -4,7 +4,11 @@ use warnings; use Test::More; use lib 't/try/lib'; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} use Try; diff --git a/t/try/given_when.t b/t/try/given_when.t index c3af21e..df7460a 100644 --- a/t/try/given_when.t +++ b/t/try/given_when.t @@ -5,7 +5,11 @@ use Test::More; use lib 't/try/lib'; use 5.014; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} no if $] >= 5.018, warnings => 'experimental::smartmatch'; diff --git a/t/try/syntax.t b/t/try/syntax.t index 6e4641c..e678782 100644 --- a/t/try/syntax.t +++ b/t/try/syntax.t @@ -4,7 +4,11 @@ use warnings; use Test::More; use lib 't/try/lib'; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} use Try; diff --git a/t/try/when.t b/t/try/when.t index 96754aa..749ad52 100644 --- a/t/try/when.t +++ b/t/try/when.t @@ -5,7 +5,11 @@ use Test::More; use lib 't/try/lib'; use 5.014; -use Test::Requires 'Try::Tiny'; +BEGIN { + if (!eval { require Try::Tiny }) { + plan skip_all => "This test requires Try::Tiny"; + } +} no if $] >= 5.018, warnings => 'experimental::smartmatch'; |