This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re-implement OPpASSIGN_COMMON mechanism
[perl5.git] / t / op / threads-dirh.t
index 900a62a..e1d5c99 100644 (file)
@@ -9,10 +9,7 @@ BEGIN {
      $| = 1;
 
      require Config;
-     if (!$Config::Config{useithreads}) {
-        print "1..0 # Skip: no ithreads\n";
-        exit 0;
-     }
+     skip_all_without_config('useithreads');
      skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
 
      plan(6);
@@ -36,6 +33,8 @@ fresh_perl_is <<'# this is no comment', 'ok', {}, 'crash when duping dirh';
 
 my $dir;
 SKIP: {
+ skip "telldir or seekdir not defined on this platform", 5
+    if !$Config::Config{d_telldir} || !$Config::Config{d_seekdir};
  my $skip = sub {
    chdir($dir);
    chdir updir;
@@ -51,7 +50,7 @@ SKIP: {
 
  $dir = catdir getcwd(), "thrext$$" . int rand() * 100000;
 
- rmtree($dir);
+ rmtree($dir) if -d $dir;
  mkdir($dir);
 
  # Create a dir structure like this: