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
88b11064
Commit
88b11064
authored
Jan 15, 2003
by
Stefan Leichter
Committed by
Alexandre Julliard
Jan 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for GetPrinterDriverDirectoryA.
parent
8c1911f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
0 deletions
+121
-0
configure
configure
+0
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/winspool/Makefile.in
+2
-0
.cvsignore
dlls/winspool/tests/.cvsignore
+4
-0
Makefile.in
dlls/winspool/tests/Makefile.in
+13
-0
info.c
dlls/winspool/tests/info.c
+101
-0
No files found.
configure
View file @
88b11064
This diff is collapsed.
Click to expand it.
configure.ac
View file @
88b11064
...
...
@@ -1493,6 +1493,7 @@ dlls/winnls/Makefile
dlls/winsock/Makefile
dlls/winsock/tests/Makefile
dlls/winspool/Makefile
dlls/winspool/tests/Makefile
dlls/wintab32/Makefile
dlls/wintrust/Makefile
dlls/wow32/Makefile
...
...
dlls/winspool/Makefile.in
View file @
88b11064
...
...
@@ -13,6 +13,8 @@ C_SRCS = \
info.c
\
wspool.c
SUBDIRS
=
tests
@MAKE_DLL_RULES@
### Dependencies:
dlls/winspool/tests/.cvsignore
0 → 100644
View file @
88b11064
Makefile
info.ok
testlist.c
winspool.drv_test.exe.spec.c
dlls/winspool/tests/Makefile.in
0 → 100644
View file @
88b11064
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
winspool.drv
IMPORTS
=
winspool kernel32
CTESTS
=
\
info.c
@MAKE_TEST_RULES@
### Dependencies:
dlls/winspool/tests/info.c
0 → 100644
View file @
88b11064
/*
* Copyright (C) 2003 Stefan Leichter
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/test.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "winspool.h"
static
void
test_printer_directory
(
ivoid
)
{
LPBYTE
buffer
=
NULL
;
DWORD
cbBuf
,
pcbNeeded
;
BOOL
res
;
OSVERSIONINFOA
ver
;
ver
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFOA
);
if
(
!
GetVersionExA
(
&
ver
))
{
ok
(
0
,
"GetVersionExA failed!"
);
return
;
}
(
void
)
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
NULL
,
0
,
&
cbBuf
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbBuf
*
2
);
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
buffer
,
cbBuf
,
&
pcbNeeded
);
ok
(
res
,
"expected result != 0, got %d"
,
res
);
ok
(
cbBuf
==
pcbNeeded
,
"pcbNeeded set to %ld instead of %ld"
,
pcbNeeded
,
cbBuf
);
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
buffer
,
cbBuf
*
2
,
&
pcbNeeded
);
ok
(
res
,
"expected result != 0, got %d"
,
res
);
ok
(
cbBuf
==
pcbNeeded
,
"pcbNeeded set to %ld instead of %ld"
,
pcbNeeded
,
cbBuf
);
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
buffer
,
cbBuf
-
1
,
&
pcbNeeded
);
ok
(
!
res
,
"expected result == 0, got %d"
,
res
);
ok
(
cbBuf
==
pcbNeeded
,
"pcbNeeded set to %ld instead of %ld"
,
pcbNeeded
,
cbBuf
);
ok
(
ERROR_INSUFFICIENT_BUFFER
==
GetLastError
(),
"last error set to %ld instead of ERROR_INSUFFICIENT_BUFFER"
,
GetLastError
());
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
NULL
,
cbBuf
,
&
pcbNeeded
);
if
(
ver
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
)
{
ok
(
!
res
,
"expected result == 0, got %d"
,
res
);
ok
(
ERROR_INVALID_USER_BUFFER
==
GetLastError
(),
"last error set to %ld instead of ERROR_INVALID_USER_BUFFER"
,
GetLastError
());
}
else
{
ok
(
res
,
"expected result != 0, got %d"
,
res
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
(),
"last error set to %ld instead of ERROR_INVALID_PARAMETER"
,
GetLastError
());
}
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
buffer
,
cbBuf
,
NULL
);
if
(
ver
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
)
{
ok
(
!
res
,
"expected result == 0, got %d"
,
res
);
ok
(
RPC_X_NULL_REF_POINTER
==
GetLastError
(),
"last error set to %ld instead of RPC_X_NULL_REF_POINTER"
,
GetLastError
());
}
else
{
ok
(
res
,
"expected result != 0, got %d"
,
res
);
}
res
=
GetPrinterDriverDirectoryA
(
NULL
,
NULL
,
1
,
NULL
,
cbBuf
,
NULL
);
if
(
ver
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
)
{
ok
(
!
res
,
"expected result == 0, got %d"
,
res
);
ok
(
RPC_X_NULL_REF_POINTER
==
GetLastError
(),
"last error set to %ld instead of RPC_X_NULL_REF_POINTER"
,
GetLastError
());
}
else
{
ok
(
res
,
"expected result != 0, got %d"
,
res
);
ok
(
ERROR_INVALID_PARAMETER
==
GetLastError
(),
"last error set to %ld instead of ERROR_INVALID_PARAMETER"
,
GetLastError
());
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
START_TEST
(
info
)
{
test_printer_directory
();
}
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