diff options
author | vincentdarley <vincentdarley> | 2001-07-31 19:12:05 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2001-07-31 19:12:05 (GMT) |
commit | c1335a91a0a2d1b2b776c7bbb5763b90e3d629ad (patch) | |
tree | 1ec44ca71eb2e561881490f7766175daa65dc9eb /tests/fileName.test | |
parent | 2414705dd748a119ffa0a2976ed71abc283aff11 (diff) | |
download | tcl-c1335a91a0a2d1b2b776c7bbb5763b90e3d629ad.zip tcl-c1335a91a0a2d1b2b776c7bbb5763b90e3d629ad.tar.gz tcl-c1335a91a0a2d1b2b776c7bbb5763b90e3d629ad.tar.bz2 |
Changes from TIP#17 "Redo Tcl's filesystem"
The following files were impacted.
* doc/Access.3:
* doc/FileSystem.3:
* doc/OpenFileChnl.3:
* doc/file.n:
* doc/glob.n:
* generic/tcl.decls:
* generic/tcl.h:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclDate.c:
* generic/tclDecls.h:
* generic/tclEncoding.c:
* generic/tclFCmd.c:
* generic/tclFileName.c:
* generic/tclGetDate.y:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclIOUtil.c:
* generic/tclInt.decls:
* generic/tclInt.h:
* generic/tclIntDecls.h:
* generic/tclLoad.c:
* generic/tclStubInit.c:
* generic/tclTest.c:
* generic/tclUtil.c:
* library/init.tcl:
* mac/tclMacFCmd.c:
* mac/tclMacFile.c:
* mac/tclMacInit.c:
* mac/tclMacPort.h:
* mac/tclMacResource.c:
* mac/tclMacTime.c:
* tests/cmdAH.test:
* tests/event.test:
* tests/fCmd.test:
* tests/fileName.test:
* tests/io.test:
* tests/ioCmd.test:
* tests/proc-old.test:
* tests/registry.test:
* tests/unixFCmd.test:
* tests/winDde.test:
* tests/winFCmd.test:
* unix/mkLinks:
* unix/tclUnixFCmd.c:
* unix/tclUnixFile.c:
* unix/tclUnixInit.c:
* unix/tclUnixPipe.c:
* win/tclWinFCmd.c:
* win/tclWinFile.c:
* win/tclWinInit.c:
* win/tclWinPipe.c
Diffstat (limited to 'tests/fileName.test')
-rw-r--r-- | tests/fileName.test | 616 |
1 files changed, 360 insertions, 256 deletions
diff --git a/tests/fileName.test b/tests/fileName.test index eb0b502..318b3ab 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,885 +10,883 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.10 2001/05/15 21:23:53 hobbs Exp $ +# RCS: @(#) $Id: fileName.test,v 1.11 2001/07/31 19:12:07 vincentdarley Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } -if {[info commands testsetplatform] == {}} { - puts "This application hasn't been compiled with the \"testsetplatform\"" - puts "command, so I can't test the filename conversion procedures." - ::tcltest::cleanupTests - return -} +tcltest::testConstraint testsetplatform [string equal testsetplatform [info commands testsetplatform]] +tcltest::testConstraint testtranslatefilename [string equal testtranslatefilename [info commands testtranslatefilename]] global env -set platform [testgetplatform] +if {[tcltest::testConstraint testsetplatform]} { + set platform [testgetplatform] +} -test filename-1.1 {Tcl_GetPathType: unix} { +test filename-1.1 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype / } absolute -test filename-1.2 {Tcl_GetPathType: unix} { +test filename-1.2 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype /foo } absolute -test filename-1.3 {Tcl_GetPathType: unix} { +test filename-1.3 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype foo } relative -test filename-1.4 {Tcl_GetPathType: unix} { +test filename-1.4 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype c:/foo } relative -test filename-1.5 {Tcl_GetPathType: unix} { +test filename-1.5 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype ~ } absolute -test filename-1.6 {Tcl_GetPathType: unix} { +test filename-1.6 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype ~/foo } absolute -test filename-1.7 {Tcl_GetPathType: unix} { +test filename-1.7 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype ~foo } absolute -test filename-1.8 {Tcl_GetPathType: unix} { +test filename-1.8 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype ./~foo } relative -test filename-2.1 {Tcl_GetPathType: mac, denerate names} { +test filename-2.1 {Tcl_GetPathType: mac, denerate names} {testsetplatform} { testsetplatform mac file pathtype / } relative -test filename-2.2 {Tcl_GetPathType: mac, denerate names} { +test filename-2.2 {Tcl_GetPathType: mac, denerate names} {testsetplatform} { testsetplatform mac file pathtype /. } relative -test filename-2.3 {Tcl_GetPathType: mac, denerate names} { +test filename-2.3 {Tcl_GetPathType: mac, denerate names} {testsetplatform} { testsetplatform mac file pathtype /.. } relative -test filename-2.4 {Tcl_GetPathType: mac, denerate names} { +test filename-2.4 {Tcl_GetPathType: mac, denerate names} {testsetplatform} { testsetplatform mac file pathtype //.// } relative -test filename-2.5 {Tcl_GetPathType: mac, denerate names} { +test filename-2.5 {Tcl_GetPathType: mac, denerate names} {testsetplatform} { testsetplatform mac file pathtype //.//../. } relative -test filename-2.6 {Tcl_GetPathType: mac, tilde names} { +test filename-2.6 {Tcl_GetPathType: mac, tilde names} {testsetplatform} { testsetplatform mac file pathtype ~ } absolute -test filename-2.7 {Tcl_GetPathType: mac, tilde names} { +test filename-2.7 {Tcl_GetPathType: mac, tilde names} {testsetplatform} { testsetplatform mac file pathtype ~: } absolute -test filename-2.8 {Tcl_GetPathType: mac, tilde names} { +test filename-2.8 {Tcl_GetPathType: mac, tilde names} {testsetplatform} { testsetplatform mac file pathtype ~:foo } absolute -test filename-2.9 {Tcl_GetPathType: mac, tilde names} { +test filename-2.9 {Tcl_GetPathType: mac, tilde names} {testsetplatform} { testsetplatform mac file pathtype ~/ } absolute -test filename-2.10 {Tcl_GetPathType: mac, tilde names} { +test filename-2.10 {Tcl_GetPathType: mac, tilde names} {testsetplatform} { testsetplatform mac file pathtype ~/foo } absolute -test filename-2.11 {Tcl_GetPathType: mac, unix-style names} { +test filename-2.11 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} { testsetplatform mac file pathtype /foo } absolute -test filename-2.12 {Tcl_GetPathType: mac, unix-style names} { +test filename-2.12 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} { testsetplatform mac file pathtype /./foo } absolute -test filename-2.13 {Tcl_GetPathType: mac, unix-style names} { +test filename-2.13 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} { testsetplatform mac file pathtype /..//./foo } absolute -test filename-2.14 {Tcl_GetPathType: mac, unix-style names} { +test filename-2.14 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} { testsetplatform mac file pathtype /foo/bar } absolute -test filename-2.15 {Tcl_GetPathType: mac, unix-style names} { +test filename-2.15 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} { testsetplatform mac file pathtype foo/bar } relative -test filename-2.16 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.16 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype : } relative -test filename-2.17 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.17 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype :foo } relative -test filename-2.18 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.18 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype foo: } absolute -test filename-2.19 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.19 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype foo:bar } absolute -test filename-2.20 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.20 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype :foo:bar } relative -test filename-2.21 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.21 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype ::foo:bar } relative -test filename-2.22 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.22 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype ~foo } absolute -test filename-2.23 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.23 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype :~foo } relative -test filename-2.24 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.24 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype ~foo: } absolute -test filename-2.25 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.25 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype foo/bar: } absolute -test filename-2.26 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.26 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype /foo: } absolute -test filename-2.27 {Tcl_GetPathType: mac, mac-style names} { +test filename-2.27 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} { testsetplatform mac file pathtype foo } relative -test filename-3.1 {Tcl_GetPathType: windows} { +test filename-3.1 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype / } volumerelative -test filename-3.2 {Tcl_GetPathType: windows} { +test filename-3.2 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype \\ } volumerelative -test filename-3.3 {Tcl_GetPathType: windows} { +test filename-3.3 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype /foo } volumerelative -test filename-3.4 {Tcl_GetPathType: windows} { +test filename-3.4 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype \\foo } volumerelative -test filename-3.5 {Tcl_GetPathType: windows} { +test filename-3.5 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c:/ } absolute -test filename-3.6 {Tcl_GetPathType: windows} { +test filename-3.6 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c:\\ } absolute -test filename-3.7 {Tcl_GetPathType: windows} { +test filename-3.7 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c:/foo } absolute -test filename-3.8 {Tcl_GetPathType: windows} { +test filename-3.8 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c:\\foo } absolute -test filename-3.9 {Tcl_GetPathType: windows} { +test filename-3.9 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c: } volumerelative -test filename-3.10 {Tcl_GetPathType: windows} { +test filename-3.10 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype c:foo } volumerelative -test filename-3.11 {Tcl_GetPathType: windows} { +test filename-3.11 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype foo } relative -test filename-3.12 {Tcl_GetPathType: windows} { +test filename-3.12 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype //foo/bar } absolute -test filename-3.13 {Tcl_GetPathType: windows} { +test filename-3.13 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype ~foo } absolute -test filename-3.14 {Tcl_GetPathType: windows} { +test filename-3.14 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype ~ } absolute -test filename-3.15 {Tcl_GetPathType: windows} { +test filename-3.15 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype ~/foo } absolute -test filename-3.16 {Tcl_GetPathType: windows} { +test filename-3.16 {Tcl_GetPathType: windows} {testsetplatform} { testsetplatform windows file pathtype ./~foo } relative -test filename-4.1 {Tcl_SplitPath: unix} { +test filename-4.1 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split / } {/} -test filename-4.2 {Tcl_SplitPath: unix} { +test filename-4.2 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split /foo } {/ foo} -test filename-4.3 {Tcl_SplitPath: unix} { +test filename-4.3 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split /foo/bar } {/ foo bar} -test filename-4.4 {Tcl_SplitPath: unix} { +test filename-4.4 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split /foo/bar/baz } {/ foo bar baz} -test filename-4.5 {Tcl_SplitPath: unix} { +test filename-4.5 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split foo/bar } {foo bar} -test filename-4.6 {Tcl_SplitPath: unix} { +test filename-4.6 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ./foo/bar } {. foo bar} -test filename-4.7 {Tcl_SplitPath: unix} { +test filename-4.7 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split /foo/../././foo/bar } {/ foo .. . . foo bar} -test filename-4.8 {Tcl_SplitPath: unix} { +test filename-4.8 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ../foo/bar } {.. foo bar} -test filename-4.9 {Tcl_SplitPath: unix} { +test filename-4.9 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split {} } {} -test filename-4.10 {Tcl_SplitPath: unix} { +test filename-4.10 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split . } {.} -test filename-4.11 {Tcl_SplitPath: unix} { +test filename-4.11 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ../ } {..} -test filename-4.12 {Tcl_SplitPath: unix} { +test filename-4.12 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ../.. } {.. ..} -test filename-4.13 {Tcl_SplitPath: unix} { +test filename-4.13 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split //foo } {/ foo} -test filename-4.14 {Tcl_SplitPath: unix} { +test filename-4.14 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split foo//bar } {foo bar} -test filename-4.15 {Tcl_SplitPath: unix} { +test filename-4.15 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ~foo } {~foo} -test filename-4.16 {Tcl_SplitPath: unix} { +test filename-4.16 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ~foo/~bar } {~foo ./~bar} -test filename-4.17 {Tcl_SplitPath: unix} { +test filename-4.17 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split ~foo/~bar/~baz } {~foo ./~bar ./~baz} -test filename-4.18 {Tcl_SplitPath: unix} { +test filename-4.18 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split foo/bar~/baz } {foo bar~ baz} -test filename-5.1 {Tcl_SplitPath: mac} { +test filename-5.1 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:b } {a: b} -test filename-5.2 {Tcl_SplitPath: mac} { +test filename-5.2 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:b:c } {a: b c} -test filename-5.3 {Tcl_SplitPath: mac} { +test filename-5.3 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:b:c: } {a: b c} -test filename-5.4 {Tcl_SplitPath: mac} { +test filename-5.4 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a: } {a:} -test filename-5.5 {Tcl_SplitPath: mac} { +test filename-5.5 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:: } {a: ::} -test filename-5.6 {Tcl_SplitPath: mac} { +test filename-5.6 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a::: } {a: :: ::} -test filename-5.7 {Tcl_SplitPath: mac} { +test filename-5.7 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split :a } {a} -test filename-5.8 {Tcl_SplitPath: mac} { +test filename-5.8 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split :a:: } {a ::} -test filename-5.9 {Tcl_SplitPath: mac} { +test filename-5.9 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split : } {:} -test filename-5.10 {Tcl_SplitPath: mac} { +test filename-5.10 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split :: } {::} -test filename-5.11 {Tcl_SplitPath: mac} { +test filename-5.11 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ::: } {:: ::} -test filename-5.12 {Tcl_SplitPath: mac} { +test filename-5.12 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:::b } {a: :: :: b} -test filename-5.13 {Tcl_SplitPath: mac} { +test filename-5.13 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /a:b } {/a: b} -test filename-5.14 {Tcl_SplitPath: mac} { +test filename-5.14 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~: } {~:} -test filename-5.15 {Tcl_SplitPath: mac} { +test filename-5.15 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~/: } {~/:} -test filename-5.16 {Tcl_SplitPath: mac} { +test filename-5.16 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~:foo } {~: foo} -test filename-5.17 {Tcl_SplitPath: mac} { +test filename-5.17 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~/foo } {~: foo} -test filename-5.18 {Tcl_SplitPath: mac} { +test filename-5.18 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~foo: } {~foo:} -test filename-5.19 {Tcl_SplitPath: mac} { +test filename-5.19 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:~foo } {a: :~foo} -test filename-5.20 {Tcl_SplitPath: mac} { +test filename-5.20 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split / } {:/} -test filename-5.21 {Tcl_SplitPath: mac} { +test filename-5.21 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a:b/c } {a: :b/c} -test filename-5.22 {Tcl_SplitPath: mac} { +test filename-5.22 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /foo } {foo:} -test filename-5.23 {Tcl_SplitPath: mac} { +test filename-5.23 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /a/b } {a: b} -test filename-5.24 {Tcl_SplitPath: mac} { +test filename-5.24 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /a/b/foo } {a: b foo} -test filename-5.25 {Tcl_SplitPath: mac} { +test filename-5.25 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a/b } {a b} -test filename-5.26 {Tcl_SplitPath: mac} { +test filename-5.26 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ./foo/bar } {: foo bar} -test filename-5.27 {Tcl_SplitPath: mac} { +test filename-5.27 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ../foo/bar } {:: foo bar} -test filename-5.28 {Tcl_SplitPath: mac} { +test filename-5.28 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split {} } {} -test filename-5.29 {Tcl_SplitPath: mac} { +test filename-5.29 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split . } {:} -test filename-5.30 {Tcl_SplitPath: mac} { +test filename-5.30 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ././ } {: :} -test filename-5.31 {Tcl_SplitPath: mac} { +test filename-5.31 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ././. } {: : :} -test filename-5.32 {Tcl_SplitPath: mac} { +test filename-5.32 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ../ } {::} -test filename-5.33 {Tcl_SplitPath: mac} { +test filename-5.33 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split .. } {::} -test filename-5.34 {Tcl_SplitPath: mac} { +test filename-5.34 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ../.. } {:: ::} -test filename-5.35 {Tcl_SplitPath: mac} { +test filename-5.35 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split //foo } {foo:} -test filename-5.36 {Tcl_SplitPath: mac} { +test filename-5.36 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split foo//bar } {foo bar} -test filename-5.37 {Tcl_SplitPath: mac} { +test filename-5.37 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~foo } {~foo:} -test filename-5.38 {Tcl_SplitPath: mac} { +test filename-5.38 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~ } {~:} -test filename-5.39 {Tcl_SplitPath: mac} { +test filename-5.39 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split foo } {foo} -test filename-5.40 {Tcl_SplitPath: mac} { +test filename-5.40 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~/ } {~:} -test filename-5.41 {Tcl_SplitPath: mac} { +test filename-5.41 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~foo/~bar } {~foo: :~bar} -test filename-5.42 {Tcl_SplitPath: mac} { +test filename-5.42 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split ~foo/~bar/~baz } {~foo: :~bar :~baz} -test filename-5.43 {Tcl_SplitPath: mac} { +test filename-5.43 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split foo/bar~/baz } {foo bar~ baz} -test filename-5.44 {Tcl_SplitPath: mac} { +test filename-5.44 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a/../b } {a :: b} -test filename-5.45 {Tcl_SplitPath: mac} { +test filename-5.45 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a/../../b } {a :: :: b} -test filename-5.46 {Tcl_SplitPath: mac} { +test filename-5.46 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split a/.././../b } {a :: : :: b} -test filename-5.47 {Tcl_SplitPath: mac} { +test filename-5.47 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /../bar } {bar:} -test filename-5.48 {Tcl_SplitPath: mac} { +test filename-5.48 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /./bar } {bar:} -test filename-5.49 {Tcl_SplitPath: mac} { +test filename-5.49 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split //.//.././bar } {bar:} -test filename-5.50 {Tcl_SplitPath: mac} { +test filename-5.50 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split /.. } {:/..} -test filename-5.51 {Tcl_SplitPath: mac} { +test filename-5.51 {Tcl_SplitPath: mac} {testsetplatform} { testsetplatform mac file split //.//.././ } {://.//.././} -test filename-6.1 {Tcl_SplitPath: win} { +test filename-6.1 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split / } {/} -test filename-6.2 {Tcl_SplitPath: win} { +test filename-6.2 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /foo } {/ foo} -test filename-6.3 {Tcl_SplitPath: win} { +test filename-6.3 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /foo/bar } {/ foo bar} -test filename-6.4 {Tcl_SplitPath: win} { +test filename-6.4 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /foo/bar/baz } {/ foo bar baz} -test filename-6.5 {Tcl_SplitPath: win} { +test filename-6.5 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split foo/bar } {foo bar} -test filename-6.6 {Tcl_SplitPath: win} { +test filename-6.6 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ./foo/bar } {. foo bar} -test filename-6.7 {Tcl_SplitPath: win} { +test filename-6.7 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /foo/../././foo/bar } {/ foo .. . . foo bar} -test filename-6.8 {Tcl_SplitPath: win} { +test filename-6.8 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ../foo/bar } {.. foo bar} -test filename-6.9 {Tcl_SplitPath: win} { +test filename-6.9 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split {} } {} -test filename-6.10 {Tcl_SplitPath: win} { +test filename-6.10 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split . } {.} -test filename-6.11 {Tcl_SplitPath: win} { +test filename-6.11 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ../ } {..} -test filename-6.12 {Tcl_SplitPath: win} { +test filename-6.12 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ../.. } {.. ..} -test filename-6.13 {Tcl_SplitPath: win} { +test filename-6.13 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split //foo } {/ foo} -test filename-6.14 {Tcl_SplitPath: win} { +test filename-6.14 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split foo//bar } {foo bar} -test filename-6.15 {Tcl_SplitPath: win} { +test filename-6.15 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /\\/foo//bar } {//foo/bar} -test filename-6.16 {Tcl_SplitPath: win} { +test filename-6.16 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /\\/foo//bar } {//foo/bar} -test filename-6.17 {Tcl_SplitPath: win} { +test filename-6.17 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split /\\/foo//bar } {//foo/bar} -test filename-6.18 {Tcl_SplitPath: win} { +test filename-6.18 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split \\\\foo\\bar } {//foo/bar} -test filename-6.19 {Tcl_SplitPath: win} { +test filename-6.19 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split \\\\foo\\bar/baz } {//foo/bar baz} -test filename-6.20 {Tcl_SplitPath: win} { +test filename-6.20 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:/foo } {c:/ foo} -test filename-6.21 {Tcl_SplitPath: win} { +test filename-6.21 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:foo } {c: foo} -test filename-6.22 {Tcl_SplitPath: win} { +test filename-6.22 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c: } {c:} -test filename-6.23 {Tcl_SplitPath: win} { +test filename-6.23 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:\\ } {c:/} -test filename-6.24 {Tcl_SplitPath: win} { +test filename-6.24 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:/ } {c:/} -test filename-6.25 {Tcl_SplitPath: win} { +test filename-6.25 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:/./.. } {c:/ . ..} -test filename-6.26 {Tcl_SplitPath: win} { +test filename-6.26 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ~foo } {~foo} -test filename-6.27 {Tcl_SplitPath: win} { +test filename-6.27 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ~foo/~bar } {~foo ./~bar} -test filename-6.28 {Tcl_SplitPath: win} { +test filename-6.28 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split ~foo/~bar/~baz } {~foo ./~bar ./~baz} -test filename-6.29 {Tcl_SplitPath: win} { +test filename-6.29 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split foo/bar~/baz } {foo bar~ baz} -test filename-6.30 {Tcl_SplitPath: win} { +test filename-6.30 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win file split c:~foo } {c: ./~foo} -test filename-7.1 {Tcl_JoinPath: unix} { +test filename-7.1 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join / a } {/a} -test filename-7.2 {Tcl_JoinPath: unix} { +test filename-7.2 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join a b } {a/b} -test filename-7.3 {Tcl_JoinPath: unix} { +test filename-7.3 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join /a c /b d } {/b/d} -test filename-7.4 {Tcl_JoinPath: unix} { +test filename-7.4 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join / } {/} -test filename-7.5 {Tcl_JoinPath: unix} { +test filename-7.5 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join a } {a} -test filename-7.6 {Tcl_JoinPath: unix} { +test filename-7.6 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join {} } {} -test filename-7.7 {Tcl_JoinPath: unix} { +test filename-7.7 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join /a/ b } {/a/b} -test filename-7.8 {Tcl_JoinPath: unix} { +test filename-7.8 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join /a// b } {/a/b} -test filename-7.9 {Tcl_JoinPath: unix} { +test filename-7.9 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join /a/./../. b } {/a/./.././b} -test filename-7.10 {Tcl_JoinPath: unix} { +test filename-7.10 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join ~ a } {~/a} -test filename-7.11 {Tcl_JoinPath: unix} { +test filename-7.11 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join ~a ~b } {~b} -test filename-7.12 {Tcl_JoinPath: unix} { +test filename-7.12 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join ./~a b } {./~a/b} -test filename-7.13 {Tcl_JoinPath: unix} { +test filename-7.13 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join ./~a ~b } {~b} -test filename-7.14 {Tcl_JoinPath: unix} { +test filename-7.14 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join ./~a ./~b } {./~a/~b} -test filename-7.15 {Tcl_JoinPath: unix} { +test filename-7.15 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join a . b } {a/./b} -test filename-7.16 {Tcl_JoinPath: unix} { +test filename-7.16 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join a . ./~b } {a/./~b} -test filename-7.17 {Tcl_JoinPath: unix} { +test filename-7.17 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join //a b } {/a/b} -test filename-7.18 {Tcl_JoinPath: unix} { +test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix file join /// a b } {/a/b} -test filename-8.1 {Tcl_JoinPath: mac} { +test filename-8.1 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a b } {:a:b} -test filename-8.2 {Tcl_JoinPath: mac} { +test filename-8.2 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join :a b } {:a:b} -test filename-8.3 {Tcl_JoinPath: mac} { +test filename-8.3 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a b: } {b:} -test filename-8.4 {Tcl_JoinPath: mac} { +test filename-8.4 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a: :b } {a:b} -test filename-8.5 {Tcl_JoinPath: mac} { +test filename-8.5 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a: :b: } {a:b} -test filename-8.6 {Tcl_JoinPath: mac} { +test filename-8.6 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a :: b } {:a::b} -test filename-8.7 {Tcl_JoinPath: mac} { +test filename-8.7 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a :: :: b } {:a:::b} -test filename-8.8 {Tcl_JoinPath: mac} { +test filename-8.8 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a ::: b } {:a:::b} -test filename-8.9 {Tcl_JoinPath: mac} { +test filename-8.9 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a: b: } {b:} -test filename-8.10 {Tcl_JoinPath: mac} { +test filename-8.10 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join /a/b } {a:b} -test filename-8.11 {Tcl_JoinPath: mac} { +test filename-8.11 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join /a/b c/d } {a:b:c:d} -test filename-8.12 {Tcl_JoinPath: mac} { +test filename-8.12 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join /a/b :c:d } {a:b:c:d} -test filename-8.13 {Tcl_JoinPath: mac} { +test filename-8.13 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join ~ foo } {~:foo} -test filename-8.14 {Tcl_JoinPath: mac} { +test filename-8.14 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join :: :: } {:::} -test filename-8.15 {Tcl_JoinPath: mac} { +test filename-8.15 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a: :: } {a::} -test filename-8.16 {Tcl_JoinPath: mac} { +test filename-8.16 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a {} b } {:a:b} -test filename-8.17 {Tcl_JoinPath: mac} { +test filename-8.17 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a::: b } {a:::b} -test filename-8.18 {Tcl_JoinPath: mac} { +test filename-8.18 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a : : : } {:a} -test filename-8.19 {Tcl_JoinPath: mac} { +test filename-8.19 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join : } {:} -test filename-8.20 {Tcl_JoinPath: mac} { +test filename-8.20 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join : a } {:a} -test filename-8.21 {Tcl_JoinPath: mac} { +test filename-8.21 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join a: :b/c } {a:b/c} -test filename-8.22 {Tcl_JoinPath: mac} { +test filename-8.22 {Tcl_JoinPath: mac} {testsetplatform} { testsetplatform mac file join :a :b/c } {:a:b/c} -test filename-9.1 {Tcl_JoinPath: win} { +test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join a b } {a/b} -test filename-9.2 {Tcl_JoinPath: win} { +test filename-9.2 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join /a b } {/a/b} -test filename-9.3 {Tcl_JoinPath: win} { +test filename-9.3 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join /a /b } {/b} -test filename-9.4 {Tcl_JoinPath: win} { +test filename-9.4 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join c: foo } {c:foo} -test filename-9.5 {Tcl_JoinPath: win} { +test filename-9.5 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join c:/ foo } {c:/foo} -test filename-9.6 {Tcl_JoinPath: win} { +test filename-9.6 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join c:\\bar foo } {c:/bar/foo} -test filename-9.7 {Tcl_JoinPath: win} { +test filename-9.7 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join /foo c:bar } {c:bar} -test filename-9.8 {Tcl_JoinPath: win} { +test filename-9.8 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ///host//share dir } {//host/share/dir} -test filename-9.9 {Tcl_JoinPath: win} { +test filename-9.9 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ~ foo } {~/foo} -test filename-9.10 {Tcl_JoinPath: win} { +test filename-9.10 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ~/~foo } {~/~foo} -test filename-9.11 {Tcl_JoinPath: win} { +test filename-9.11 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ~ ./~foo } {~/~foo} -test filename-9.12 {Tcl_JoinPath: win} { +test filename-9.12 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join / ~foo } {~foo} -test filename-9.13 {Tcl_JoinPath: win} { +test filename-9.13 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ./a/ b c } {./a/b/c} -test filename-9.14 {Tcl_JoinPath: win} { +test filename-9.14 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join ./~a/ b c } {./~a/b/c} -test filename-9.15 {Tcl_JoinPath: win} { +test filename-9.15 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join // host share path } {/host/share/path} -test filename-9.16 {Tcl_JoinPath: win} { +test filename-9.16 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join foo . bar } {foo/./bar} -test filename-9.17 {Tcl_JoinPath: win} { +test filename-9.17 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join foo .. bar } {foo/../bar} -test filename-9.18 {Tcl_JoinPath: win} { +test filename-9.18 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join foo/./bar } {foo/./bar} -test filename-10.1 {Tcl_TranslateFileName} { +test filename-10.1 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform unix list [catch {testtranslatefilename foo} msg] $msg } {0 foo} -test filename-10.2 {Tcl_TranslateFileName} { +test filename-10.2 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform windows list [catch {testtranslatefilename {c:/foo}} msg] $msg } {0 {c:\foo}} -test filename-10.3 {Tcl_TranslateFileName} { +test filename-10.3 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform windows list [catch {testtranslatefilename {c:/\\foo/}} msg] $msg } {0 {c:\foo}} -test filename-10.4 {Tcl_TranslateFileName} { +test filename-10.4 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform mac list [catch {testtranslatefilename foo} msg] $msg } {0 :foo} -test filename-10.5 {Tcl_TranslateFileName} { +test filename-10.5 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform mac list [catch {testtranslatefilename :~foo} msg] $msg } {0 :~foo} -test filename-10.6 {Tcl_TranslateFileName} { +test filename-10.6 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "/home/test" @@ -897,7 +895,7 @@ test filename-10.6 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 /home/test/foo} -test filename-10.7 {Tcl_TranslateFileName} { +test filename-10.7 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) unset env(HOME) @@ -906,7 +904,7 @@ test filename-10.7 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {1 {couldn't find HOME environment variable to expand path}} -test filename-10.8 {Tcl_TranslateFileName} { +test filename-10.8 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "/home/test" @@ -915,7 +913,7 @@ test filename-10.8 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 /home/test} -test filename-10.9 {Tcl_TranslateFileName} { +test filename-10.9 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "/home/test/" @@ -924,7 +922,7 @@ test filename-10.9 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 /home/test} -test filename-10.10 {Tcl_TranslateFileName} { +test filename-10.10 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "/home/test/" @@ -933,7 +931,7 @@ test filename-10.10 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 /home/test/foo} -test filename-10.11 {Tcl_TranslateFileName} { +test filename-10.11 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:" @@ -942,7 +940,7 @@ test filename-10.11 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:foo} -test filename-10.12 {Tcl_TranslateFileName} { +test filename-10.12 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:home" @@ -951,7 +949,7 @@ test filename-10.12 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:home:foo} -test filename-10.13 {Tcl_TranslateFileName} { +test filename-10.13 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:home" @@ -960,7 +958,7 @@ test filename-10.13 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:home::foo} -test filename-10.14 {Tcl_TranslateFileName} { +test filename-10.14 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:home" @@ -969,7 +967,7 @@ test filename-10.14 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:home} -test filename-10.15 {Tcl_TranslateFileName} { +test filename-10.15 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:home:" @@ -978,7 +976,7 @@ test filename-10.15 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:home::foo} -test filename-10.16 {Tcl_TranslateFileName} { +test filename-10.16 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "Root:home::" @@ -987,7 +985,7 @@ test filename-10.16 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 Root:home:::foo} -test filename-10.17 {Tcl_TranslateFileName} { +test filename-10.17 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "\\home\\" @@ -996,7 +994,7 @@ test filename-10.17 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 {\home\foo}} -test filename-10.18 {Tcl_TranslateFileName} { +test filename-10.18 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "\\home\\" @@ -1005,7 +1003,7 @@ test filename-10.18 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 {\home\foo\bar}} -test filename-10.19 {Tcl_TranslateFileName} { +test filename-10.19 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "c:" @@ -1014,10 +1012,10 @@ test filename-10.19 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 c:foo} -test filename-10.20 {Tcl_TranslateFileName} { +test filename-10.20 {Tcl_TranslateFileName} {testtranslatefilename} { list [catch {testtranslatefilename ~blorp/foo} msg] $msg } {1 {user "blorp" doesn't exist}} -test filename-10.21 {Tcl_TranslateFileName} { +test filename-10.21 {Tcl_TranslateFileName} {testsetplatform} { global env set temp $env(HOME) set env(HOME) "c:\\" @@ -1026,12 +1024,14 @@ test filename-10.21 {Tcl_TranslateFileName} { set env(HOME) $temp set result } {0 {c:\foo}} -test filename-10.22 {Tcl_TranslateFileName} { +test filename-10.22 {Tcl_TranslateFileName} {testsetplatform} { testsetplatform windows list [catch {testtranslatefilename foo//bar} msg] $msg } {0 {foo\bar}} -testsetplatform $platform +if {[tcltest::testConstraint testsetplatform]} { + testsetplatform $platform +} test filename-10.23 {Tcl_TranslateFileName} {unixOnly nonPortable} { # this test fails if ~ouster is not /home/ouster @@ -1048,7 +1048,7 @@ test filename-11.1 {Tcl_GlobCmd} { } {1 {wrong # args: should be "glob ?switches? name ?name ...?"}} test filename-11.2 {Tcl_GlobCmd} { list [catch {glob -gorp} msg] $msg -} {1 {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -types, or --}} +} {1 {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} test filename-11.3 {Tcl_GlobCmd} { list [catch {glob -nocomplai} msg] $msg } {1 {wrong # args: should be "glob ?switches? name ?name ...?"}} @@ -1067,19 +1067,19 @@ test filename-11.7 {Tcl_GlobCmd} { test filename-11.8 {Tcl_GlobCmd} { list [catch {glob -nocomplain -- -nocomplain} msg] $msg } {0 {}} -test filename-11.9 {Tcl_GlobCmd} { +test filename-11.9 {Tcl_GlobCmd} {testsetplatform} { testsetplatform unix list [catch {glob ~\\xyqrszzz/bar} msg] $msg } {1 {user "\xyqrszzz" doesn't exist}} -test filename-11.10 {Tcl_GlobCmd} { +test filename-11.10 {Tcl_GlobCmd} {testsetplatform} { testsetplatform unix list [catch {glob -nocomplain ~\\xyqrszzz/bar} msg] $msg } {0 {}} -test filename-11.11 {Tcl_GlobCmd} { +test filename-11.11 {Tcl_GlobCmd} {testsetplatform} { testsetplatform unix list [catch {glob ~xyqrszzz\\/\\bar} msg] $msg } {1 {user "xyqrszzz" doesn't exist}} -test filename-11.12 {Tcl_GlobCmd} { +test filename-11.12 {Tcl_GlobCmd} {testsetplatform} { testsetplatform unix set home $env(HOME) unset env(HOME) @@ -1088,7 +1088,9 @@ test filename-11.12 {Tcl_GlobCmd} { set x } {1 {couldn't find HOME environment variable to expand path}} -testsetplatform $platform +if {[tcltest::testConstraint testsetplatform]} { + testsetplatform $platform +} test filename-11.13 {Tcl_GlobCmd} { list [catch {file join [lindex [glob ~] 0]} msg] $msg @@ -1124,7 +1126,7 @@ test filename-11.16 {Tcl_GlobCmd} { set globname "globTest" set horribleglobname "glob\[\{Test" -test filename-11.17 {Tcl_GlobCmd} { +test filename-11.17 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -directory $globname *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ @@ -1132,15 +1134,33 @@ test filename-11.17 {Tcl_GlobCmd} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] -test filename-11.18 {Tcl_GlobCmd} { +test filename-11.17.1 {Tcl_GlobCmd} {pcOnly macOnly} { + list [catch {lsort [glob -directory $globname *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.18 {Tcl_GlobCmd} {unixOnly} { + list [catch {lsort [glob -path $globname/ *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.18.1 {Tcl_GlobCmd} {pcOnly macOnly} { list [catch {lsort [glob -path $globname/ *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] -test filename-11.19 {Tcl_GlobCmd} { +test filename-11.19 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -join -path \ [string range $globname 0 5] * *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ @@ -1149,6 +1169,16 @@ test filename-11.19 {Tcl_GlobCmd} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.19.1 {Tcl_GlobCmd} {pcOnly macOnly} { + list [catch {lsort [glob -join -path \ + [string range $globname 0 5] * *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] test filename-11.20 {Tcl_GlobCmd} { list [catch {lsort [glob -type d -dir $globname *]} msg] $msg } [list 0 [lsort [list [file join $globname a1]\ @@ -1161,7 +1191,7 @@ test filename-11.21 {Tcl_GlobCmd} { file rename globTest $horribleglobname set globname $horribleglobname -test filename-11.22 {Tcl_GlobCmd} { +test filename-11.22 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -dir $globname *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ @@ -1169,7 +1199,16 @@ test filename-11.22 {Tcl_GlobCmd} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] -test filename-11.23 {Tcl_GlobCmd} { +test filename-11.22.1 {Tcl_GlobCmd} {pcOnly macOnly} { + list [catch {lsort [glob -dir $globname *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.23 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -path $globname/ *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ @@ -1177,7 +1216,16 @@ test filename-11.23 {Tcl_GlobCmd} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] -test filename-11.24 {Tcl_GlobCmd} { +test filename-11.23.1 {Tcl_GlobCmd} {pcOnly macOnly} { + list [catch {lsort [glob -path $globname/ *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.24 {Tcl_GlobCmd} {unixOnly} { list [catch {lsort [glob -join -path \ [string range $globname 0 5] * *]} msg] $msg } [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ @@ -1186,6 +1234,16 @@ test filename-11.24 {Tcl_GlobCmd} { [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-11.24.1 {Tcl_GlobCmd} {pcOnly macOnly} { + list [catch {lsort [glob -join -path \ + [string range $globname 0 5] * *]} msg] $msg +} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ + [file join $globname a3]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] test filename-11.25 {Tcl_GlobCmd} { list [catch {lsort [glob -type d -dir $globname *]} msg] $msg } [list 0 [lsort [list [file join $globname a1]\ @@ -1221,7 +1279,39 @@ test filename-11.34 {Tcl_GlobCmd} { } {1 {missing argument to "-directory"}} test filename-11.35 {Tcl_GlobCmd} { list [catch {glob -paths *} msg] $msg -} {1 {bad option "-paths": must be -directory, -join, -nocomplain, -path, -types, or --}} +} {1 {bad option "-paths": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} +# Test '-tails' flag to glob. +test filename-11.36 {Tcl_GlobCmd} { + list [catch {glob -tails *} msg] $msg +} {1 {"-tails" must be used with either "-directory" or "-path"}} +test filename-11.37 {Tcl_GlobCmd} { + list [catch {glob -type d -tails -path $globname *} msg] $msg +} [list 0 [list $globname]] +test filename-11.38 {Tcl_GlobCmd} { + list [catch {glob -tails -path $globname *} msg] $msg +} [list 0 [list $globname]] +test filename-11.39 {Tcl_GlobCmd} { + list [catch {glob -tails -join -path $globname *} msg] $msg +} [list 0 [list $globname]] +test filename-11.40 {Tcl_GlobCmd} { + expr {[glob -dir [pwd] -tails *] == [glob *]} +} {1} +test filename-11.41 {Tcl_GlobCmd} { + expr {[glob -dir [pwd] -tails *] != [glob -dir [pwd] *]} +} {1} +test filename-11.42 {Tcl_GlobCmd} { + set res [list] + foreach f [glob -dir [pwd] *] { + lappend res [file tail $f] + } + expr {$res == [glob *]} +} {1} +test filename-11.43 {Tcl_GlobCmd} { + list [catch {glob -t *} msg] $msg +} {1 {ambiguous option "-t": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} +test filename-11.44 {Tcl_GlobCmd} { + list [catch {glob -tails -path hello -directory hello *} msg] $msg +} {1 {"-directory" cannot be used with "-path"}} file rename $horribleglobname globTest set globname globTest @@ -1339,9 +1429,12 @@ test filename-14.5 {asterisks, question marks, and brackets} {unixOrPc} { test filename-14.6 {asterisks, question marks, and brackets} {macOnly} { lsort [glob */*/*/*.c] } {:globTest:a1:b1:x2.c :globTest:a1:b2:y2.c} -test filename-14.7 {asterisks, question marks, and brackets} {unixOrPc} { +test filename-14.7 {asterisks, question marks, and brackets} {unixOnly} { lsort [glob globTest/*] } {globTest/a1 globTest/a2 globTest/a3 {globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c} +test filename-14.7.1 {asterisks, question marks, and brackets} {pcOnly} { + lsort [glob globTest/*] +} {globTest/.1 globTest/a1 globTest/a2 globTest/a3 {globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c} test filename-14.8 {asterisks, question marks, and brackets} {macOnly} { lsort [glob globTest/*] } {:globTest:.1 :globTest:a1 :globTest:a2 :globTest:a3 {:globTest:weird name.c} :globTest:x,z1.c :globTest:x1.c :globTest:y1.c :globTest:z1.c} @@ -1398,13 +1491,21 @@ test filename-14.23 {slash globbing} {unixOrPc} { test filename-14.24 {slash globbing} {pcOnly} { glob {\\} } / -test filename-14.25 {type specific globbing} { +test filename-14.25 {type specific globbing} {unixOnly} { list [catch {lsort [glob -dir globTest -types f *]} msg] $msg } [list 0 [lsort [list \ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ [file join $globname y1.c] [file join $globname z1.c]]]] +test filename-14.25.1 {type specific globbing} {pcOnly macOnly} { + list [catch {lsort [glob -dir globTest -types f *]} msg] $msg +} [list 0 [lsort [list \ + [file join $globname .1]\ + [file join $globname "weird name.c"]\ + [file join $globname x,z1.c]\ + [file join $globname x1.c]\ + [file join $globname y1.c] [file join $globname z1.c]]]] test filename-14.26 {type specific globbing} { list [catch {glob -nocomplain -dir globTest -types {readonly} *} msg] $msg } [list 0 {}] @@ -1518,7 +1619,10 @@ file delete -force C:/globTest cd $oldDir file delete -force globTest set env(HOME) $oldhome -testsetplatform $platform -catch {unset oldhome platform temp result} +if {[tcltest::testConstraint testsetplatform]} { + testsetplatform $platform + catch {unset platform} +} +catch {unset oldhome temp result} ::tcltest::cleanupTests return |