#!./perl -w
# Some quick tests to see if h2xs actually runs and creates files as
# hence are not checked. File existence is checked with -e though.
# This test depends on File::Path::rmtree() to clean up with.
# - pvhp
#
# We are now checking that the correct use $version; is present in
# Makefile.PL and $module.pm
BEGIN {
chdir 't' if -d 't';
}
# use strict; # we are not really testing this
# Don't want its diagnostics getting in the way of ours.
exit 0;
}
# You might also wish to bail out if your perl platform does not
# do `$^X -e 'warn "Writing h2xst"' 2>&1`; duplicity.
# ok on unix, nt, VMS, ...
my $dupe = '2>&1';
# ok on unix, nt, The extra \" are for VMS
# The >&1 would create a file named &1 on MPW (STDERR && STDOUT are
# already merged).
# -x overcomes MPW $Config{startperl} anomaly
}
# $name should differ from system header file names and must
# not already be found in the t/ subdirectory for perl.
my $name = 'h2xst';
my @tests = (
);
for (my $i = $#tests; $i > 0; $i-=3) {
# 1 test for running it, 1 test for the expected result, and 1 for each file
# plus 1 to open and 1 to check for the use in lib/$name.pm and Makefile.PL
# And 1 more for our check for "bonus" files, 2 more for ExtUtil::Manifest.
# use the () to force list context and hence count the number of matches.
}
print HEADER <<HEADER or die $!;
#define Camel 2
#define Dromedary 1
HEADER
# h2xs warns about what it is writing hence the (possibly unportable)
# 2>&1 dupe:
# does it run?
# accomodate MPW # comment character prependage
$result =~ s/#\s*//gs;
}
#print "# expectation is >$expectation<\n";
#print "# result is >$result<\n";
# Was the output the list of files that were expected?
}
}
}
print "# These files are unexpectedly present:\n";
}
# Aargh. Something wants to load a bit of regexp. And we have to chdir
# for ExtUtils::Manifest. Caught between a rock and a hard place, so this
# seems the least evil thing to do:
my $found;
}
}
}
# clean up
}