Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a1428c78
Commit
a1428c78
authored
Jul 11, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added LCase implementation.
parent
0708b77b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
global.c
dlls/vbscript/global.c
+27
-2
api.vbs
dlls/vbscript/tests/api.vbs
+14
-0
No files found.
dlls/vbscript/global.c
View file @
a1428c78
...
@@ -582,8 +582,33 @@ static HRESULT Global_StrComp(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, V
...
@@ -582,8 +582,33 @@ static HRESULT Global_StrComp(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, V
static
HRESULT
Global_LCase
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_LCase
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
{
FIXME
(
"
\n
"
);
BSTR
str
;
return
E_NOTIMPL
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
if
(
V_VT
(
arg
)
==
VT_NULL
)
{
if
(
res
)
V_VT
(
res
)
=
VT_NULL
;
return
S_OK
;
}
hres
=
to_string
(
arg
,
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
res
)
{
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
*
ptr
=
tolowerW
(
*
ptr
);
V_VT
(
res
)
=
VT_BSTR
;
V_BSTR
(
res
)
=
str
;
}
else
{
SysFreeString
(
str
);
}
return
S_OK
;
}
}
static
HRESULT
Global_UCase
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_UCase
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
a1428c78
...
@@ -159,4 +159,18 @@ TestUCase 0.123, "0.123"
...
@@ -159,4 +159,18 @@ TestUCase 0.123, "0.123"
TestUCase
Empty
,
""
TestUCase
Empty
,
""
Call
ok
(
getVT
(
UCase
(
Null
))
=
"VT_NULL"
,
"getVT(UCase(Null)) = "
&
getVT
(
UCase
(
Null
)))
Call
ok
(
getVT
(
UCase
(
Null
))
=
"VT_NULL"
,
"getVT(UCase(Null)) = "
&
getVT
(
UCase
(
Null
)))
Sub
TestLCase
(
str
,
ex
)
x
=
LCase
(
str
)
Call
ok
(
x
=
ex
,
"LCase("
&
str
&
") = "
&
x
&
" expected "
&
ex
)
End
Sub
TestLCase
"test"
,
"test"
TestLCase
"123aBC?"
,
"123abc?"
TestLCase
""
,
""
TestLCase
1
,
"1"
TestLCase
true
,
"true"
TestLCase
0.123
,
"0.123"
TestLCase
Empty
,
""
Call
ok
(
getVT
(
LCase
(
Null
))
=
"VT_NULL"
,
"getVT(LCase(Null)) = "
&
getVT
(
LCase
(
Null
)))
Call
reportSuccess
()
Call
reportSuccess
()
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