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
405c3ef4
Commit
405c3ef4
authored
Sep 18, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Some tests require that the user interface be in English.
parent
4c7e83f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
run.c
dlls/jscript/tests/run.c
+25
-2
No files found.
dlls/jscript/tests/run.c
View file @
405c3ef4
...
...
@@ -108,6 +108,29 @@ static IDispatch *script_disp;
static
int
invoke_version
;
static
IActiveScriptError
*
script_error
;
/* Returns true if the user interface is in English. Note that this does not
* presume of the formatting of dates, numbers, etc.
*/
static
BOOL
is_lang_english
(
void
)
{
static
HMODULE
hkernel32
=
NULL
;
static
LANGID
(
WINAPI
*
pGetThreadUILanguage
)(
void
)
=
NULL
;
static
LANGID
(
WINAPI
*
pGetUserDefaultUILanguage
)(
void
)
=
NULL
;
if
(
!
hkernel32
)
{
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetThreadUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetThreadUILanguage"
);
pGetUserDefaultUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetUserDefaultUILanguage"
);
}
if
(
pGetThreadUILanguage
)
return
PRIMARYLANGID
(
pGetThreadUILanguage
())
==
LANG_ENGLISH
;
if
(
pGetUserDefaultUILanguage
)
return
PRIMARYLANGID
(
pGetUserDefaultUILanguage
())
==
LANG_ENGLISH
;
return
PRIMARYLANGID
(
GetUserDefaultLangID
())
==
LANG_ENGLISH
;
}
static
BSTR
a2bstr
(
const
char
*
str
)
{
BSTR
ret
;
...
...
@@ -1145,8 +1168,8 @@ static void test_IActiveScriptError(IActiveScriptError *error, SCODE errorcode,
ok
(
excep
.
wCode
==
0
,
"IActiveScriptError_GetExceptionInfo -- excep.wCode: expected 0, got 0x%08x
\n
"
,
excep
.
wCode
);
ok
(
excep
.
wReserved
==
0
,
"IActiveScriptError_GetExceptionInfo -- excep.wReserved: expected 0, got %d
\n
"
,
excep
.
wReserved
);
if
(
PRIMARYLANGID
(
LANGIDFROMLCID
(
GetThreadLocale
()))
!=
LANG_ENGLISH
)
skip
(
"Non-english
locale
(test with hardcoded strings)
\n
"
);
if
(
!
is_lang_english
()
)
skip
(
"Non-english
UI
(test with hardcoded strings)
\n
"
);
else
{
ok
(
excep
.
bstrSource
!=
NULL
&&
!
lstrcmpW
(
excep
.
bstrSource
,
script_source
),
"IActiveScriptError_GetExceptionInfo -- excep.bstrSource is not valid: expected %s, got %s
\n
"
,
...
...
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