diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-03-06 21:58:19 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-03-06 22:48:16 +0000 |
commit | 7465bc322e5c5dcbd256bb5fbdd3135163fb3dc1 (patch) | |
tree | 03dcd93e4a3ae2b625c5c44c07419cc159d2ba45 /t/io/layers.t | |
parent | 21da8bce185d89ceb57f48bde4bcb5679ce4d106 (diff) | |
download | perl-7465bc322e5c5dcbd256bb5fbdd3135163fb3dc1.tar.gz |
Add skip_all_without_extension() to test.pl, for the common skip idiom.
Use it in t/io/layers.t to skip if Encode is not built.
Diffstat (limited to 't/io/layers.t')
-rw-r--r-- | t/io/layers.t | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/t/io/layers.t b/t/io/layers.t index 01e1864135..cb7cbefea8 100644 --- a/t/io/layers.t +++ b/t/io/layers.t @@ -9,9 +9,7 @@ BEGIN { skip_all('not perlio') unless (find PerlIO::Layer 'perlio'); # FIXME - more of these could be tested without Encode or full perl skip_all_if_miniperl("no dynamic loading on miniperl, no Encode"); - require Config; Config->import; - skip_all('Encode was not built') - unless ($Config::Config{extensions} =~ /\bEncode\b/); + skip_all_without_extension('Encode'); # Makes testing easier. $ENV{PERLIO} = 'stdio' if exists $ENV{PERLIO} && $ENV{PERLIO} eq ''; @@ -23,6 +21,7 @@ BEGIN { $PERLIO = exists $ENV{PERLIO} ? $ENV{PERLIO} : "(undef)"; } +use Config; my $DOSISH = $^O =~ /^(?:MSWin32|os2|dos|NetWare)$/ ? 1 : 0; $DOSISH = 1 if !$DOSISH and $^O =~ /^uwin/; |