From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- .../windows.applicationmodel/tests/Makefile.in | 2 +- .../tests/application.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/windows.applicationmodel/tests/Makefile.in b/dlls/windows.applicationmodel/tests/Makefile.in index ba41bd7be94..9289fe0bc8c 100644 --- a/dlls/windows.applicationmodel/tests/Makefile.in +++ b/dlls/windows.applicationmodel/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windows.applicationmodel.dll -IMPORTS = combase advapi32 +IMPORTS = combase advapi32 kernelbase
application_EXTRADLLFLAGS = -mconsole
diff --git a/dlls/windows.applicationmodel/tests/application.c b/dlls/windows.applicationmodel/tests/application.c index a011b50d2de..44ae82533d7 100644 --- a/dlls/windows.applicationmodel/tests/application.c +++ b/dlls/windows.applicationmodel/tests/application.c @@ -28,6 +28,7 @@ #include "winbase.h" #include "initguid.h" #include "winstring.h" +#include "pathcch.h"
#include "roapi.h"
@@ -61,9 +62,11 @@ static void test_PackageStatics(void) IStorageFolder *storage_folder; IActivationFactory *factory; IStorageItem *storage_item; + WCHAR buffer[MAX_PATH]; + HSTRING str, wine_str; IPackage *package; - HSTRING str; HRESULT hr; + INT32 res; LONG ref;
hr = WindowsCreateString( package_statics_name, wcslen( package_statics_name ), &str ); @@ -107,6 +110,19 @@ static void test_PackageStatics(void) hr = IStorageFolder_QueryInterface( storage_folder, &IID_IStorageItem, (void **)&storage_item ); ok( hr == S_OK, "got hr %#lx.\n", hr );
+ hr = IStorageItem_get_Path( storage_item, &str ); + todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); + GetModuleFileNameW( NULL, buffer, MAX_PATH ); + hr = PathCchRemoveFileSpec( buffer, ARRAY_SIZE(buffer) ); + todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = WindowsCreateString( buffer, wcslen(buffer), &wine_str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = WindowsCompareStringOrdinal( str, wine_str, &res ); + todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); + todo_wine ok( !res, "got string %s.\n", debugstr_hstring(str) ); + WindowsDeleteString( str ); + WindowsDeleteString( wine_str ); + ref = IStorageItem_Release( storage_item ); ok( ref == 1, "got ref %ld.\n", ref ); ref = IStorageFolder_Release( storage_folder );