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
19b55e89
Commit
19b55e89
authored
Nov 30, 2005
by
Stefan Leichter
Committed by
Alexandre Julliard
Nov 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix version tests on windows 9x/ME.
parent
03aea8c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
6 deletions
+48
-6
install.c
dlls/version/tests/install.c
+48
-6
No files found.
dlls/version/tests/install.c
View file @
19b55e89
...
...
@@ -43,11 +43,22 @@ static void test_find_file(void)
memset
(
curdir
,
0
,
MAX_PATH
);
memset
(
outBuf
,
0
,
MAX_PATH
);
ret
=
VerFindFileA
(
0
,
"regedit"
,
""
,
""
,
curdir
,
&
dwCur
,
outBuf
,
&
dwOut
);
ok
(
!
ret
,
"Wrong return value got %lx expected 0
\n
"
,
ret
);
switch
(
ret
)
{
case
0L
:
ok
(
dwCur
==
1
,
"Wrong length of buffer for current location: "
"got %d(%s) expected 1
\n
"
,
dwCur
,
curdir
);
ok
(
dwOut
==
1
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected 1
\n
"
,
dwOut
,
outBuf
);
break
;
case
VFF_BUFFTOOSMALL
:
ok
(
dwCur
==
MAX_PATH
,
"Wrong length of buffer for current location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwCur
,
curdir
);
ok
(
dwOut
==
MAX_PATH
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
ok
(
0
,
"Got unexpected return value %lx
\n
"
,
ret
);
}
if
(
!
GetWindowsDirectoryA
(
windir
,
MAX_PATH
))
trace
(
"GetWindowsDirectoryA failed
\n
"
);
...
...
@@ -61,22 +72,44 @@ static void test_find_file(void)
memset
(
curdir
,
0
,
MAX_PATH
);
memset
(
outBuf
,
0
,
MAX_PATH
);
ret
=
VerFindFileA
(
0
,
"regedit.exe"
,
""
,
""
,
curdir
,
&
dwCur
,
outBuf
,
&
dwOut
);
todo_wine
ok
(
VFF_CURNEDEST
==
ret
,
"Wrong return value got %lx expected VFF_CURNEDEST
\n
"
,
ret
);
todo_wine
ok
(
dwCur
==
1
+
strlen
(
windir
),
"Wrong length of buffer for current location: "
switch
(
ret
)
{
case
VFF_CURNEDEST
:
ok
(
dwCur
==
1
+
strlen
(
windir
),
"Wrong length of buffer for current location: "
"got %d(%s) expected %d
\n
"
,
dwCur
,
curdir
,
strlen
(
windir
)
+
1
);
ok
(
dwOut
==
1
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected 1
\n
"
,
dwOut
,
outBuf
);
break
;
case
VFF_BUFFTOOSMALL
:
ok
(
dwCur
==
MAX_PATH
,
"Wrong length of buffer for current location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwCur
,
curdir
);
ok
(
dwOut
==
MAX_PATH
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
todo_wine
ok
(
0
,
"Got unexpected return value %lx
\n
"
,
ret
);
}
dwCur
=
MAX_PATH
;
dwOut
=
MAX_PATH
;
memset
(
curdir
,
0
,
MAX_PATH
);
memset
(
outBuf
,
0
,
MAX_PATH
);
ret
=
VerFindFileA
(
0
,
"regedit.exe"
,
NULL
,
NULL
,
curdir
,
&
dwCur
,
outBuf
,
&
dwOut
);
todo_wine
ok
(
VFF_CURNEDEST
==
ret
,
"Wrong return value got %lx expected VFF_CURNEDEST
\n
"
,
ret
);
todo_wine
ok
(
dwCur
==
1
+
strlen
(
windir
),
"Wrong length of buffer for current location: "
switch
(
ret
)
{
case
VFF_CURNEDEST
:
ok
(
dwCur
==
1
+
strlen
(
windir
),
"Wrong length of buffer for current location: "
"got %d(%s) expected %d
\n
"
,
dwCur
,
curdir
,
strlen
(
windir
)
+
1
);
ok
(
dwOut
==
1
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected 1
\n
"
,
dwOut
,
outBuf
);
break
;
case
VFF_BUFFTOOSMALL
:
ok
(
dwCur
==
MAX_PATH
,
"Wrong length of buffer for current location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwCur
,
curdir
);
ok
(
dwOut
==
MAX_PATH
,
"Wrong length of buffer for the recommended installation location: "
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
todo_wine
ok
(
0
,
"Got unexpected return value %lx
\n
"
,
ret
);
}
}
}
if
(
!
GetModuleFileNameA
(
NULL
,
filename
,
MAX_PATH
)
||
...
...
@@ -96,9 +129,18 @@ static void test_find_file(void)
memset
(
outBuf
,
0
,
MAX_PATH
);
memset
(
curdir
,
0
,
MAX_PATH
);
ret
=
VerFindFileA
(
0
,
filename
,
NULL
,
NULL
,
curdir
,
&
dwCur
,
outBuf
,
&
dwOut
);
todo_wine
ok
(
VFF_CURNEDEST
==
ret
,
"Wrong return value got %lx expected VFF_CURNEDEST
\n
"
,
ret
);
switch
(
ret
)
{
case
VFF_CURNEDEST
:
ok
(
dwOut
==
1
,
"Wrong length of buffer for the recommended installation location"
"got %d(%s) expected 1
\n
"
,
dwOut
,
outBuf
);
break
;
case
VFF_BUFFTOOSMALL
:
ok
(
dwOut
==
MAX_PATH
,
"Wrong length of buffer for the recommended installation location"
"got %d(%s) expected MAX_PATH
\n
"
,
dwOut
,
outBuf
);
break
;
default:
todo_wine
ok
(
0
,
"Got unexpected return value %lx
\n
"
,
ret
);
}
dwCur
=
MAX_PATH
;
dwOut
=
MAX_PATH
;
...
...
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