Author: akhaldi
Date: Sat Sep 28 15:13:32 2013
New Revision: 60421
URL:
http://svn.reactos.org/svn/reactos?rev=60421&view=rev
Log:
[VBSCRIPT_WINETEST]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/rostests/winetests/vbscript/CMakeLists.txt
trunk/rostests/winetests/vbscript/api.vbs
trunk/rostests/winetests/vbscript/vbscript.c
Modified: trunk/rostests/winetests/vbscript/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/CMakeL…
==============================================================================
--- trunk/rostests/winetests/vbscript/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/vbscript/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:13:32
2013
@@ -1,13 +1,11 @@
-add_definitions(-D__ROS_LONG64__)
add_idl_headers(vbscript_wine_test_idlheader vbsregexp55.idl)
list(APPEND SOURCE
createobj.c
run.c
vbscript.c
- testlist.c
- rsrc.rc)
+ testlist.c)
list(APPEND vbscript_winetest_rc_deps
${CMAKE_CURRENT_SOURCE_DIR}/api.vbs
@@ -15,10 +13,8 @@
${CMAKE_CURRENT_SOURCE_DIR}/regexp.vbs)
set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS
"${vbscript_winetest_rc_deps}")
-
-add_executable(vbscript_winetest ${SOURCE})
-target_link_libraries(vbscript_winetest wine)
+add_executable(vbscript_winetest ${SOURCE} rsrc.rc)
set_module_type(vbscript_winetest win32cui)
-add_importlibs(vbscript_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(vbscript_winetest ole32 oleaut32 advapi32 msvcrt kernel32)
add_dependencies(vbscript_winetest vbscript_wine_test_idlheader)
add_cd_file(TARGET vbscript_winetest DESTINATION reactos/bin FOR all)
Modified: trunk/rostests/winetests/vbscript/api.vbs
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/api.vb…
==============================================================================
--- trunk/rostests/winetests/vbscript/api.vbs [iso-8859-1] (original)
+++ trunk/rostests/winetests/vbscript/api.vbs [iso-8859-1] Sat Sep 28 15:13:32 2013
@@ -134,6 +134,8 @@
Call ok(getVT(Chr(255)) = "VT_BSTR", "getVT(Chr(255)) = " &
getVT(Chr(255)))
Call ok(Chr(120) = "x", "Chr(120) = " & Chr(120))
Call ok(Chr(0) <> "", "Chr(0) = """"")
+Call ok(Chr(120.5) = "x", "Chr(120.5) = " & Chr(120.5))
+Call ok(Chr(119.5) = "x", "Chr(119.5) = " & Chr(119.5))
Call ok(isObject(new EmptyClass), "isObject(new EmptyClass) is not true?")
Set x = new EmptyClass
@@ -292,6 +294,9 @@
Call ok(Space(5.2) = " ", "Space(5.2) = " & Space(5.2) &
"""")
Call ok(Space(5.8) = " ", "Space(5.8) = " & Space(5.8) &
"""")
Call ok(Space(5.5) = " ", "Space(5.5) = " & Space(5.5) &
"""")
+Call ok(Space(4.5) = " ", "Space(4.5) = " & Space(4.5) &
"""")
+Call ok(Space(0.5) = "", "Space(0.5) = " & Space(0.5) &
"""")
+Call ok(Space(1.5) = " ", "Space(1.5) = " & Space(1.5) &
"""")
Sub TestStrReverse(str, ex)
Call ok(StrReverse(str) = ex, "StrReverse(" & str & ") =
" & StrReverse(str))
@@ -310,6 +315,8 @@
TestLeft "test", 5, "test"
TestLeft "test", 0, ""
TestLeft 123, 2, "12"
+TestLeft "123456", 1.5, "12"
+TestLeft "123456", 2.5, "12"
if isEnglishLang then TestLeft true, 2, "Tr"
Sub TestRight(str, len, ex)
@@ -383,6 +390,8 @@
Call ok(WeekDayName(1, 10) = "Sun", "WeekDayName(1, 10) = " &
WeekDayName(1, 10))
Call ok(WeekDayName(1, true, 0) = "Sun", "WeekDayName(1, true, 0) =
" & WeekDayName(1, true, 0))
Call ok(WeekDayName(1, true, 2) = "Mon", "WeekDayName(1, true, 2) =
" & WeekDayName(1, true, 2))
+ Call ok(WeekDayName(1, true, 2.5) = "Mon", "WeekDayName(1, true, 2.5)
= " & WeekDayName(1, true, 2.5))
+ Call ok(WeekDayName(1, true, 1.5) = "Mon", "WeekDayName(1, true, 1.5)
= " & WeekDayName(1, true, 1.5))
Call ok(WeekDayName(1, true, 7) = "Sat", "WeekDayName(1, true, 7) =
" & WeekDayName(1, true, 7))
Call ok(WeekDayName(1, true, 7.1) = "Sat", "WeekDayName(1, true, 7.1)
= " & WeekDayName(1, true, 7.1))
@@ -424,4 +433,35 @@
Call ok(vbNo = 7, "vbNo = " & vbNo)
Call ok(getVT(vbNo) = "VT_I2", "getVT(vbNo) = " & getVT(vbNo))
+Call ok(CInt(-36.75) = -37, "CInt(-36.75) = " & CInt(-36.75))
+Call ok(getVT(CInt(-36.75)) = "VT_I2", "getVT(CInt(-36.75)) = " &
getVT(CInt(-36.75)))
+Call ok(CInt(-36.50) = -36, "CInt(-36.50) = " & CInt(-36.50))
+Call ok(getVT(CInt(-36.50)) = "VT_I2", "getVT(CInt(-36.50)) = " &
getVT(CInt(-36.50)))
+Call ok(CInt(-36.25) = -36, "CInt(-36.25) = " & CInt(-36.25))
+Call ok(getVT(CInt(-36.25)) = "VT_I2", "getVT(CInt(-36.25)) = " &
getVT(CInt(-36.25)))
+Call ok(CInt(-36) = -36, "CInt(-36) = " & CInt(-36))
+Call ok(getVT(CInt(-36)) = "VT_I2", "getVT(CInt(-36)) = " &
getVT(CInt(-36)))
+Call ok(CInt(0) = 0, "CInt(0) = " & CInt(0))
+Call ok(getVT(CInt(0)) = "VT_I2", "getVT(CInt(0)) = " &
getVT(CInt(0)))
+Call ok(CInt(0.0) = 0, "CInt(0.0) = " & CInt(0))
+Call ok(getVT(CInt(0.0)) = "VT_I2", "getVT(CInt(0.0)) = " &
getVT(CInt(0.0)))
+Call ok(CInt(0.5) = 0, "CInt(0.5) = " & CInt(0))
+Call ok(getVT(CInt(0.5)) = "VT_I2", "getVT(CInt(0.5)) = " &
getVT(CInt(0.5)))
+Call ok(CInt(36) = 36, "CInt(36) = " & CInt(36))
+Call ok(getVT(CInt(36)) = "VT_I2", "getVT(CInt(36)) = " &
getVT(CInt(36)))
+Call ok(CInt(36.25) = 36, "CInt(36.25) = " & CInt(36.25))
+Call ok(getVT(CInt(36.25)) = "VT_I2", "getVT(CInt(36.25)) = " &
getVT(CInt(36.25)))
+Call ok(CInt(36.50) = 36, "CInt(36.50) = " & CInt(36.50))
+Call ok(getVT(CInt(36.50)) = "VT_I2", "getVT(CInt(36.50)) = " &
getVT(CInt(36.50)))
+Call ok(CInt(36.75) = 37, "CInt(36.75) = " & CInt(36.75))
+Call ok(getVT(CInt(36.75)) = "VT_I2", "getVT(CInt(36.75)) = " &
getVT(CInt(36.75)))
+
+
+Call ok(CBool(5) = true, "CBool(5) = " & CBool(5))
+Call ok(getVT(CBool(5)) = "VT_BOOL", "getVT(CBool(5)) = " &
getVT(CBool(5)))
+Call ok(CBool(0) = false, "CBool(0) = " & CBool(0))
+Call ok(getVT(CBool(0)) = "VT_BOOL", "getVT(CBool(0)) = " &
getVT(CBool(0)))
+Call ok(CBool(-5) = true, "CBool(-5) = " & CBool(-5))
+Call ok(getVT(CBool(-5)) = "VT_BOOL", "getVT(CBool(-5)) = " &
getVT(CBool(-5)))
+
Call reportSuccess()
Modified: trunk/rostests/winetests/vbscript/vbscript.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/vbscri…
==============================================================================
--- trunk/rostests/winetests/vbscript/vbscript.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/vbscript/vbscript.c [iso-8859-1] Sat Sep 28 15:13:32 2013
@@ -861,6 +861,10 @@
ok(hres == S_OK, "QueryInterface(IID_IMatchCollection2) returned %x\n",
hres);
IDispatch_Release(disp);
+ hres = IMatchCollection2_QueryInterface(mc, &IID_IMatchCollection,
(void**)&unk);
+ ok(hres == S_OK, "QueryInterface(IID_IMatchCollection) returned %x\n",
hres);
+ IUnknown_Release(unk);
+
hres = IMatchCollection2_get_Count(mc, NULL);
ok(hres == E_POINTER, "get_Count returned %x, expected E_POINTER\n",
hres);
@@ -879,6 +883,10 @@
hres = IDispatch_QueryInterface(disp, &IID_IMatch2, (void**)&match);
ok(hres == S_OK, "QueryInterface(IID_IMatch2) returned %x\n", hres);
IDispatch_Release(disp);
+
+ hres = IMatch2_QueryInterface(match, &IID_IMatch, (void**)&unk);
+ ok(hres == S_OK, "QueryInterface(IID_IMatch) returned %x\n", hres);
+ IUnknown_Release(unk);
hres = IMatch2_get_Value(match, NULL);
ok(hres == E_POINTER, "get_Value returned %x, expected E_POINTER\n",
hres);