14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package require tcltest 2.5
namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testtranslatefilename [llength [info commands testtranslatefilename]]
testConstraint linkDirectory 1
testConstraint symbolicLinkFile 1
if {[testConstraint win]} {
if {$::tcl_platform(osVersion) < 5.0 \
|
>
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package require tcltest 2.5
namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]
source [file join [file dirname [info script]] tcltests.tcl]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testtranslatefilename [llength [info commands testtranslatefilename]]
testConstraint linkDirectory 1
testConstraint symbolicLinkFile 1
if {[testConstraint win]} {
if {$::tcl_platform(osVersion) < 5.0 \
|
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
|
glob -nocomplain -directory ~ -join * fileName-20.10
} -cleanup {
cd $savewd
removeDirectory isolate
removeFile fileName-20.10 $s
removeDirectory sub ~
} -result ~/sub/fileName-20.10
# cleanup
catch {file delete -force C:/globTest}
cd [temporaryDirectory]
file delete -force globTest
cd $oldpwd
catch {removeDirectory tcl[pid]}
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
|
glob -nocomplain -directory ~ -join * fileName-20.10
} -cleanup {
cd $savewd
removeDirectory isolate
removeFile fileName-20.10 $s
removeDirectory sub ~
} -result ~/sub/fileName-20.10
apply [list {} {
test fileName-6d4e9d1af5bf5b7d {
memory leak in SetFsPathFromAny
Runs under both a TCL_DEBUG_MEM build and a -DPURIFY build for
valgrind, which is useful since Valgrind provides information about the
error location, but [memory] doesn't.
} -setup {
makeFile {puts "In script"} script
if {[namespace which ::memory] eq {}} {
set memcheckcmd [list ::apply [list script {
uplevel 1 $script
return 0
} [namespace current]]]
} else {
set memcheckcmd ::tcltests::scriptmemcheck
}
} -body {
{*}$memcheckcmd {
set interp [interp create]
interp eval $interp {
apply [list {} {
upvar 1 f f
# A unique name so that no internal representation of this
# literal value has been picked up from any other script
# that has alredy been sourced into this interpreter.
set variableUniqueInTheEntireTclCodebase a
set name variableUniqueInTheEntireTclCodebase
# give the Tcl_Obj for "var1" an internal representation of
# type 'localVarNameType'.
set $name
set f [open variableUniqueInTheEntireTclCodebase w]
try {
puts $f {some data}
} finally {
close $f
}
set f [open variableUniqueInTheEntireTclCodebase]
try {
read $f
} finally {
catch {file delete variableUniqueInTheEntireTclCodebase}
close $f
}
} [namespace current]]
}
interp delete $interp
}
} -result 0
} [namespace current]]
# cleanup
catch {file delete -force C:/globTest}
cd [temporaryDirectory]
file delete -force globTest
cd $oldpwd
catch {removeDirectory tcl[pid]}
|