Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Clem
wine
Commits
4ecb339f
Commit
4ecb339f
authored
13 years ago
by
Michał Ziętek
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wscript: Implemented Host_get_ScriptFullName.
parent
bf331f8d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
programs/wscript/host.c
+5
-2
5 additions, 2 deletions
programs/wscript/host.c
programs/wscript/tests/run.c
+19
-0
19 additions, 0 deletions
programs/wscript/tests/run.c
programs/wscript/tests/run.js
+1
-0
1 addition, 0 deletions
programs/wscript/tests/run.js
with
25 additions
and
2 deletions
programs/wscript/host.c
+
5
−
2
View file @
4ecb339f
...
...
@@ -176,8 +176,11 @@ static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName)
static
HRESULT
WINAPI
Host_get_ScriptFullName
(
IHost
*
iface
,
BSTR
*
out_ScriptFullName
)
{
WINE_FIXME
(
"(%p)
\n
"
,
out_ScriptFullName
);
return
E_NOTIMPL
;
WINE_TRACE
(
"(%p)
\n
"
,
out_ScriptFullName
);
if
(
!
(
*
out_ScriptFullName
=
SysAllocString
(
scriptFullName
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
Host_get_Arguments
(
IHost
*
iface
,
IArguments2
**
out_Arguments
)
...
...
This diff is collapsed.
Click to expand it.
programs/wscript/tests/run.c
+
19
−
0
View file @
4ecb339f
...
...
@@ -62,6 +62,7 @@ DEFINE_EXPECT(reportSuccess);
#define DISPID_TESTOBJ_WSCRIPTFULLNAME 10003
#define DISPID_TESTOBJ_WSCRIPTPATH 10004
#define DISPID_TESTOBJ_WSCRIPTSCRIPTNAME 10005
#define DISPID_TESTOBJ_WSCRIPTSCRIPTFULLNAME 10006
#define TESTOBJ_CLSID "{178fc166-f585-4e24-9c13-4bb7faf80646}"
...
...
@@ -152,6 +153,8 @@ static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid,
rgDispId
[
i
]
=
DISPID_TESTOBJ_WSCRIPTPATH
;
}
else
if
(
!
strcmp_wa
(
rgszNames
[
i
],
"wscriptScriptName"
))
{
rgDispId
[
i
]
=
DISPID_TESTOBJ_WSCRIPTSCRIPTNAME
;
}
else
if
(
!
strcmp_wa
(
rgszNames
[
i
],
"wscriptScriptFullName"
))
{
rgDispId
[
i
]
=
DISPID_TESTOBJ_WSCRIPTSCRIPTFULLNAME
;
}
else
{
ok
(
0
,
"unexpected name %s
\n
"
,
wine_dbgstr_w
(
rgszNames
[
i
]));
return
DISP_E_UNKNOWNNAME
;
...
...
@@ -246,6 +249,22 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
return
E_OUTOFMEMORY
;
break
;
}
case
DISPID_TESTOBJ_WSCRIPTSCRIPTFULLNAME
:
{
char
fullPath
[
MAX_PATH
];
long
res
;
ok
(
wFlags
==
INVOKE_PROPERTYGET
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
->
cArgs
==
0
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
V_VT
(
pVarResult
)
=
VT_BSTR
;
res
=
GetFullPathNameA
(
script_name
,
sizeof
(
fullPath
)
/
sizeof
(
WCHAR
),
fullPath
,
NULL
);
if
(
!
res
||
res
>
sizeof
(
fullPath
)
/
sizeof
(
WCHAR
))
return
E_FAIL
;
if
(
!
(
V_BSTR
(
pVarResult
)
=
SysAllocString
(
a2bstr
(
fullPath
))))
return
E_OUTOFMEMORY
;
break
;
}
default:
ok
(
0
,
"unexpected dispIdMember %d
\n
"
,
dispIdMember
);
return
E_NOTIMPL
;
...
...
This diff is collapsed.
Click to expand it.
programs/wscript/tests/run.js
+
1
−
0
View file @
4ecb339f
...
...
@@ -31,5 +31,6 @@ ok(typeof(WScript.BuildVersion) === "number", "typeof(WScript.BuldVersion) = " +
ok
(
WScript
.
FullName
===
winetest
.
wscriptFullName
,
"
WScript.FullName =
"
,
WScript
.
FullName
);
ok
(
WScript
.
Path
===
winetest
.
wscriptPath
,
"
WScript.Path =
"
,
WScript
.
Path
);
ok
(
WScript
.
ScriptName
===
winetest
.
wscriptScriptName
,
"
WScript.ScriptName =
"
+
WScript
.
ScriptName
);
ok
(
WScript
.
ScriptFullName
===
winetest
.
wscriptScriptFullName
,
"
WScript.ScriptFullName =
"
+
WScript
.
ScriptFullName
);
winetest
.
reportSuccess
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment