summaryrefslogtreecommitdiff
path: root/t/lib/filespec.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-14 21:26:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-14 21:26:33 +0000
commit08c7cbbb0fc466967038dcb56ca4f1b828b96269 (patch)
treefad77e4b1531338ba6f46112dcfefbae58e72a32 /t/lib/filespec.t
parente277ebbfff2cc1c7947da9ad3d8fab33a272bc5c (diff)
downloadperl-08c7cbbb0fc466967038dcb56ca4f1b828b96269.tar.gz
integrate vmsperl changes into mainline (change#5693 denied)
p4raw-link: @5693 on //depot/vmsperl: 925fd5a3f200998584b0c9f5f508f038863055cb p4raw-id: //depot/perl@5742 p4raw-integrated: from //depot/vmsperl@5741 'copy in' vms/ext/filespec.t (@5564..) t/lib/filespec.t vms/vms.c (@5689..) configure.com (@5690..) 'edit in' lib/File/Spec/VMS.pm (@5690..) 'ignore' t/lib/complex.t (@5690..)
Diffstat (limited to 't/lib/filespec.t')
-rwxr-xr-xt/lib/filespec.t64
1 files changed, 28 insertions, 36 deletions
diff --git a/t/lib/filespec.t b/t/lib/filespec.t
index e44648ad74..da52ec5fb5 100755
--- a/t/lib/filespec.t
+++ b/t/lib/filespec.t
@@ -181,24 +181,24 @@ BEGIN {
[ "Win32->rel2abs('../','//prague_main/work')", '\\\\prague_main\\work\\..' ],
[ "VMS->splitpath('file')", ',,file' ],
-[ "VMS->splitpath('[d1.d2.d3]')", ',d1.d2.d3,' ],
-[ "VMS->splitpath('[.d1.d2.d3]')", ',.d1.d2.d3,' ],
-[ "VMS->splitpath('[d1.d2.d3]file')", ',d1.d2.d3,file' ],
-[ "VMS->splitpath('d1/d2/d3/file')", ',d1/d2/d3/,file' ],
-[ "VMS->splitpath('/d1/d2/d3/file')", '/d1,/d2/d3/,file' ],
-[ "VMS->splitpath('[.d1.d2.d3]file')", ',.d1.d2.d3,file' ],
-[ "VMS->splitpath('node::volume:[d1.d2.d3]')", 'node::volume:,d1.d2.d3,' ],
-[ "VMS->splitpath('node::volume:[d1.d2.d3]file')", 'node::volume:,d1.d2.d3,file' ],
-[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]')", 'node"access_spec"::volume:,d1.d2.d3,' ],
-[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]file')", 'node"access_spec"::volume:,d1.d2.d3,file' ],
+[ "VMS->splitpath('[d1.d2.d3]')", ',[d1.d2.d3],' ],
+[ "VMS->splitpath('[.d1.d2.d3]')", ',[.d1.d2.d3],' ],
+[ "VMS->splitpath('[d1.d2.d3]file')", ',[d1.d2.d3],file' ],
+[ "VMS->splitpath('d1/d2/d3/file')", ',[.d1.d2.d3],file' ],
+[ "VMS->splitpath('/d1/d2/d3/file')", 'd1:,[d2.d3],file' ],
+[ "VMS->splitpath('[.d1.d2.d3]file')", ',[.d1.d2.d3],file' ],
+[ "VMS->splitpath('node::volume:[d1.d2.d3]')", 'node::volume:,[d1.d2.d3],' ],
+[ "VMS->splitpath('node::volume:[d1.d2.d3]file')", 'node::volume:,[d1.d2.d3],file' ],
+[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]')", 'node"access_spec"::volume:,[d1.d2.d3],' ],
+[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]file')", 'node"access_spec"::volume:,[d1.d2.d3],file' ],
[ "VMS->catpath('','','file')", 'file' ],
[ "VMS->catpath('','[d1.d2.d3]','')", '[d1.d2.d3]' ],
[ "VMS->catpath('','[.d1.d2.d3]','')", '[.d1.d2.d3]' ],
[ "VMS->catpath('','[d1.d2.d3]','file')", '[d1.d2.d3]file' ],
[ "VMS->catpath('','[.d1.d2.d3]','file')", '[.d1.d2.d3]file' ],
-[ "VMS->catpath('','d1/d2/d3','file')", 'd1/d2/d3/file' ],
-[ "VMS->catpath('v','d1/d2/d3','file')", 'd1/d2/d3/file' ],
+[ "VMS->catpath('','d1/d2/d3','file')", '[.d1.d2.d3]file' ],
+[ "VMS->catpath('v','d1/d2/d3','file')", 'v:[.d1.d2.d3]file' ],
[ "VMS->catpath('node::volume:','[d1.d2.d3]','')", 'node::volume:[d1.d2.d3]' ],
[ "VMS->catpath('node::volume:','[d1.d2.d3]','file')", 'node::volume:[d1.d2.d3]file' ],
[ "VMS->catpath('node\"access_spec\"::volume:','[d1.d2.d3]','')", 'node"access_spec"::volume:[d1.d2.d3]' ],
@@ -206,7 +206,7 @@ BEGIN {
[ "VMS->canonpath('')", '' ],
[ "VMS->canonpath('volume:[d1]file')", 'volume:[d1]file' ],
-[ "VMS->canonpath('volume:[d1.-.d2.][d3.d4.-]')", 'volume:[d1.-.d2.d3.d4.-]' ],
+[ "VMS->canonpath('volume:[d1.-.d2.][d3.d4.-]')", 'volume:[d2.d3]' ],
[ "VMS->canonpath('volume:[000000.d1]d2.dir;1')", 'volume:[d1]d2.dir;1' ],
[ "VMS->splitdir('')", '' ],
@@ -218,20 +218,15 @@ BEGIN {
[ "VMS->splitdir('.-.d2.d3')", ',-,d2,d3' ],
[ "VMS->splitdir('[.-.d2.d3]')", ',-,d2,d3' ],
-# these appear to need VMS::Filespec, which won't work on other platforms
-[ "VMS->canonpath('///../../..//./././a//b/.././c/././')", '/a/b/../c', 'VMS' ],
-[ "VMS->catdir('d1','d2','d3')", '[.d1.d2.d3]', 'VMS' ],
-[ "VMS->catdir('d1','d2/','d3')", '[.d1.d2.d3]', 'VMS' ],
-[ "VMS->catdir('','d1','d2','d3')", '[.d1.d2.d3]', 'VMS' ],
-[ "VMS->catdir('','-','d2','d3')", '[-.d2.d3]', 'VMS' ],
-[ "VMS->catdir('','-','','d3')", '[-.d3]', 'VMS' ],
-[ "VMS->catdir('[]','<->','[]','[d3]')", '[-.d3]', 'VMS' ],
-[ "VMS->catdir('dir.dir','d2.dir','d3.dir')", '[.dir.d2.d3]','VMS' ],
-[ "VMS->catdir('[.name]')", '[.name]', 'VMS' ],
-[ "VMS->catdir('[.name]','[.name]')", '[.name.name]','VMS' ],
-
-#[ "VMS->catdir('')", '[]' ],
-#[ "VMS->catdir('a:[.name]','b:[.name]')", '[.name.name]' ],
+[ "VMS->catdir('')", '' ],
+[ "VMS->catdir('d1','d2','d3')", '[.d1.d2.d3]' ],
+[ "VMS->catdir('d1','d2/','d3')", '[.d1.d2.d3]' ],
+[ "VMS->catdir('','d1','d2','d3')", '[.d1.d2.d3]' ],
+[ "VMS->catdir('','-','d2','d3')", '[-.d2.d3]' ],
+[ "VMS->catdir('','-','','d3')", '[-.d3]' ],
+[ "VMS->catdir('dir.dir','d2.dir','d3.dir')", '[.dir.d2.d3]' ],
+[ "VMS->catdir('[.name]')", '[.name]' ],
+[ "VMS->catdir('[.name]','[.name]')", '[.name.name]'],
[ "VMS->abs2rel('node::volume:[t1.t2.t3]','[t1.t2.t3]')", '' ],
[ "VMS->abs2rel('node::volume:[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ],
@@ -240,19 +235,16 @@ BEGIN {
[ "VMS->abs2rel('[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ],
[ "VMS->abs2rel('[t1.t2]file','[t1.t2.t3]')", '[-]file' ],
[ "VMS->abs2rel('[t1.t2.t3.t4]','[t1.t2.t3]')", '[t4]' ],
-[ "VMS->abs2rel('[t4.t5.t6]','[t1.t2.t3]')", '[-.-.-.t4.t5.t6]' ],
-#[ "VMS->abs2rel('[]','[t1.t2.t3]')", '[-.-.-]' ],
-#[ "VMS->abs2rel('[..]','[t1.t2.t3]')", '[-.-.-]' ],
-#[ "VMS->abs2rel('[.]','[t1.t2.t3]')", '[-.-.-]' ],
-#[ "VMS->abs2rel('[..]','[t1.t2.t3]')", '[-.-.-]' ],
-#[ "VMS->abs2rel('a:[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ],
-#[ "VMS->abs2rel('[a.-.b.c.-]','[t1.t2.t3]')", '[-.-.-.b]' ],
+[ "VMS->abs2rel('[t4.t5.t6]','[t1.t2.t3]')", '[---.t4.t5.t6]' ],
+[ "VMS->abs2rel('[000000]','[t1.t2.t3]')", '[---.000000]' ],
+[ "VMS->abs2rel('a:[t1.t2.t4]','[t1.t2.t3]')", '[-.t4]' ],
+[ "VMS->abs2rel('[a.-.b.c.-]','[t1.t2.t3]')", '[---.b]' ],
[ "VMS->rel2abs('[.t4]','[t1.t2.t3]')", '[t1.t2.t3.t4]' ],
[ "VMS->rel2abs('[.t4.t5]','[t1.t2.t3]')", '[t1.t2.t3.t4.t5]' ],
[ "VMS->rel2abs('[]','[t1.t2.t3]')", '[t1.t2.t3]' ],
-[ "VMS->rel2abs('[-]','[t1.t2.t3]')", '[t1.t2.t3.-]' ],
-[ "VMS->rel2abs('[-.t4]','[t1.t2.t3]')", '[t1.t2.t3.-.t4]' ],
+[ "VMS->rel2abs('[-]','[t1.t2.t3]')", '[t1.t2]' ],
+[ "VMS->rel2abs('[-.t4]','[t1.t2.t3]')", '[t1.t2.t4]' ],
[ "VMS->rel2abs('[t1]','[t1.t2.t3]')", '[t1]' ],
[ "OS2->catdir('A:/d1','B:/d2','d3','')", 'A:/d1/B:/d2/d3' ],