Bruno Jesus : kernel32/tests: Show that ini cache must not be used if file no longer exists.

Alexandre Julliard julliard at winehq.org
Wed Mar 28 12:47:05 CDT 2012


Module: wine
Branch: master
Commit: a4e3268886c0dc719ef2882ce9830195fbb5ca08
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a4e3268886c0dc719ef2882ce9830195fbb5ca08

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Wed Mar 28 02:26:42 2012 -0300

kernel32/tests: Show that ini cache must not be used if file no longer exists.

---

 dlls/kernel32/tests/profile.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index 44a7927..745f3b5 100644
--- a/dlls/kernel32/tests/profile.c
+++ b/dlls/kernel32/tests/profile.c
@@ -500,6 +500,13 @@ static void test_profile_refresh(void)
 
     /* This also deletes the file */
     CloseHandle(h);
+
+    /* Cache must be invalidated if file no longer exists and default must be returned */
+    SetLastError(0xdeadbeef);
+    res = GetPrivateProfileInt(SECTION, KEY, 421, testfile);
+    todo_wine ok( res == 421 ||
+        broken(res == 0 && GetLastError() == 0xdeadbeef), /* Win9x, WinME */
+        "Got %d instead of 421\n", res);
 }
 
 static void create_test_file(LPCSTR name, LPCSTR data, DWORD size)




More information about the wine-cvs mailing list