-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,997 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
if {"::tcltest" ni [namespace children]} { | ||
package require tcltest 2.5 | ||
namespace import -force ::tcltest::* | ||
} | ||
|
||
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] | ||
testConstraint memorymodule [expr {0 != [tcl::build-info memorymodule]}] | ||
testConstraint memorymoduletest [expr {0 == [catch {zipfs mount dltest/memorymoduletest.zip [file join [zipfs root] memorymoduletest]}]}] | ||
|
||
lappend auto_path [file join [zipfs root] memorymoduletest] | ||
|
||
test memorymodule-1.0 {info loaded} memorymoduletest { | ||
package require memorymoduletest | ||
info loaded {} Memorymoduletest | ||
} [file join [zipfs root] memorymoduletest/tcl9memorymoduletest.dll] | ||
|
||
test memorymodule-1.1 {GetModuleFileNameA (WIP)} {memorymoduletest memorymodule} { | ||
package require memorymoduletest | ||
GetModuleFileNameA | ||
} //zipfs:/memorymoduletest/tcl9memorymoduletest.dll | ||
|
||
test memorymodule-1.2 {GetModuleFileNameW (WIP)} {memorymoduletest memorymodule} { | ||
package require memorymoduletest | ||
GetModuleFileNameW | ||
} //zipfs:/memorymoduletest/tcl9memorymoduletest.dll | ||
|
||
test memorymodule-2.0 {LTS} -constraints {memorymoduletest thread} -body { | ||
package require Thread | ||
package require memorymoduletest | ||
set t1 [thread::create] | ||
ThreadVar 15; # Set ThreadVar to 15 in the main thread | ||
thread::preserve $t1 | ||
thread::send $t1 { | ||
lappend auto_path [file join [zipfs root] memorymoduletest] | ||
package require memorymoduletest | ||
# set ThreadVar to 16 in the subthread | ||
ThreadVar 16 | ||
return [ThreadVar] | ||
} result | ||
thread::release $t1 | ||
# ThreadVar in main thread should be unchanged (15) | ||
list [ThreadVar] $result | ||
} -result {15 16} | ||
|
||
|
||
# cleanup | ||
::tcltest::cleanupTests | ||
return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.