Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
b6da3052
Commit
b6da3052
authored
Sep 16, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript/tests: Some tests require that the user interface be in English.
parent
3beac360
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
lang.vbs
dlls/vbscript/tests/lang.vbs
+1
-1
run.c
dlls/vbscript/tests/run.c
+26
-9
No files found.
dlls/vbscript/tests/lang.vbs
View file @
b6da3052
...
...
@@ -86,7 +86,7 @@ Call ok("ab " & empty = "ab ", """ab"" & empty = " & ("ab " & empty))
Call
ok
(
1
&
100000
=
"1100000"
,
"1 & 100000 = "
&
(
1
&
100000
))
Call
ok
(
"ab"
&
x
=
"abxx"
,
"
""
ab
""
& x = "
&
(
"ab"
&
x
))
if
(
isEnglishL
ocale
)
then
if
(
isEnglishL
ang
)
then
Call
ok
(
""
&
true
=
"True"
,
"
""""
& true = "
&
true
)
Call
ok
(
true
&
false
=
"TrueFalse"
,
"true & false = "
&
(
true
&
false
))
end
if
...
...
dlls/vbscript/tests/run.c
View file @
b6da3052
...
...
@@ -69,7 +69,7 @@ DEFINE_EXPECT(testobj_propput_i);
#define DISPID_GLOBAL_TRACE 1001
#define DISPID_GLOBAL_OK 1002
#define DISPID_GLOBAL_GETVT 1003
#define DISPID_GLOBAL_ISENGL
OC
1004
#define DISPID_GLOBAL_ISENGL
ANG
1004
#define DISPID_GLOBAL_VBVAR 1005
#define DISPID_GLOBAL_TESTOBJ 1006
#define DISPID_GLOBAL_ISNULLDISP 1007
...
...
@@ -135,10 +135,27 @@ static const char *vt2a(VARIANT *v)
}
}
static
BOOL
is_english
(
void
)
/* 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
)
{
return
PRIMARYLANGID
(
GetSystemDefaultLangID
())
==
LANG_ENGLISH
&&
PRIMARYLANGID
(
GetUserDefaultLangID
())
==
LANG_ENGLISH
;
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
void
test_disp
(
IDispatch
*
disp
)
...
...
@@ -405,9 +422,9 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_GETVT
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"isEnglishL
ocale
"
))
{
if
(
!
strcmp_wa
(
bstrName
,
"isEnglishL
ang
"
))
{
test_grfdex
(
grfdex
,
fdexNameCaseInsensitive
);
*
pid
=
DISPID_GLOBAL_ISENGL
OC
;
*
pid
=
DISPID_GLOBAL_ISENGL
ANG
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"testObj"
))
{
...
...
@@ -511,7 +528,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_BSTR
(
pvarRes
)
=
a2bstr
(
vt2a
(
pdp
->
rgvarg
));
return
S_OK
;
case
DISPID_GLOBAL_ISENGL
OC
:
case
DISPID_GLOBAL_ISENGL
ANG
:
ok
(
wFlags
==
(
INVOKE_FUNC
|
INVOKE_PROPERTYGET
),
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
!
pdp
->
rgdispidNamedArgs
,
"rgdispidNamedArgs != NULL
\n
"
);
...
...
@@ -521,10 +538,10 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
V_VT
(
pvarRes
)
=
VT_BOOL
;
if
(
is_english
())
{
if
(
is_
lang_
english
())
{
V_BOOL
(
pvarRes
)
=
VARIANT_TRUE
;
}
else
{
skip
(
"Skipping some test
in non-English locale
\n
"
);
skip
(
"Skipping some test
s in non-English UIs
\n
"
);
V_BOOL
(
pvarRes
)
=
VARIANT_FALSE
;
}
return
S_OK
;
...
...
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