#!./perl
BEGIN {
chdir 't' if -d 't';
}
BEGIN {
print "1..0 # Skip: no file TEST or harness\n";
exit 0;
}
}
print "1..12\n";
print "ok 1\n";
# named files, same, existing but different, cause an error
print "ok 2\n";
print "ok 3\n";
# a file which doesn't exist
print "ok 4\n";
# compare_text, the same file, different but existing files
# cause error, test sub form.
print "ok 5\n";
print "ok 6\n";
print "ok 7\n";
print "not " unless
print "ok 8\n";
# filehandle and same file
{
my $fh;
print "ok 9\n";
}
# filehandle and different (but existing) file.
{
my $fh;
print "ok 10\n";
}
# Different file with contents of known file,
# will use File::Temp to do this, skip rest of
# tests if this doesn't seem to work
my @donetests;
eval {
{
local $/; #slurp
my $fh;
}
};
print "# problems when testing with a tempory file\n" if $@;
if (@donetests == 2) {
print "ok 11\n";
# The open attempt on FROM in File::Compare::compare should fail
# on this OS since files are not shared by default.
print "ok 12\n";
}
else {
print "ok 12\n";
}
}
else {
print "ok 11# Skip\nok 12 # Skip Likely due to File::Temp\n";
}