#!./perl -T
BEGIN {
chdir 't' if -d 't';
}
print "1..41\n";
# import correctly?
'' : 'not '),"ok 1\n";
# set fstype -- should replace non-null default
'' : 'not '),"ok 2\n";
# Unix syntax tests
print "ok 3\n";
}
else {
}
'' : 'not '),"ok 4\n";
# set fstype -- should replace non-null default
'' : 'not '),"ok 8\n";
# VMS syntax tests
print "ok 9\n";
}
else {
}
'' : 'not '),"ok 10\n";
'' : 'not '),"ok 11\n";
'' : 'not '),"ok 12\n";
# set fstype -- should replace non-null default
'' : 'not '),"ok 16\n";
# MSDOS syntax tests
print "ok 17\n";
}
else {
print "not ok 17 |$base|$path|$type|\n";
}
# Yes "/" is a legal path separator under MSDOS
basename("lib/File/Basename.pm") eq "Basename.pm" or print "not ";
print "ok 22\n";
# set fstype -- should replace non-null default
# MacOS syntax tests
print "ok 24\n";
}
else {
print "not ok 24 |$base|$path|$type|\n";
}
# Check quoting of metacharacters in suffix arg by basename()
# extra tests for a few specific bugs
# perl5.003_18 gives C:/perl/.\
# perl5.003_18 gives C:\perl\
# perl5.003_18 gives '.'
# The empty tainted value, for tainting strings
my $TAINT = substr($^X, 0, 0);
# How to identify taint when you see it
sub any_tainted (@) {
not eval { join("",@_), kill 0; 1 };
}
sub tainted ($) {
any_tainted @_;
}
sub all_tainted (@) {
for (@_) { return 0 unless tainted $_ }
1;
}