From fc4d5e2301a39b83801feaa2747641ddbbcec918 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thfabba@gmx.de>
Date: Sun, 25 Dec 2011 14:01:59 +0100
Subject: kernel32/tests: test that GetModuleFileName returns an absolute path

---
 dlls/kernel32/tests/Makefile.in |    2 +-
 dlls/kernel32/tests/module.c    |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/tests/Makefile.in b/dlls/kernel32/tests/Makefile.in
index dce27db..2ce3ec6 100644
--- a/dlls/kernel32/tests/Makefile.in
+++ b/dlls/kernel32/tests/Makefile.in
@@ -1,5 +1,5 @@
 TESTDLL   = kernel32.dll
-IMPORTS   = user32 advapi32
+IMPORTS   = user32 advapi32 shlwapi
 
 C_SRCS = \
 	actctx.c \
diff --git a/dlls/kernel32/tests/module.c b/dlls/kernel32/tests/module.c
index e86b63b..bd3dbcd 100644
--- a/dlls/kernel32/tests/module.c
+++ b/dlls/kernel32/tests/module.c
@@ -20,6 +20,7 @@
 
 #include "wine/test.h"
 #include <windows.h>
+#include <shlwapi.h>
 
 static DWORD (WINAPI *pGetDllDirectoryA)(DWORD,LPSTR);
 static DWORD (WINAPI *pGetDllDirectoryW)(DWORD,LPWSTR);
@@ -55,6 +56,7 @@ static void testGetModuleFileName(const char* name)
        broken(GetLastError() == 0xdeadbeef), /* <= XP SP3 */
        "LastError was not reset: %u\n", GetLastError());
     ok(len1A > 0, "Getting module filename for handle %p\n", hMod);
+    ok(!PathIsRelativeA(bufA), "Got relative path: %s\n", bufA);
 
     if (is_unicode_enabled)
     {
@@ -65,6 +67,7 @@ static void testGetModuleFileName(const char* name)
            broken(GetLastError() == 0xdeadbeef), /* <= XP SP3 */
            "LastError was not reset: %u\n", GetLastError());
         ok(len1W > 0, "Getting module filename for handle %p\n", hMod);
+        ok(!PathIsRelativeW(bufW), "Got relative path: %s\n", wine_dbgstr_w(bufW));
     }
 
     ok(len1A == strlen(bufA), "Unexpected length of GetModuleFilenameA (%d/%d)\n", len1A, lstrlenA(bufA));
-- 
1.7.1.GIT
