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
56a666d5
Commit
56a666d5
authored
Jan 02, 2024
by
Zsolt Vadasz
Committed by
Alexandre Julliard
Jan 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Test case insensitivity of getenv() and _wgetenv().
parent
1f01dd12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
environ.c
dlls/msvcrt/tests/environ.c
+24
-0
No files found.
dlls/msvcrt/tests/environ.c
View file @
56a666d5
...
...
@@ -421,6 +421,29 @@ static void test_child_env(char** argv)
free
(
env
);
}
static
void
test_case_insensitive
(
void
)
{
const
char
*
uppercase_env
=
getenv
(
"APPDATA"
);
const
char
*
lowercase_env
=
getenv
(
"appdata"
);
const
wchar_t
*
uppercase_wenv
=
_wgetenv
(
L"APPDATA"
);
const
wchar_t
*
lowercase_wenv
=
_wgetenv
(
L"appdata"
);
ok
(
uppercase_env
==
lowercase_env
,
"getenv() must be case insensitive, %p should be %p
\n
"
,
lowercase_env
,
uppercase_env
);
ok
(
uppercase_wenv
==
lowercase_wenv
,
"_wgetenv() must be case insensitive, %p should be %p
\n
"
,
lowercase_wenv
,
uppercase_wenv
);
ok
(
!
_putenv
(
"cAt=bar"
),
"Failed to set CAT=bar
\n
"
);
ok
(
!
_putenv
(
"CAT=BAR"
),
"Failed to set CAT=BAR
\n
"
);
ok
(
!
strcmp
(
getenv
(
"cAt"
),
"BAR"
),
"_putenv() must be case insensitive
\n
"
);
ok
(
!
_wputenv
(
L"cAt=bar"
),
"Failed to set CAT=bar
\n
"
);
ok
(
!
_wputenv
(
L"CAT=BAR"
),
"Failed to set CAT=BAR
\n
"
);
ok
(
!
wcscmp
(
_wgetenv
(
L"cAt"
),
L"BAR"
),
"_wputenv() must be case insensitive
\n
"
);
_putenv
(
"cat="
);
}
START_TEST
(
environ
)
{
char
**
argv
;
...
...
@@ -443,4 +466,5 @@ START_TEST(environ)
test_environment_manipulation
();
test_child_env
(
argv
);
test_system
();
test_case_insensitive
();
}
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