A typemap is a file, not a directory.
authorCraig A. Berry <craigberry@mac.com>
Thu, 14 Jul 2011 22:20:41 +0000 (17:20 -0500)
committerCraig A. Berry <craigberry@mac.com>
Thu, 14 Jul 2011 22:20:41 +0000 (17:20 -0500)
dist/ExtUtils-ParseXS/t/512-t-file.t
dist/ExtUtils-ParseXS/t/600-t-compat.t

index 3bf1add..53bb393 100644 (file)
@@ -31,7 +31,7 @@ $map->add_outputmap(xstype => 'T_IV', code => 'sv_setiv($arg, (IV)$var);');
 is($map->as_string(), $cmp_typemap_str, "Simple typemap matches reference file");
 
 my $tmpdir = File::Temp::tempdir(CLEANUP => 1, TMPDIR => 1);
-my $tmpfile = File::Spec->catdir($tmpdir, 'simple.typemap');
+my $tmpfile = File::Spec->catfile($tmpdir, 'simple.typemap');
 
 $map->write(file => $tmpfile);
 is($map->as_string(), slurp($tmpfile), "Simple typemap write matches as_string");
index abb99f8..1f22e40 100644 (file)
@@ -24,36 +24,36 @@ my @tests = (
   {
     name => 'Simple conflict',
     local_maps => [
-      File::Spec->catdir($path_prefix, "conflicting.typemap"),
+      File::Spec->catfile($path_prefix, "conflicting.typemap"),
     ],
     std_maps => [
-      File::Spec->catdir($path_prefix, "other.typemap"),
+      File::Spec->catfile($path_prefix, "other.typemap"),
     ],
   },
   {
     name => 'B',
     local_maps => [
-      File::Spec->catdir($path_prefix, "b.typemap"),
+      File::Spec->catfile($path_prefix, "b.typemap"),
     ],
     std_maps => [],
   },
   {
     name => 'B and perl',
     local_maps => [
-      File::Spec->catdir($path_prefix, "b.typemap"),
+      File::Spec->catfile($path_prefix, "b.typemap"),
     ],
     std_maps => [
-      File::Spec->catdir($path_prefix, "perl.typemap"),
+      File::Spec->catfile($path_prefix, "perl.typemap"),
     ],
   },
   {
     name => 'B and perl and B again',
     local_maps => [
-      File::Spec->catdir($path_prefix, "b.typemap"),
+      File::Spec->catfile($path_prefix, "b.typemap"),
     ],
     std_maps => [
-      File::Spec->catdir($path_prefix, "perl.typemap"),
-      File::Spec->catdir($path_prefix, "b.typemap"),
+      File::Spec->catfile($path_prefix, "perl.typemap"),
+      File::Spec->catfile($path_prefix, "b.typemap"),
     ],
   },
 );