Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a114483e
Commit
a114483e
authored
Jun 21, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntprint/tests: Add initial test.
parent
f7bd46a4
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
0 deletions
+157
-0
.gitignore
.gitignore
+4
-0
Makefile.in
Makefile.in
+2
-0
configure
configure
+3
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/Makefile.in
+1
-0
Makefile.in
dlls/ntprint/tests/Makefile.in
+13
-0
ntprint.c
dlls/ntprint/tests/ntprint.c
+129
-0
Makefile.in
programs/winetest/Makefile.in
+3
-0
winetest.rc
programs/winetest/winetest.rc
+1
-0
No files found.
.gitignore
View file @
a114483e
...
...
@@ -384,6 +384,9 @@ dlls/ntdll/version.res
dlls/ntdsapi/libntdsapi.def
dlls/ntoskrnl.exe/libntoskrnl.exe.def
dlls/ntprint/ntprint.res
dlls/ntprint/tests/*.ok
dlls/ntprint/tests/ntprint_crosstest.exe
dlls/ntprint/tests/testlist.c
dlls/objsel/objsel.res
dlls/odbc32/libodbc32.def
dlls/odbccp32/libodbccp32.def
...
...
@@ -874,6 +877,7 @@ programs/winetest/msvcrtd_test.exe
programs/winetest/msxml3_test.exe
programs/winetest/netapi32_test.exe
programs/winetest/ntdll_test.exe
programs/winetest/ntprint_test.exe
programs/winetest/odbccp32_test.exe
programs/winetest/ole32_test.exe
programs/winetest/oleaut32_test.exe
...
...
Makefile.in
View file @
a114483e
...
...
@@ -315,6 +315,7 @@ ALL_MAKEFILES = \
dlls/ntdsapi/Makefile
\
dlls/ntoskrnl.exe/Makefile
\
dlls/ntprint/Makefile
\
dlls/ntprint/tests/Makefile
\
dlls/objsel/Makefile
\
dlls/odbc32/Makefile
\
dlls/odbccp32/Makefile
\
...
...
@@ -671,6 +672,7 @@ dlls/ntdll/tests/Makefile: dlls/ntdll/tests/Makefile.in dlls/Maketest.rules
dlls/ntdsapi/Makefile
:
dlls/ntdsapi/Makefile.in dlls/Makedll.rules
dlls/ntoskrnl.exe/Makefile
:
dlls/ntoskrnl.exe/Makefile.in dlls/Makedll.rules
dlls/ntprint/Makefile
:
dlls/ntprint/Makefile.in dlls/Makedll.rules
dlls/ntprint/tests/Makefile
:
dlls/ntprint/tests/Makefile.in dlls/Maketest.rules
dlls/objsel/Makefile
:
dlls/objsel/Makefile.in dlls/Makedll.rules
dlls/odbc32/Makefile
:
dlls/odbc32/Makefile.in dlls/Makedll.rules
dlls/odbccp32/Makefile
:
dlls/odbccp32/Makefile.in dlls/Makedll.rules
...
...
configure
View file @
a114483e
...
...
@@ -20700,6 +20700,8 @@ ac_config_files="$ac_config_files dlls/ntoskrnl.exe/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/ntprint/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/ntprint/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/objsel/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/odbc32/Makefile"
...
...
@@ -21791,6 +21793,7 @@ do
"dlls/ntdsapi/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/ntdsapi/Makefile" ;;
"dlls/ntoskrnl.exe/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/ntoskrnl.exe/Makefile" ;;
"dlls/ntprint/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/ntprint/Makefile" ;;
"dlls/ntprint/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/ntprint/tests/Makefile" ;;
"dlls/objsel/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/objsel/Makefile" ;;
"dlls/odbc32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/odbc32/Makefile" ;;
"dlls/odbccp32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/odbccp32/Makefile" ;;
...
...
configure.ac
View file @
a114483e
...
...
@@ -1602,6 +1602,7 @@ AC_CONFIG_FILES([dlls/ntdll/tests/Makefile])
AC_CONFIG_FILES([dlls/ntdsapi/Makefile])
AC_CONFIG_FILES([dlls/ntoskrnl.exe/Makefile])
AC_CONFIG_FILES([dlls/ntprint/Makefile])
AC_CONFIG_FILES([dlls/ntprint/tests/Makefile])
AC_CONFIG_FILES([dlls/objsel/Makefile])
AC_CONFIG_FILES([dlls/odbc32/Makefile])
AC_CONFIG_FILES([dlls/odbccp32/Makefile])
...
...
dlls/Makefile.in
View file @
a114483e
...
...
@@ -269,6 +269,7 @@ TESTSUBDIRS = \
msxml3/tests
\
netapi32/tests
\
ntdll/tests
\
ntprint/tests
\
odbccp32/tests
\
ole32/tests
\
oleaut32/tests
\
...
...
dlls/ntprint/tests/Makefile.in
0 → 100644
View file @
a114483e
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
ntprint.dll
IMPORTS
=
kernel32
CTESTS
=
\
ntprint.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/ntprint/tests/ntprint.c
0 → 100644
View file @
a114483e
/*
* Unit test suite for the Spooler Setup API (Printing)
*
* Copyright 2007 Detlef Riekenberg
*
* 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 <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "wine/test.h"
/* ##### */
static
HMODULE
hdll
;
static
HANDLE
(
WINAPI
*
pPSetupCreateMonitorInfo
)(
LPVOID
,
LPVOID
,
LPVOID
);
static
VOID
(
WINAPI
*
pPSetupDestroyMonitorInfo
)(
HANDLE
);
/* ########################### */
static
LPCSTR
load_functions
(
void
)
{
LPCSTR
ptr
;
ptr
=
"ntprint.dll"
;
hdll
=
LoadLibraryA
(
ptr
);
if
(
!
hdll
)
return
ptr
;
ptr
=
"PSetupCreateMonitorInfo"
;
pPSetupCreateMonitorInfo
=
(
VOID
*
)
GetProcAddress
(
hdll
,
ptr
);
if
(
!
pPSetupCreateMonitorInfo
)
return
ptr
;
ptr
=
"PSetupDestroyMonitorInfo"
;
pPSetupDestroyMonitorInfo
=
(
VOID
*
)
GetProcAddress
(
hdll
,
ptr
);
if
(
!
pPSetupDestroyMonitorInfo
)
return
ptr
;
return
NULL
;
}
/* ########################### */
static
void
test_PSetupCreateMonitorInfo
(
VOID
)
{
HANDLE
mi
;
BYTE
buffer
[
1024
]
;
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
NULL
,
NULL
,
NULL
);
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
mi
)
pPSetupDestroyMonitorInfo
(
mi
);
memset
(
buffer
,
0
,
sizeof
(
buffer
));
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
buffer
,
NULL
,
NULL
);
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
mi
)
pPSetupDestroyMonitorInfo
(
mi
);
}
/* ########################### */
static
void
test_PSetupDestroyMonitorInfo
(
VOID
)
{
HANDLE
mi
;
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
NULL
);
/* lasterror is returned */
trace
(
"returned with %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
NULL
,
NULL
,
NULL
);
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
!
mi
)
return
;
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
mi
);
/* lasterror is returned */
trace
(
"returned with %u
\n
"
,
GetLastError
());
/* Try to destroy the handle twice crash with native ntprint.dll */
if
(
0
)
{
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
mi
);
trace
(
" with %u
\n
"
,
GetLastError
());
}
}
/* ########################### */
START_TEST
(
ntprint
)
{
LPCSTR
ptr
;
/* ntprint.dll does not exist on win9x */
ptr
=
load_functions
();
if
(
ptr
)
{
skip
(
"%s not found
\n
"
,
ptr
);
return
;
}
test_PSetupCreateMonitorInfo
();
test_PSetupDestroyMonitorInfo
();
}
programs/winetest/Makefile.in
View file @
a114483e
...
...
@@ -60,6 +60,7 @@ TESTBINS = \
msxml3_test.exe
\
netapi32_test.exe
\
ntdll_test.exe
\
ntprint_test.exe
\
odbccp32_test.exe
\
ole32_test.exe
\
oleaut32_test.exe
\
...
...
@@ -162,6 +163,8 @@ netapi32_test.exe: $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT)
cp
$(DLLDIR)
/netapi32/tests/netapi32_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
ntdll_test.exe
:
$(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT)
cp
$(DLLDIR)
/ntdll/tests/ntdll_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
ntprint_test.exe
:
$(DLLDIR)/ntprint/tests/ntprint_test.exe$(DLLEXT)
cp
$(DLLDIR)
/ntprint/tests/ntprint_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
odbccp32_test.exe
:
$(DLLDIR)/odbccp32/tests/odbccp32_test.exe$(DLLEXT)
cp
$(DLLDIR)
/odbccp32/tests/odbccp32_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
ole32_test.exe
:
$(DLLDIR)/ole32/tests/ole32_test.exe$(DLLEXT)
...
...
programs/winetest/winetest.rc
View file @
a114483e
...
...
@@ -183,6 +183,7 @@ msvcrtd_test.exe TESTRES "msvcrtd_test.exe"
msxml3_test.exe TESTRES "msxml3_test.exe"
netapi32_test.exe TESTRES "netapi32_test.exe"
ntdll_test.exe TESTRES "ntdll_test.exe"
ntprint_test.exe TESTRES "ntprint_test.exe"
odbccp32_test.exe TESTRES "odbccp32_test.exe"
ole32_test.exe TESTRES "ole32_test.exe"
oleaut32_test.exe TESTRES "oleaut32_test.exe"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment