Commit c02dd08f authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

reg/tests: Correctly import hex values with no data.

parent 84dda235
......@@ -785,6 +785,9 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
{
WCHAR *line = pos;
if (!*line)
goto set_value;
if (!convert_hex_csv_to_hex(parser, &line))
goto invalid;
......@@ -796,6 +799,7 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
prepare_hex_string_data(parser);
set_value:
set_state(parser, SET_VALUE);
return line;
......
......@@ -2322,10 +2322,10 @@ static void test_import(void)
"\"Wine68i\"=hex(0):\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "Wine68a", REG_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68c", REG_BINARY, NULL, 0, 0);
verify_reg(hkey, "Wine68d", REG_DWORD, NULL, 0, 0);
verify_reg(hkey, "Wine68e", REG_MULTI_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine68e", REG_MULTI_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68f", 0x100, NULL, 0, 0);
verify_reg(hkey, "Wine68g", 0xabcd, NULL, 0, 0);
verify_reg(hkey, "Wine68h", REG_BINARY, NULL, 0, 0);
......@@ -3830,10 +3830,10 @@ static void test_unicode_import(void)
"\"Wine68i\"=hex(0):\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "Wine68a", REG_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine68b", REG_EXPAND_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68c", REG_BINARY, NULL, 0, 0);
verify_reg(hkey, "Wine68d", REG_DWORD, NULL, 0, 0);
verify_reg(hkey, "Wine68e", REG_MULTI_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine68e", REG_MULTI_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine68f", 0x100, NULL, 0, 0);
verify_reg(hkey, "Wine68g", 0xabcd, NULL, 0, 0);
verify_reg(hkey, "Wine68h", REG_BINARY, NULL, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment