winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
838 discussions
Start a n
N
ew thread
Alexandre Julliard : gdi32: Add an optional clip region to the PutImage entry point.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 0d9dde7953c285ec148d7b4be8137023e0974227 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d9dde7953c285ec148d7b4be…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 21 18:49:47 2011 +0200 gdi32: Add an optional clip region to the PutImage entry point. --- dlls/gdi32/bitblt.c | 4 ++-- dlls/gdi32/driver.c | 2 +- dlls/wineps.drv/bitmap.c | 5 +++-- dlls/wineps.drv/psdrv.h | 5 +++-- dlls/winex11.drv/bitblt.c | 5 +++-- dlls/winex11.drv/x11drv.h | 5 +++-- include/wine/gdi_driver.h | 4 ++-- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index 550d9b4..b104153 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -178,7 +178,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage ); memcpy( dst_info, src_info, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )); - err = dst_dev->funcs->pPutImage( dst_dev, 0, dst_info, &bits, src, dst, rop ); + err = dst_dev->funcs->pPutImage( dst_dev, 0, 0, dst_info, &bits, src, dst, rop ); if (err == ERROR_BAD_FORMAT) { /* 1-bpp source without a color table uses the destination DC colors */ @@ -221,7 +221,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, { /* get rid of the fake 1-bpp table */ if (dst_info->bmiHeader.biClrUsed == 1) dst_info->bmiHeader.biClrUsed = 0; - err = dst_dev->funcs->pPutImage( dst_dev, 0, dst_info, &bits, src, dst, rop ); + err = dst_dev->funcs->pPutImage( dst_dev, 0, 0, dst_info, &bits, src, dst, rop ); } } else err = ERROR_OUTOFMEMORY; diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 71d15cd..56f9879 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -427,7 +427,7 @@ static BOOL nulldrv_Polyline( PHYSDEV dev, const POINT *points, INT count ) return TRUE; } -static DWORD nulldrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, +static DWORD nulldrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, const struct gdi_image_bits *bits, struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) { diff --git a/dlls/wineps.drv/bitmap.c b/dlls/wineps.drv/bitmap.c index cac4841..39e4536 100644 --- a/dlls/wineps.drv/bitmap.c +++ b/dlls/wineps.drv/bitmap.c @@ -213,8 +213,9 @@ static void PSDRV_WriteImageBits( PHYSDEV dev, const BITMAPINFO *info, INT xDst, /*********************************************************************** * PSDRV_PutImage */ -DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const struct gdi_image_bits *bits, - struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) +DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, + const struct gdi_image_bits *bits, struct bitblt_coords *src, + struct bitblt_coords *dst, DWORD rop ) { int src_stride, dst_stride, size, x, y, width, height, bit_offset; int dst_x, dst_y, dst_width, dst_height; diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 5be855d..d24a8fd 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -443,8 +443,9 @@ extern BOOL PSDRV_PolyPolygon( PHYSDEV dev, const POINT* pts, const INT* counts, extern BOOL PSDRV_PolyPolyline( PHYSDEV dev, const POINT* pts, const DWORD* counts, DWORD polylines ) DECLSPEC_HIDDEN; extern BOOL PSDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; extern BOOL PSDRV_Polyline( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; -extern DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const struct gdi_image_bits *bits, - struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; +extern DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, + const struct gdi_image_bits *bits, struct bitblt_coords *src, + struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; extern BOOL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL PSDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 62a10cc..08e0386 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1861,8 +1861,9 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, /*********************************************************************** * X11DRV_PutImage */ -DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const struct gdi_image_bits *bits, - struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) +DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, + const struct gdi_image_bits *bits, struct bitblt_coords *src, + struct bitblt_coords *dst, DWORD rop ) { X11DRV_PDEVICE *physdev; X_PHYSBITMAP *bitmap; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 1754b1b..93d3981 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -219,8 +219,9 @@ extern BOOL X11DRV_Polyline( PHYSDEV dev,const POINT* pt,INT count) DECLSPEC_HID extern BOOL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; extern BOOL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons) DECLSPEC_HIDDEN; extern BOOL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines) DECLSPEC_HIDDEN; -extern DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const struct gdi_image_bits *bits, - struct bitblt_coords *src, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; +extern DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, + const struct gdi_image_bits *bits, struct bitblt_coords *src, + struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN; extern UINT X11DRV_RealizeDefaultPalette( PHYSDEV dev ) DECLSPEC_HIDDEN; extern UINT X11DRV_RealizePalette( PHYSDEV dev, HPALETTE hpal, BOOL primary ) DECLSPEC_HIDDEN; extern BOOL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index c02ce9b..87c12d7 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -120,7 +120,7 @@ struct gdi_dc_funcs BOOL (*pPolygon)(PHYSDEV,const POINT*,INT); BOOL (*pPolyline)(PHYSDEV,const POINT*,INT); BOOL (*pPolylineTo)(PHYSDEV,const POINT*,INT); - DWORD (*pPutImage)(PHYSDEV,HBITMAP,BITMAPINFO*,const struct gdi_image_bits*,struct bitblt_coords*,struct bitblt_coords*,DWORD); + DWORD (*pPutImage)(PHYSDEV,HBITMAP,HRGN,BITMAPINFO*,const struct gdi_image_bits*,struct bitblt_coords*,struct bitblt_coords*,DWORD); UINT (*pRealizeDefaultPalette)(PHYSDEV); UINT (*pRealizePalette)(PHYSDEV,HPALETTE,BOOL); BOOL (*pRectangle)(PHYSDEV,INT,INT,INT,INT); @@ -191,7 +191,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 6 +#define WINE_GDI_DRIVER_VERSION 7 static inline PHYSDEV get_physdev_entry_point( PHYSDEV dev, size_t offset ) {
1
0
0
0
André Hentschel : winevdm: Use secure mode when running apps in DOSBox.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: 0e3527a56466e011234739a57349daceb05525a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e3527a56466e011234739a57…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Jul 20 22:31:03 2011 +0200 winevdm: Use secure mode when running apps in DOSBox. --- programs/winevdm/winevdm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c index 04f2953..8abc282 100644 --- a/programs/winevdm/winevdm.c +++ b/programs/winevdm/winevdm.c @@ -184,7 +184,8 @@ static void start_dosbox( const char *appname, const char *args ) p += sprintf( p, "mount %c %s/dosdevices/%c:\n", 'a' + i, config_dir, 'a' + i ); p += sprintf( p, "%c:\ncd ", path[0] ); p += WideCharToMultiByte( CP_UNIXCP, 0, path + 2, -1, p, 4 * strlenW(path), NULL, NULL ) - 1; - p += sprintf( p, "\n%s %s\n", appname, args ); + p += sprintf( p, "\nconfig -securemode\n" ); + p += sprintf( p, "%s %s\n", appname, args ); p += sprintf( p, "exit\n" ); if (WriteFile( file, buffer, strlen(buffer), &written, NULL ) && written == strlen(buffer)) {
1
0
0
0
Michael Stefaniuc : gameux: COM cleanup for the IClassFactory iface.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: b48f7bec0dde8c40f789cc7919a080a2bfa417b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b48f7bec0dde8c40f789cc791…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jul 21 13:30:27 2011 +0200 gameux: COM cleanup for the IClassFactory iface. --- dlls/gameux/factory.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/gameux/factory.c b/dlls/gameux/factory.c index 38be7a5..5e8d1c6 100644 --- a/dlls/gameux/factory.c +++ b/dlls/gameux/factory.c @@ -41,13 +41,13 @@ typedef HRESULT (*fnCreateInstance)(IUnknown *pUnkOuter, IUnknown **ppObj); */ typedef struct _gameuxcf { - const struct IClassFactoryVtbl *lpVtbl; + IClassFactory IClassFactory_iface; fnCreateInstance pfnCreateInstance; } gameuxcf; static inline gameuxcf *impl_from_IClassFactory(IClassFactory *iface) { - return (gameuxcf*)((char*)iface - FIELD_OFFSET(gameuxcf, lpVtbl)); + return CONTAINING_RECORD(iface, gameuxcf, IClassFactory_iface); } static HRESULT WINAPI gameuxcf_QueryInterface( @@ -130,8 +130,8 @@ static const struct IClassFactoryVtbl gameuxcf_vtbl = gameuxcf_LockServer }; -static gameuxcf gameexplorercf = { &gameuxcf_vtbl, GameExplorer_create }; -static gameuxcf gamestatisticscf = { &gameuxcf_vtbl, GameStatistics_create }; +static gameuxcf gameexplorercf = { { &gameuxcf_vtbl }, GameExplorer_create }; +static gameuxcf gamestatisticscf = { { &gameuxcf_vtbl }, GameStatistics_create }; /*************************************************************** * gameux ClassFactory @@ -147,11 +147,11 @@ HRESULT WINAPI DllGetClassObject( if(IsEqualCLSID(rclsid, &CLSID_GameExplorer)) { - cf = (IClassFactory*)&gameexplorercf.lpVtbl; + cf = &gameexplorercf.IClassFactory_iface; } else if( IsEqualCLSID( rclsid, &CLSID_GameStatistics )) { - cf = (IClassFactory*) &gamestatisticscf.lpVtbl; + cf = &gamestatisticscf.IClassFactory_iface; } if(!cf)
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_ScriptFullName.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: 4ecb339f02f7153e5f34a5b9c5918f595c268752 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ecb339f02f7153e5f34a5b9c…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Wed Jul 20 21:47:47 2011 +0200 wscript: Implemented Host_get_ScriptFullName. --- programs/wscript/host.c | 7 +++++-- programs/wscript/tests/run.c | 19 +++++++++++++++++++ programs/wscript/tests/run.js | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index b556d74..d17e4b4 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -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) diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index 9595942..50aa398 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -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; diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index e9d7776..5e61d69 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -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();
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_ScriptName.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: bf331f8dcaebe4db2672c09b81ae37624376467d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf331f8dcaebe4db2672c09b8…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Wed Jul 20 21:47:38 2011 +0200 wscript: Implemented Host_get_ScriptName. --- programs/wscript/host.c | 11 +++++++++-- programs/wscript/main.c | 5 +++++ programs/wscript/tests/run.c | 32 ++++++++++++++++++++++++++++++++ programs/wscript/tests/run.js | 1 + programs/wscript/wscript.h | 2 ++ 5 files changed, 49 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 42343b1..b556d74 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -163,8 +163,15 @@ static HRESULT WINAPI Host_Quit(IHost *iface, int ExitCode) static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName) { - WINE_FIXME("(%p)\n", out_ScriptName); - return E_NOTIMPL; + WCHAR *scriptName; + + WINE_TRACE("(%p)\n", out_ScriptName); + + scriptName = strrchrW(scriptFullName, '\\'); + ++scriptName; + if(!(*out_ScriptName = SysAllocString(scriptName))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_ScriptFullName(IHost *iface, BSTR *out_ScriptFullName) diff --git a/programs/wscript/main.c b/programs/wscript/main.c index 0ea7011..8bf0712 100644 --- a/programs/wscript/main.c +++ b/programs/wscript/main.c @@ -36,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wscript); static const WCHAR wscriptW[] = {'W','S','c','r','i','p','t',0}; static const WCHAR wshW[] = {'W','S','H',0}; +WCHAR scriptFullName[MAX_PATH]; ITypeInfo *host_ti; @@ -326,6 +327,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm WCHAR **argv; CLSID clsid; int argc, i; + DWORD res; WINE_TRACE("(%p %p %s %x)\n", hInst, hPrevInst, wine_dbgstr_w(cmdline), cmdshow); @@ -346,6 +348,9 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm WINE_FIXME("No file name specified\n"); return 1; } + res = GetFullPathNameW(filename, sizeof(scriptFullName)/sizeof(WCHAR), scriptFullName, NULL); + if(!res || res > sizeof(scriptFullName)/sizeof(WCHAR)) + return 1; ext = strchrW(filename, '.'); if(!ext) diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index 2f5dedd..9595942 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -61,6 +61,7 @@ DEFINE_EXPECT(reportSuccess); #define DISPID_TESTOBJ_REPORTSUCCESS 10002 #define DISPID_TESTOBJ_WSCRIPTFULLNAME 10003 #define DISPID_TESTOBJ_WSCRIPTPATH 10004 +#define DISPID_TESTOBJ_WSCRIPTSCRIPTNAME 10005 #define TESTOBJ_CLSID "{178fc166-f585-4e24-9c13-4bb7faf80646}" @@ -87,6 +88,18 @@ static const WCHAR* mystrrchr(const WCHAR *str, WCHAR ch) return pos; } +static BSTR a2bstr(const char *str) +{ + BSTR ret; + int len; + + len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + ret = SysAllocStringLen(NULL, len-1); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + + return ret; +} + static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) { if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch)) { @@ -137,6 +150,8 @@ static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, rgDispId[i] = DISPID_TESTOBJ_WSCRIPTFULLNAME; }else if(!strcmp_wa(rgszNames[i], "wscriptPath")) { rgDispId[i] = DISPID_TESTOBJ_WSCRIPTPATH; + }else if(!strcmp_wa(rgszNames[i], "wscriptScriptName")) { + rgDispId[i] = DISPID_TESTOBJ_WSCRIPTSCRIPTNAME; }else { ok(0, "unexpected name %s\n", wine_dbgstr_w(rgszNames[i])); return DISP_E_UNKNOWNNAME; @@ -214,6 +229,23 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF return E_OUTOFMEMORY; break; } + case DISPID_TESTOBJ_WSCRIPTSCRIPTNAME: + { + char fullPath[MAX_PATH]; + char *pos; + 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, &pos); + if(!res || res > sizeof(fullPath)/sizeof(WCHAR)) + return E_FAIL; + if(!(V_BSTR(pVarResult) = SysAllocString(a2bstr(pos)))) + return E_OUTOFMEMORY; + break; + } default: ok(0, "unexpected dispIdMember %d\n", dispIdMember); return E_NOTIMPL; diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 225abef..e9d7776 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -30,5 +30,6 @@ ok(typeof(WScript.Version) === "string", "typeof(WScript.Version) = " + typeof(W ok(typeof(WScript.BuildVersion) === "number", "typeof(WScript.BuldVersion) = " + 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); winetest.reportSuccess(); diff --git a/programs/wscript/wscript.h b/programs/wscript/wscript.h index a5c642d..642784e 100644 --- a/programs/wscript/wscript.h +++ b/programs/wscript/wscript.h @@ -21,3 +21,5 @@ extern IHost host_obj; extern ITypeInfo *host_ti; + +extern WCHAR scriptFullName[];
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_Path.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: 6afb5f078241406caf5281854daf3ca15c915092 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6afb5f078241406caf5281854…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Wed Jul 20 21:47:29 2011 +0200 wscript: Implemented Host_get_Path. --- programs/wscript/host.c | 16 ++++++++++++++-- programs/wscript/tests/run.c | 33 +++++++++++++++++++++++++++++++++ programs/wscript/tests/run.js | 1 + 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 8277cdf..42343b1 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -28,6 +28,7 @@ #include "wscript.h" #include <wine/debug.h> +#include <wine/unicode.h> #define BUILDVERSION 16535 @@ -127,8 +128,19 @@ static HRESULT WINAPI Host_get_FullName(IHost *iface, BSTR *out_Path) static HRESULT WINAPI Host_get_Path(IHost *iface, BSTR *out_Path) { - WINE_FIXME("(%p)\n", out_Path); - return E_NOTIMPL; + WCHAR path[MAX_PATH]; + int howMany; + WCHAR *pos; + + WINE_TRACE("(%p)\n", out_Path); + + if(GetModuleFileNameW(NULL, path, sizeof(path)/sizeof(WCHAR)) == 0) + return E_FAIL; + pos = strrchrW(path, '\\'); + howMany = pos - path; + if(!(*out_Path = SysAllocStringLen(path, howMany))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_Interactive(IHost *iface, VARIANT_BOOL *out_Interactive) diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index 30230b6..2f5dedd 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -60,6 +60,7 @@ DEFINE_EXPECT(reportSuccess); #define DISPID_TESTOBJ_TRACE 10001 #define DISPID_TESTOBJ_REPORTSUCCESS 10002 #define DISPID_TESTOBJ_WSCRIPTFULLNAME 10003 +#define DISPID_TESTOBJ_WSCRIPTPATH 10004 #define TESTOBJ_CLSID "{178fc166-f585-4e24-9c13-4bb7faf80646}" @@ -75,6 +76,17 @@ static int strcmp_wa(LPCWSTR strw, const char *stra) return lstrcmpW(strw, buf); } +static const WCHAR* mystrrchr(const WCHAR *str, WCHAR ch) +{ + const WCHAR *pos = NULL, *current = str; + while(*current != 0) { + if(*current == ch) + pos = current; + ++current; + } + return pos; +} + static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) { if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch)) { @@ -123,6 +135,8 @@ static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, rgDispId[i] = DISPID_TESTOBJ_REPORTSUCCESS; }else if(!strcmp_wa(rgszNames[i], "wscriptFullName")) { rgDispId[i] = DISPID_TESTOBJ_WSCRIPTFULLNAME; + }else if(!strcmp_wa(rgszNames[i], "wscriptPath")) { + rgDispId[i] = DISPID_TESTOBJ_WSCRIPTPATH; }else { ok(0, "unexpected name %s\n", wine_dbgstr_w(rgszNames[i])); return DISP_E_UNKNOWNNAME; @@ -181,6 +195,25 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF return E_OUTOFMEMORY; break; } + case DISPID_TESTOBJ_WSCRIPTPATH: + { + WCHAR fullPath[MAX_PATH]; + const WCHAR wscriptexe[] = {'w','s','c','r','i','p','t','.','e','x','e',0}; + DWORD res; + const WCHAR *pos; + + 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 = SearchPathW(NULL, wscriptexe, NULL, sizeof(fullPath)/sizeof(WCHAR), fullPath, NULL); + if(res == 0) + return E_FAIL; + pos = mystrrchr(fullPath, '\\'); + if(!(V_BSTR(pVarResult) = SysAllocStringLen(fullPath, pos-fullPath))) + return E_OUTOFMEMORY; + break; + } default: ok(0, "unexpected dispIdMember %d\n", dispIdMember); return E_NOTIMPL; diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 1156e13..225abef 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -29,5 +29,6 @@ ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); ok(typeof(WScript.Version) === "string", "typeof(WScript.Version) = " + typeof(WScript.Version)); ok(typeof(WScript.BuildVersion) === "number", "typeof(WScript.BuldVersion) = " + typeof(WScript.BuldVersion)); ok(WScript.FullName === winetest.wscriptFullName, "WScript.FullName = ", WScript.FullName); +ok(WScript.Path === winetest.wscriptPath, "WScript.Path = ", WScript.Path); winetest.reportSuccess();
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_FullName.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: d6fd86e8ec1f764c59306ed3bb3b7270a66487f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6fd86e8ec1f764c59306ed3b…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Wed Jul 20 21:47:18 2011 +0200 wscript: Implemented Host_get_FullName. --- programs/wscript/host.c | 11 +++++++++-- programs/wscript/tests/Makefile.in | 2 +- programs/wscript/tests/run.c | 26 +++++++++++++++++++++++--- programs/wscript/tests/run.js | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index c0d73a5..8277cdf 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -114,8 +114,15 @@ static HRESULT WINAPI Host_get_Application(IHost *iface, IDispatch **out_Dispatc static HRESULT WINAPI Host_get_FullName(IHost *iface, BSTR *out_Path) { - WINE_FIXME("(%p)\n", out_Path); - return E_NOTIMPL; + WCHAR fullPath[MAX_PATH]; + + WINE_TRACE("(%p)\n", out_Path); + + if(GetModuleFileNameW(NULL, fullPath, sizeof(fullPath)/sizeof(WCHAR)) == 0) + return E_FAIL; + if(!(*out_Path = SysAllocString(fullPath))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_Path(IHost *iface, BSTR *out_Path) diff --git a/programs/wscript/tests/Makefile.in b/programs/wscript/tests/Makefile.in index 8eb0535..78f0cc4 100644 --- a/programs/wscript/tests/Makefile.in +++ b/programs/wscript/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = wscript.exe -IMPORTS = ole32 advapi32 +IMPORTS = ole32 oleaut32 advapi32 C_SRCS = \ run.c diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index 2c2a15a..30230b6 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -56,9 +56,10 @@ DEFINE_EXPECT(reportSuccess); -#define DISPID_TESTOBJ_OK 10000 -#define DISPID_TESTOBJ_TRACE 10001 -#define DISPID_TESTOBJ_REPORTSUCCESS 10002 +#define DISPID_TESTOBJ_OK 10000 +#define DISPID_TESTOBJ_TRACE 10001 +#define DISPID_TESTOBJ_REPORTSUCCESS 10002 +#define DISPID_TESTOBJ_WSCRIPTFULLNAME 10003 #define TESTOBJ_CLSID "{178fc166-f585-4e24-9c13-4bb7faf80646}" @@ -120,6 +121,8 @@ static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, rgDispId[i] = DISPID_TESTOBJ_TRACE; }else if(!strcmp_wa(rgszNames[i], "reportSuccess")) { rgDispId[i] = DISPID_TESTOBJ_REPORTSUCCESS; + }else if(!strcmp_wa(rgszNames[i], "wscriptFullName")) { + rgDispId[i] = DISPID_TESTOBJ_WSCRIPTFULLNAME; }else { ok(0, "unexpected name %s\n", wine_dbgstr_w(rgszNames[i])); return DISP_E_UNKNOWNNAME; @@ -161,6 +164,23 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF if(pVarResult) V_VT(pVarResult) = VT_EMPTY; break; + case DISPID_TESTOBJ_WSCRIPTFULLNAME: + { + WCHAR fullName[MAX_PATH]; + const WCHAR wscriptexe[] = {'w','s','c','r','i','p','t','.','e','x','e',0}; + DWORD 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 = SearchPathW(NULL, wscriptexe, NULL, sizeof(fullName)/sizeof(WCHAR), fullName, NULL); + if(res == 0) + return E_FAIL; + if(!(V_BSTR(pVarResult) = SysAllocString(fullName))) + return E_OUTOFMEMORY; + break; + } default: ok(0, "unexpected dispIdMember %d\n", dispIdMember); return E_NOTIMPL; diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index fda62f6..1156e13 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -28,5 +28,6 @@ ok(WScript === WSH, "WScript !== WSH"); ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); ok(typeof(WScript.Version) === "string", "typeof(WScript.Version) = " + typeof(WScript.Version)); ok(typeof(WScript.BuildVersion) === "number", "typeof(WScript.BuldVersion) = " + typeof(WScript.BuldVersion)); +ok(WScript.FullName === winetest.wscriptFullName, "WScript.FullName = ", WScript.FullName); winetest.reportSuccess();
1
0
0
0
Jeff Latimer : comctl32: Improve the stub of TaskDialogIndirect to display a simple message box pending a full implementation .
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: f669cca9993645397040f504d2e12eac089d4fc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f669cca9993645397040f504d…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Thu Jul 21 23:00:13 2011 +1000 comctl32: Improve the stub of TaskDialogIndirect to display a simple message box pending a full implementation. --- dlls/comctl32/commctrl.c | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index a82b233..e06638c 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -1696,9 +1696,34 @@ int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *pTaskConfig, int *pnButton, int *pnRadioButton, BOOL *pfVerificationFlagChecked) { + UINT uType = 0; + INT ret; FIXME("%p, %p, %p, %p\n", pTaskConfig, pnButton, pnRadioButton, pfVerificationFlagChecked); - if (pnButton) *pnButton = IDYES; + if (pTaskConfig->dwCommonButtons & TDCBF_YES_BUTTON && + pTaskConfig->dwCommonButtons & TDCBF_NO_BUTTON && + pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON) + uType |= MB_YESNOCANCEL; + else + if (pTaskConfig->dwCommonButtons & TDCBF_YES_BUTTON && + pTaskConfig->dwCommonButtons & TDCBF_NO_BUTTON) + uType |= MB_YESNO; + else + if (pTaskConfig->dwCommonButtons & TDCBF_RETRY_BUTTON && + pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON) + uType |= MB_RETRYCANCEL; + else + if (pTaskConfig->dwCommonButtons & TDCBF_OK_BUTTON && + pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON) + uType |= MB_OKCANCEL; + else + if (pTaskConfig->dwCommonButtons & TDCBF_OK_BUTTON) + uType |= MB_OK; + ret = MessageBoxW(pTaskConfig->hwndParent, pTaskConfig->pszMainInstruction, + pTaskConfig->pszWindowTitle, uType); + FIXME("dwCommonButtons=%x uType=%x ret=%x\n", pTaskConfig->dwCommonButtons, uType, ret); + + if (pnButton) *pnButton = ret; if (pnRadioButton) *pnRadioButton = pTaskConfig->nDefaultButton; if (pfVerificationFlagChecked) *pfVerificationFlagChecked = TRUE; return S_OK;
1
0
0
0
Frédéric Delanoy : cmd: Fix comment for CMD_PIPE.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: d1862e473bb81895bc4392976dcc4269d64ea7ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1862e473bb81895bc4392976…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu Jul 21 15:28:27 2011 +0200 cmd: Fix comment for CMD_PIPE. --- programs/cmd/wcmd.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index fffeb78..1bf0485 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -36,7 +36,7 @@ typedef enum _CMDdelimiters { CMD_NONE, /* End of line or single & */ CMD_ONFAILURE, /* || */ CMD_ONSUCCESS, /* && */ - CMD_PIPE /* Single */ + CMD_PIPE /* Single | */ } CMD_DELIMITERS; typedef struct _CMD_LIST {
1
0
0
0
Frédéric Delanoy : cmd/tests: Add CALL tests.
by Alexandre Julliard
21 Jul '11
21 Jul '11
Module: wine Branch: master Commit: 8f8aa7a35e3436199e83a6b2acbb5027fecd7768 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f8aa7a35e3436199e83a6b2a…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Thu Jul 21 15:28:26 2011 +0200 cmd/tests: Add CALL tests. --- programs/cmd/tests/test_builtins.cmd | 40 ++++++++++++++++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 12 +++++++++ 2 files changed, 52 insertions(+), 0 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 195afca..81a326a 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -361,6 +361,46 @@ if not exist foo ( rd foo ) +echo ------------ Testing CALL -------------- +mkdir foobar & cd foobar +rem External script +echo echo foo %%1 > foo.cmd +call foo +call foo.cmd 8 +del foo.cmd +rem Internal routines +call :testRoutine :testRoutine +goto :endTestRoutine +:testRoutine +echo bar %1 +goto :eof +:endTestRoutine +rem Should work for builtins... +call mkdir foo +echo %ErrorLevel% +if exist foo (echo foo created) else echo foo should exist! +rmdir foo +set FOOBAZ_VAR=foobaz +call echo Should expand %FOOBAZ_VAR% +set FOOBAZ_VAR= +echo>batfile +call dir /b +echo>robinfile +if 1==1 call del batfile +dir /b +if exist batfile echo batfile shouldn't exist +rem ... but not for 'if' or 'for' +call if 1==1 echo bar 2> nul +echo %ErrorLevel% +call :setError 0 +call for %%i in (foo bar baz) do echo %%i 2> nul +echo %ErrorLevel% +rem First look for programs in the path before trying a builtin +echo echo non-builtin dir > dir.cmd +call dir /b +cd .. +rd /s/q foobar + echo -----------Testing Errorlevel----------- rem WARNING: Do *not* add tests using ErrorLevel after this section should_not_exist 2> nul > nul diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 67f25a4..c3fee1a 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -174,6 +174,18 @@ non-empty dir not removed non-empty dir not removed recursive rmdir succeeded recursive rmdir succeeded +------------ Testing CALL -------------- +foo +foo 8 +bar :testRoutine +@todo_wine@0 +@todo_wine@foo created +@todo_wine@Should expand foobaz +@todo_wine@batfile +@todo_wine@robinfile +@todo_wine@1 +@todo_wine@1 +non-builtin dir -----------Testing Errorlevel----------- 9009 1
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
84
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200