André Hentschel : shell32/tests: Fix checking the child strings.

Alexandre Julliard julliard at winehq.org
Wed Aug 31 13:19:22 CDT 2011


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Aug 30 21:20:40 2011 +0200

shell32/tests: Fix checking the child strings.

---

 dlls/shell32/tests/shlexec.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 31b0930..bae0c21 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -680,6 +680,11 @@ static void _okChildString(const char* file, int line, const char* key, const ch
 {
     char* result;
     result=getChildString("Arguments", key);
+    if (!result)
+    {
+        ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected);
+        return;
+    }
     ok_(file, line)(lstrcmpiA(result, expected) == 0,
                     "%s expected '%s', got '%s'\n", key, expected, result);
 }
@@ -688,6 +693,11 @@ static void _okChildPath(const char* file, int line, const char* key, const char
 {
     char* result;
     result=getChildString("Arguments", key);
+    if (!result)
+    {
+        ok_(file, line)(FALSE, "%s expected '%s', but key not found or empty\n", key, expected);
+        return;
+    }
     ok_(file, line)(StrCmpPath(result, expected) == 0,
                     "%s expected '%s', got '%s'\n", key, expected, result);
 }




More information about the wine-cvs mailing list