reactos/rostests/apitests/localspl/testlist.c
Colin Finck f2a66788f8 [LOCALSPL_APITEST]
Write an API-Test for localspl.dll. As the original localspl.dll from Windows Server 2003 relies on proper initialization inside spoolsv.exe, we cannot test it standalone as usual.
To make testing possible anyway, this program basically does four things:

  - Injecting our testing code into spoolsv.exe.
  - Registering and running us as a service in the SYSTEM security context like spoolsv.exe, so that injection is possible at all.
  - Sending the test name and receiving the console output over named pipes.
  - Redirecting the received console output to stdout again, so it looks and feels like a standard API-Test.

Nevertheless, the testing code in fpEnumPrinters.c is still written like a usual test. The known ok(), skip(), etc. macros can be used as usual, their output is just redirected through the named pipes.
Thanks to Thomas for giving me the tip about injecting code into spoolsv! :)

svn path=/branches/colins-printing-for-freedom/; revision=68080
2015-06-08 17:15:44 +00:00

23 lines
513 B
C

/*
* PROJECT: ReactOS Local Spooler API Tests
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
* PURPOSE: Test list
* COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
*/
#define __ROS_LONG64__
#define STANDALONE
#include <apitest.h>
extern void func_fpEnumPrinters(void);
extern void func_service(void);
const struct test winetest_testlist[] =
{
{ "fpEnumPrinters", func_fpEnumPrinters },
{ "service", func_service },
{ 0, 0 }
};