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
300c2ded
Commit
300c2ded
authored
Feb 23, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Feb 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add more GetTempPath tests.
parent
57562874
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
path.c
dlls/kernel32/tests/path.c
+18
-0
No files found.
dlls/kernel32/tests/path.c
View file @
300c2ded
...
...
@@ -953,6 +953,14 @@ static void test_GetTempPathA(char* tmp_dir)
len
=
GetTempPathA
(
len
,
buf
);
ok
(
lstrcmpiA
(
buf
,
tmp_dir
)
==
0
,
"expected [%s], got [%s]
\n
"
,
tmp_dir
,
buf
);
ok
(
len
==
strlen
(
buf
),
"returned length should be equal to the length of string
\n
"
);
memset
(
buf
,
'a'
,
sizeof
(
buf
));
len
=
GetTempPathA
(
sizeof
(
buf
),
buf
);
ok
(
lstrcmpiA
(
buf
,
tmp_dir
)
==
0
,
"expected [%s], got [%s]
\n
"
,
tmp_dir
,
buf
);
ok
(
len
==
strlen
(
buf
),
"returned length should be equal to the length of string
\n
"
);
/* The rest of the buffer remains untouched */
for
(
len
++
;
len
<
sizeof
(
buf
);
len
++
)
ok
(
buf
[
len
]
==
'a'
,
"expected 'a' at [%d], got 0x%x
\n
"
,
len
,
buf
[
len
]);
}
static
void
test_GetTempPathW
(
char
*
tmp_dir
)
...
...
@@ -996,6 +1004,16 @@ static void test_GetTempPathW(char* tmp_dir)
len
=
GetTempPathW
(
len
,
buf
);
ok
(
lstrcmpiW
(
buf
,
tmp_dirW
)
==
0
,
"GetTempPathW returned an incorrect temporary path
\n
"
);
ok
(
len
==
lstrlenW
(
buf
),
"returned length should be equal to the length of string
\n
"
);
for
(
len
=
0
;
len
<
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
len
++
)
buf
[
len
]
=
'a'
;
len
=
GetTempPathW
(
len
,
buf
);
ok
(
lstrcmpiW
(
buf
,
tmp_dirW
)
==
0
,
"GetTempPathW returned an incorrect temporary path
\n
"
);
ok
(
len
==
lstrlenW
(
buf
),
"returned length should be equal to the length of string
\n
"
);
/* The rest of the buffer must be zeroed */
for
(
len
++
;
len
<
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
len
++
)
todo_wine
ok
(
buf
[
len
]
==
'\0'
,
"expected NULL at [%d], got 0x%x
\n
"
,
len
,
buf
[
len
]);
}
static
void
test_GetTempPath
(
void
)
...
...
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