This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Simplify the startup skip logic of tests in t/uni.
[perl5.git] / t / uni / tr_7jis.t
index 46f80a1..90f3431 100644 (file)
@@ -5,25 +5,11 @@
 # -- dankogai
 
 BEGIN {
-    require Config; import Config;
-    if ($Config{'extensions'} !~ /\bEncode\b/) {
-      print "1..0 # Skip: Encode was not built\n";
-      exit 0;
-    }
-    if (ord("A") == 193) {
-        print "1..0 # Skip: EBCDIC\n";
-        exit 0;
-    }
-    unless (PerlIO::Layer->find('perlio')){
-        print "1..0 # Skip: PerlIO required\n";
-        exit 0;
-    }
-    if ($ENV{PERL_CORE_MINITEST}) {
-        print "1..0 # Skip: no dynamic loading on miniperl, no Encode\n";
-        exit 0;
-    }
-    $| = 1;
     require './test.pl';
+    skip_all_if_miniperl("no dynamic loading on miniperl, no Encode");
+    skip_all("EBCDIC") if $::IS_EBCDIC;
+    skip_all_without_perlio();
+    skip_all_without_extension('Encode');
 }
 
 use strict;