Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53865998
ServersLog.test
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
764 B
Referenced Files
None
Subscribers
None
ServersLog.test
View Options
package require tcltest
namespace import ::tcltest::*
###
### Init
###
# Tested code
source init.tcl
source $dir/Wearg/ServersLog.tcl
###
### Mocks
###
proc registry {command key {value ""}} {
if {$command == "get" && $key == "serverslog.knowncomponents"} {
return "Alpha Beta"
}
error "Unexpected registry call: $command $key $value"
}
###
### Tests
###
test is_known_component_when_known {} -body {
is_known_component Alpha
} -result 1
test is_known_component_when_known_parent {} -body {
is_known_component Beta/Delta
} -result 1
test is_known_component_with_trailing_slash {} -body {
is_known_component Beta/
} -result 0
test is_known_component_when_unknown {} -body {
is_known_component Gamma
} -result 0
###
### Cleanup
###
cleanupTests
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 14, 21:04 (11 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4177715
Default Alt Text
ServersLog.test (764 B)
Attached To
Mode
rVIPER ViperServ scripts
Attached
Detach File
Event Timeline
Log In to Comment