From a4c986b3a2f5e3299e2e2886cc7bc9c8766dc534 Mon Sep 17 00:00:00 2001
From: Jiajin Cui <cuijiajin@uniontech.com>
Date: Sun, 28 Jun 2020 17:56:49 +0800
Subject: [PATCH 1/2] kernel32/tests: Add test for ini filename is NULL.

Signed-off-by: Jiajin Cui <cuijiajin@uniontech.com>
---
 dlls/kernel32/tests/profile.c | 43 ++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index ce82a746e7..36cc280369 100644
--- a/dlls/kernel32/tests/profile.c
+++ b/dlls/kernel32/tests/profile.c
@@ -45,29 +45,56 @@ static void test_profile_int(void)
 {
     struct _profileInt profileInt[]={
          { NULL,    NULL, NULL,          NULL,     70, 0},           /*  0 */
+         { SECTION, NULL, NULL,          NULL,     -1, 4294967295U},
+         { SECTION, NULL, NULL,          NULL,      1, 1},
+         { NULL,    KEY,  NULL,          NULL,     -1, 0},
+         { NULL,    KEY,  NULL,          NULL,      1, 0},
+         { SECTION, KEY,  NULL,          NULL,     -1, 4294967295U}, /*  5 */
+         { SECTION, KEY,  NULL,          NULL,      1, 1},
          { NULL,    NULL, NULL,          TESTFILE, -1, 4294967295U},
          { NULL,    NULL, NULL,          TESTFILE,  1, 1},
          { SECTION, NULL, NULL,          TESTFILE, -1, 4294967295U},
-         { SECTION, NULL, NULL,          TESTFILE,  1, 1},
-         { NULL,    KEY,  NULL,          TESTFILE, -1, 4294967295U}, /*  5 */
+         { SECTION, NULL, NULL,          TESTFILE,  1, 1},           /* 10 */
+         { NULL,    KEY,  NULL,          TESTFILE, -1, 4294967295U},
          { NULL,    KEY,  NULL,          TESTFILE,  1, 1},
          { SECTION, KEY,  NULL,          TESTFILE, -1, 4294967295U},
          { SECTION, KEY,  NULL,          TESTFILE,  1, 1},
+         { NULL,    NULL, "1",           NULL,     70, 0},           /* 15 */
+         { SECTION, NULL, "-1",          NULL,     -1, 0},
+         { SECTION, NULL, "-1",          NULL,      1, 0},
+         { NULL,    KEY,  "-1",          NULL,     -1, 0},
+         { NULL,    KEY,  "-1",          NULL,      1, 0},
+         { SECTION, KEY,  "-1",          NULL,     -1, 4294967295U}, /* 20 */
+         { SECTION, KEY,  "-1",          NULL,      1, 4294967295U},
+         { SECTION, KEY,  "1",           NULL,     -1, 1},
+         { SECTION, KEY,  "1",           NULL,      1, 1},
+         { SECTION, KEY,  "+1",          NULL,     -1, 1},
+         { SECTION, KEY,  "+1",          NULL,      1, 1},           /* 25 */
+         { SECTION, KEY,  "4294967296",  NULL,     -1, 0},
+         { SECTION, KEY,  "4294967296",  NULL,      1, 0},
+         { SECTION, KEY,  "4294967297",  NULL,     -1, 1},
+         { SECTION, KEY,  "4294967297",  NULL,      1, 1},
+         { SECTION, KEY,  "-4294967297", NULL,     -1, 4294967295U}, /* 30 */
+         { SECTION, KEY,  "-4294967297", NULL,      1, 4294967295U},
+         { SECTION, KEY,  "42A94967297", NULL,     -1, 42},
+         { SECTION, KEY,  "42A94967297", NULL,      1, 42},
+         { SECTION, KEY,  "B4294967297", NULL,     -1, 0},
+         { SECTION, KEY,  "B4294967297", NULL,      1, 0},           /* 35 */
          { SECTION, KEY,  "-1",          TESTFILE, -1, 4294967295U},
-         { SECTION, KEY,  "-1",          TESTFILE,  1, 4294967295U}, /* 10 */
+         { SECTION, KEY,  "-1",          TESTFILE,  1, 4294967295U},
          { SECTION, KEY,  "1",           TESTFILE, -1, 1},
          { SECTION, KEY,  "1",           TESTFILE,  1, 1},
-         { SECTION, KEY,  "+1",          TESTFILE, -1, 1},
+         { SECTION, KEY,  "+1",          TESTFILE, -1, 1},           /* 40 */
          { SECTION, KEY,  "+1",          TESTFILE,  1, 1},
-         { SECTION, KEY,  "4294967296",  TESTFILE, -1, 0},           /* 15 */
+         { SECTION, KEY,  "4294967296",  TESTFILE, -1, 0},
          { SECTION, KEY,  "4294967296",  TESTFILE,  1, 0},
          { SECTION, KEY,  "4294967297",  TESTFILE, -1, 1},
-         { SECTION, KEY,  "4294967297",  TESTFILE,  1, 1},
+         { SECTION, KEY,  "4294967297",  TESTFILE,  1, 1},           /* 45 */
          { SECTION, KEY,  "-4294967297", TESTFILE, -1, 4294967295U},
-         { SECTION, KEY,  "-4294967297", TESTFILE,  1, 4294967295U}, /* 20 */
+         { SECTION, KEY,  "-4294967297", TESTFILE,  1, 4294967295U},
          { SECTION, KEY,  "42A94967297", TESTFILE, -1, 42},
          { SECTION, KEY,  "42A94967297", TESTFILE,  1, 42},
-         { SECTION, KEY,  "B4294967297", TESTFILE, -1, 0},
+         { SECTION, KEY,  "B4294967297", TESTFILE, -1, 0},           /* 50 */
          { SECTION, KEY,  "B4294967297", TESTFILE,  1, 0},
     };
     int i, num_test = ARRAY_SIZE(profileInt);
-- 
2.20.1

