1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#! /usr/bin/env tclsh
package require tcltest
tcltest::testConstraint tcl87 [string match "8.7.*" [info patchlevel]]
tcltest::configure -verbose pbse
tcltest::configure {*}$argv
set rootDir "//xvfs:/example"
set rootDirNative [file join [pwd] example]
#set rootDir $rootDirNative
set testFile "${rootDir}/foo"
proc glob_verify {args} {
set rv [glob -nocomplain -directory $::rootDir {*}$args]
set verify [glob -nocomplain -directory $::rootDirNative {*}$args]
|
>
>
>
>
>
>
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#! /usr/bin/env tclsh
package require tcltest
tcltest::testConstraint tcl87 [string match "8.7.*" [info patchlevel]]
tcltest::configure -verbose pbse
tcltest::configure {*}$argv
if {![info exists ::env(XVFS_ROOT_MOUNTPOINT)]} {
set xvfsRootMountpoint "//xvfs:"
} else {
set xvfsRootMountpoint $::env(XVFS_ROOT_MOUNTPOINT)
}
set rootDir "${xvfsRootMountpoint}/example"
set rootDirNative [file join [pwd] example]
#set rootDir $rootDirNative
set testFile "${rootDir}/foo"
proc glob_verify {args} {
set rv [glob -nocomplain -directory $::rootDir {*}$args]
set verify [glob -nocomplain -directory $::rootDirNative {*}$args]
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
set fileInfo(type)
} -cleanup {
unset -nocomplain fileInfo
} -result directory
# Broken in Tcl 8.6 and earlier
tcltest::test xvfs-glob-advanced-dir-with-pattern "Xvfs Glob Match Pattern and Directory Together" -body {
llength [glob //xvfs:/example/*]
} -constraints tcl87 -result 3
tcltest::test xvfs-glob-file-dirname "Xvfs Relies on file dirname" -body {
lindex [glob -directory [file dirname $testFile] *] 0
} -constraints tcl87 -match glob -result "$rootDir/*"
tcltest::test xvfs-cwd-1 "Xvfs Can Be cwd" -setup {
|
|
|
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
set fileInfo(type)
} -cleanup {
unset -nocomplain fileInfo
} -result directory
# Broken in Tcl 8.6 and earlier
tcltest::test xvfs-glob-advanced-dir-with-pattern "Xvfs Glob Match Pattern and Directory Together" -body {
llength [glob ${rootDir}/*]
} -constraints tcl87 -result 3
tcltest::test xvfs-glob-file-dirname "Xvfs Relies on file dirname" -body {
lindex [glob -directory [file dirname $testFile] *] 0
} -constraints tcl87 -match glob -result "$rootDir/*"
tcltest::test xvfs-cwd-1 "Xvfs Can Be cwd" -setup {
|