271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
+
+
+
+
+
+
+
+
+
+
|
normalisation of nonexistent user - verify no tilde expansion
} -body {
file normalize ~noonewiththisname
} -result [file join [pwd] ~noonewiththisname]
test filesystem-1.30.1 {normalisation of existing user} -body {
file normalize ~$::tcl_platform(user)
} -result [file join [pwd] ~$::tcl_platform(user)]
test filesystem-1.30.3 {file normalization should distinguish between ~ and ~user} -setup {
set oldhome $::env(HOME)
set olduserhome [file home $::tcl_platform(user)]
set ::env(HOME) [file join $oldhome temp]
} -cleanup {
set env(HOME) $oldhome
} -body {
list [string equal [file home] $::env(HOME)] \
[string equal $olduserhome [file home $::tcl_platform(user)]]
} -result {1 1}
test filesystem-1.31 {link normalisation: link near filesystem root} {testsetplatform} {
testsetplatform unix
file normalize /foo/../bar
} {/bar}
test filesystem-1.32 {link normalisation: link near filesystem root} {testsetplatform} {
testsetplatform unix
file normalize /../bar
|