commit 1bb49dc70c42702a2f41c566e008c2ad3d120acc Author: Jacek Caban Date: Sat Dec 26 19:49:00 2009 +0100 cmd.exe: Added test framework. diff --git a/programs/cmd/tests/Makefile.in b/programs/cmd/tests/Makefile.in new file mode 100644 index 0000000..b96d8f8 --- /dev/null +++ b/programs/cmd/tests/Makefile.in @@ -0,0 +1,15 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = cmd.exe +IMPORTS = kernel32 + +CTESTS = \ + cmd.c + +RC_SRCS = rsrc.rc + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/programs/cmd/tests/cmd.c b/programs/cmd/tests/cmd.c new file mode 100644 index 0000000..ec47122 --- /dev/null +++ b/programs/cmd/tests/cmd.c @@ -0,0 +1,142 @@ +/* + * Copyright 2009 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 + */ + +#include + +#include "wine/test.h" + +static const char *success_tests[] = {"test_echo"}; +static const char *todo_tests[] = {}; + +static const char *load_res(const char *res_name, DWORD *size) +{ + const char *res; + HRSRC src; + + src = FindResourceA(NULL, res_name, (LPCSTR)40); + ok(src != NULL, "Could not find resource %s\n", res_name); + if(!src) + return NULL; + + res = LoadResource(NULL, src); + *size = strstr(res, " \ No newline at end of file diff --git a/programs/cmd/tests/test_echo.out b/programs/cmd/tests/test_echo.out new file mode 100644 index 0000000..93fdd83 --- /dev/null +++ b/programs/cmd/tests/test_echo.out @@ -0,0 +1,2 @@ +test + \ No newline at end of file