You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
562 B
27 lines
562 B
6 years ago
|
' Test Pyhon.Dictionary using VBScript - this uses
|
||
|
' IDispatchEx, so is an interesting test.
|
||
|
|
||
|
set ob = CreateObject("Python.Dictionary")
|
||
|
ob("hello") = "there"
|
||
|
' Our keys are case insensitive.
|
||
|
ob.Item("hi") = ob("HELLO")
|
||
|
|
||
|
dim ok
|
||
|
ok = true
|
||
|
|
||
|
if ob("hello") <> "there" then
|
||
|
WScript.Echo "**** The dictionary value was wrong!!"
|
||
|
ok = false
|
||
|
end if
|
||
|
|
||
|
if ob("hi") <> "there" then
|
||
|
WScript.Echo "**** The other dictionary value was wrong!!"
|
||
|
ok = false
|
||
|
end if
|
||
|
|
||
|
if ok then
|
||
|
WScript.Echo "VBScript has successfully tested Python.Dictionary"
|
||
|
end if
|
||
|
|
||
|
|