jscript: Added tests.

This commit is contained in:
Jacek Caban 2008-03-24 21:53:14 +01:00 committed by Alexandre Julliard
parent 8d4aa7decf
commit 63ebe0191e
9 changed files with 90 additions and 0 deletions

4
.gitignore vendored
View File

@ -163,6 +163,9 @@ dlls/iphlpapi/tests/testlist.c
dlls/itss/tests/*.ok
dlls/itss/tests/itss_crosstest.exe
dlls/itss/tests/testlist.c
dlls/jscript/tests/*.ok
dlls/jscript/tests/jscript_crosstest.exe
dlls/jscript/tests/testlist.c
dlls/kernel32/libkernel32.def
dlls/kernel32/nls/winerr_deu.mc.rc
dlls/kernel32/nls/winerr_enu.mc.rc
@ -629,6 +632,7 @@ programs/winetest/inetcomm_test.exe
programs/winetest/infosoft_test.exe
programs/winetest/iphlpapi_test.exe
programs/winetest/itss_test.exe
programs/winetest/jscript_test.exe
programs/winetest/kernel32_test.exe
programs/winetest/localspl_test.exe
programs/winetest/localui_test.exe

View File

@ -300,6 +300,7 @@ ALL_MAKEFILES = \
dlls/itss/Makefile \
dlls/itss/tests/Makefile \
dlls/jscript/Makefile \
dlls/jscript/tests/Makefile \
dlls/kernel32/Makefile \
dlls/kernel32/tests/Makefile \
dlls/localspl/Makefile \
@ -722,6 +723,7 @@ dlls/itircl/Makefile: dlls/itircl/Makefile.in dlls/Makedll.rules
dlls/itss/Makefile: dlls/itss/Makefile.in dlls/Makedll.rules
dlls/itss/tests/Makefile: dlls/itss/tests/Makefile.in dlls/Maketest.rules
dlls/jscript/Makefile: dlls/jscript/Makefile.in dlls/Makedll.rules
dlls/jscript/tests/Makefile: dlls/jscript/tests/Makefile.in dlls/Maketest.rules
dlls/kernel32/Makefile: dlls/kernel32/Makefile.in dlls/Makedll.rules
dlls/kernel32/tests/Makefile: dlls/kernel32/tests/Makefile.in dlls/Maketest.rules
dlls/localspl/Makefile: dlls/localspl/Makefile.in dlls/Makedll.rules

3
configure vendored
View File

@ -21548,6 +21548,8 @@ ac_config_files="$ac_config_files dlls/itss/tests/Makefile"
ac_config_files="$ac_config_files dlls/jscript/Makefile"
ac_config_files="$ac_config_files dlls/jscript/tests/Makefile"
ac_config_files="$ac_config_files dlls/kernel32/Makefile"
ac_config_files="$ac_config_files dlls/kernel32/tests/Makefile"
@ -22794,6 +22796,7 @@ do
"dlls/itss/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/itss/Makefile" ;;
"dlls/itss/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/itss/tests/Makefile" ;;
"dlls/jscript/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/jscript/Makefile" ;;
"dlls/jscript/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/jscript/tests/Makefile" ;;
"dlls/kernel32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/Makefile" ;;
"dlls/kernel32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/tests/Makefile" ;;
"dlls/localspl/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/localspl/Makefile" ;;

View File

@ -1803,6 +1803,7 @@ AC_CONFIG_FILES([dlls/itircl/Makefile])
AC_CONFIG_FILES([dlls/itss/Makefile])
AC_CONFIG_FILES([dlls/itss/tests/Makefile])
AC_CONFIG_FILES([dlls/jscript/Makefile])
AC_CONFIG_FILES([dlls/jscript/tests/Makefile])
AC_CONFIG_FILES([dlls/kernel32/Makefile])
AC_CONFIG_FILES([dlls/kernel32/tests/Makefile])
AC_CONFIG_FILES([dlls/localspl/Makefile])

View File

@ -311,6 +311,7 @@ TESTSUBDIRS = \
infosoft/tests \
iphlpapi/tests \
itss/tests \
jscript/tests \
kernel32/tests \
localspl/tests \
localui/tests \

View File

@ -0,0 +1,13 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = jscript.dll
IMPORTS = ole32 kernel32
CTESTS = \
jscript.c
@MAKE_TEST_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend

View File

@ -0,0 +1,62 @@
/*
* Copyright 2008 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <initguid.h>
#include <ole2.h>
#include <activscp.h>
#include "wine/test.h"
static const CLSID CLSID_JScript =
{0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
static void test_jscript(void)
{
IActiveScriptParse *parse;
IActiveScript *script;
IUnknown *unk;
HRESULT hres;
hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IUnknown, (void**)&unk);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
if(FAILED(hres))
return;
hres = IUnknown_QueryInterface(unk, &IID_IActiveScript, (void**)&script);
ok(hres == S_OK, "Could not get IActiveScript: %08x\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse);
ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
IActiveScriptParse_Release(parse);
IActiveScript_Release(script);
IUnknown_Release(unk);
}
START_TEST(jscript)
{
CoInitialize(NULL);
test_jscript();
CoUninitialize();
}

View File

@ -48,6 +48,7 @@ TESTBINS = \
infosoft_test.exe \
iphlpapi_test.exe \
itss_test.exe \
jscript_test.exe \
kernel32_test.exe \
localspl_test.exe \
localui_test.exe \
@ -155,6 +156,8 @@ iphlpapi_test.exe: $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT)
cp $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
itss_test.exe: $(DLLDIR)/itss/tests/itss_test.exe$(DLLEXT)
cp $(DLLDIR)/itss/tests/itss_test.exe$(DLLEXT) $@ && $(STRIP) $@
jscript_test.exe: $(DLLDIR)/jscript/tests/jscript_test.exe$(DLLEXT)
cp $(DLLDIR)/jscript/tests/jscript_test.exe$(DLLEXT) $@ && $(STRIP) $@
kernel32_test.exe: $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT)
cp $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) $@
localspl_test.exe: $(DLLDIR)/localspl/tests/localspl_test.exe$(DLLEXT)

View File

@ -106,6 +106,7 @@ inetcomm_test.exe TESTRES "inetcomm_test.exe"
infosoft_test.exe TESTRES "infosoft_test.exe"
iphlpapi_test.exe TESTRES "iphlpapi_test.exe"
itss_test.exe TESTRES "itss_test.exe"
jscript_test.exe TESTRES "jscript_test.exe"
kernel32_test.exe TESTRES "kernel32_test.exe"
localspl_test.exe TESTRES "localspl_test.exe"
localui_test.exe TESTRES "localui_test.exe"