[GDI32_APITEST]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sat, 8 Aug 2015 08:31:49 +0000 (08:31 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sat, 8 Aug 2015 08:31:49 +0000 (08:31 +0000)
-include the testdata in all targets
-load it from the correct path even when the application is using a different working directory

svn path=/trunk/; revision=68623

rostests/CMakeLists.txt
rostests/apitests/gdi32/AddFontResource.c

index cba0ccc..2822fa6 100644 (file)
@@ -17,7 +17,7 @@ add_subdirectory(winetests)
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/testdata/)
     file(GLOB_RECURSE TESTDATA_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/testdata/ ${CMAKE_CURRENT_SOURCE_DIR}/testdata/*)
     foreach(item ${TESTDATA_FILES})
-        add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/testdata/${item} DESTINATION reactos/bin/testdata NAME_ON_CD ${item} FOR regtest)
+        add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/testdata/${item} DESTINATION reactos/bin/testdata NAME_ON_CD ${item} FOR all)
     endforeach(item)
 endif()
 
index 7817cb9..e020dfc 100644 (file)
@@ -18,7 +18,7 @@ void Test_AddFontResourceA()
     CHAR szFileNameFont2A[MAX_PATH];
     int result;
 
-    GetCurrentDirectoryA(MAX_PATH,szFileNameA);
+    GetWindowsDirectoryA(szFileNameA,MAX_PATH);
 
     memcpy(szFileNameFont1A,szFileNameA,MAX_PATH );
     strcat(szFileNameFont1A, "\\bin\\testdata\\test.ttf");