diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-07-12 08:16:50 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-07-12 19:17:40 +1000 |
commit | 3b317b146c492ca5176044484af7d5877799a716 (patch) | |
tree | 915b08a7fc1cbcc7042b4bacbc8a74f2a111d15e /tests | |
parent | 3c2e76f21f3bc3c154018135b4352ef5c694f113 (diff) | |
download | jimtcl-3b317b146c492ca5176044484af7d5877799a716.zip jimtcl-3b317b146c492ca5176044484af7d5877799a716.tar.gz jimtcl-3b317b146c492ca5176044484af7d5877799a716.tar.bz2 |
Fix some [file join] cases
In particular, file join / anything
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/filejoin.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/filejoin.test b/tests/filejoin.test index 0cf1e03..7245938 100644 --- a/tests/filejoin.test +++ b/tests/filejoin.test @@ -50,6 +50,24 @@ test join-1.12 "Two names with double slashes" { file join abc/ /def } {/def} +test join-1.13 "Join to root" { + file join / abc +} {/abc} + +test join-1.14 "Join to root" { + set dir [file join / .] + # Either / or /. is OK here + expr {$dir in {/ /.}} +} 1 + +test join-1.15 "Join to root" { + file join / / +} {/} + +test join-1.16 "Join to root" { + file join /abc / +} {/} + test join-2.1 "Dir is empty string" { file join "" def } {def} |