Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e7425a5b
Commit
e7425a5b
authored
May 31, 2005
by
Stefan Leichter
Committed by
Alexandre Julliard
May 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test GetFileVersionInfoSizeA with executables.
parent
1c196c59
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
.cvsignore
dlls/version/tests/.cvsignore
+1
-0
Makefile.in
dlls/version/tests/Makefile.in
+2
-0
info.c
dlls/version/tests/info.c
+41
-0
version.rc
dlls/version/tests/version.rc
+28
-0
No files found.
dlls/version/tests/.cvsignore
View file @
e7425a5b
Makefile
info.ok
testlist.c
version.res
dlls/version/tests/Makefile.in
View file @
e7425a5b
...
...
@@ -8,6 +8,8 @@ IMPORTS = version
CTESTS
=
\
info.c
RC_SRCS
=
version.rc
@MAKE_TEST_RULES@
### Dependencies:
dlls/version/tests/info.c
View file @
e7425a5b
...
...
@@ -45,6 +45,7 @@
static
void
test_info_size
(
void
)
{
DWORD
hdl
,
retval
;
char
mypath
[
MAX_PATH
]
=
""
;
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
NULL
,
NULL
);
...
...
@@ -111,6 +112,46 @@ static void test_info_size(void)
(
MY_LAST_ERROR
==
GetLastError
()),
"Last error wrong! ERROR_FILE_NOT_FOUND/ERROR_RESOURCE_DATA_NOT_FOUND "
"(XP)/0x%08lx (NT4) expected, got 0x%08lx
\n
"
,
MY_LAST_ERROR
,
GetLastError
());
/* test a currently loaded executable */
if
(
GetModuleFileNameA
(
NULL
,
mypath
,
MAX_PATH
))
{
hdl
=
0x55555555
;
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
mypath
,
&
hdl
);
ok
(
retval
,
"GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
((
NO_ERROR
==
GetLastError
())
||
(
MY_LAST_ERROR
==
GetLastError
()),
"Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got 0x%08lx
\n
"
,
MY_LAST_ERROR
,
GetLastError
());
ok
(
hdl
==
0L
,
"Handle wrong! 0L expected, got 0x%08lx
\n
"
,
hdl
);
}
else
trace
(
"skipping GetModuleFileNameA(NULL,..) failed
\n
"
);
/* test a not loaded executable */
if
(
GetSystemDirectoryA
(
mypath
,
MAX_PATH
))
{
lstrcatA
(
mypath
,
"
\\
regsvr32.exe"
);
if
(
INVALID_FILE_ATTRIBUTES
==
GetFileAttributesA
(
mypath
))
trace
(
"GetFileAttributesA(%s) failed
\n
"
,
mypath
);
else
{
hdl
=
0x55555555
;
SetLastError
(
MY_LAST_ERROR
);
retval
=
GetFileVersionInfoSizeA
(
mypath
,
&
hdl
);
ok
(
retval
,
"GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx
\n
"
,
retval
);
ok
((
NO_ERROR
==
GetLastError
())
||
(
MY_LAST_ERROR
==
GetLastError
()),
"Last error wrong! NO_ERROR/0x%08lx (NT4) expected, got 0x%08lx
\n
"
,
MY_LAST_ERROR
,
GetLastError
());
ok
(
hdl
==
0L
,
"Handle wrong! 0L expected, got 0x%08lx
\n
"
,
hdl
);
}
}
else
trace
(
"skipping GetModuleFileNameA(NULL,..) failed
\n
"
);
}
static
void
VersionDwordLong2String
(
DWORDLONG
Version
,
LPSTR
lpszVerString
)
...
...
dlls/version/tests/version.rc
0 → 100644
View file @
e7425a5b
/*
* Copyright (c) 2005 Mike McCormack
*
* 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
*/
#define WINE_FILEDESCRIPTION_STR "Wine version test"
#define WINE_FILENAME_STR "version_test.exe"
#define WINE_FILETYPE VFT_APP
#define WINE_FILEVERSION 1,0,0,0
#define WINE_FILEVERSION_STR "1.0.0.0"
#define WINE_PRODUCTVERSION 1,0,0,0
#define WINE_PRODUCTVERSION_STR "1.0.0.0"
#define WINE_PRODUCTNAME_STR "Wine version test"
#include "wine/wine_common_ver.rc"
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