[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] test for Mac::Unixish



Here's the script I've been using to develop and test the functionality
in Mac::Unixush.
You'll see there's all sorts of weird cases I've tried to think of.

If you can think of more, I'd be interested.


use Mac::Unixish;
# $Mac::Unixish::debug = 1;

foreach $item (
 "bar/../foo/",
 "/bar/../foo",
 "bar/.////./../foo/",
 "../foo",
 '/'
# "/../foo", # meaningless
) {
  printf "u<%s> => m<%s> => u<%s> => m<%s>\n\n",
   $item,
   $m = nativize($item),
   $u = unixify($m),
   nativize($u)
  ;
}

print "\n\n";

foreach $item (
 ':bar::foo/bar',
 'bar:foo:',
 'bar:::foo',
 '::foo',
) {
  printf "m<%s> => u<%s> => m<%s>\n\n",
   $item,
   $u = unixify($item),
   nativize($u)
  ;
}
print "\n\n";
exit;

__END__

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch