summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tests/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tests/generic.c')
-rw-r--r--source4/lib/registry/tests/generic.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c
index 3de7602e53..a881c3d1d2 100644
--- a/source4/lib/registry/tests/generic.c
+++ b/source4/lib/registry/tests/generic.c
@@ -35,6 +35,8 @@ static bool test_str_regtype(struct torture_context *ctx)
"REG_SZ", "REG_SZ failed");
torture_assert_str_equal(ctx, str_regtype(4),
"REG_DWORD", "REG_DWORD failed");
+ torture_assert_str_equal(ctx, str_regtype(11),
+ "REG_QWORD", "REG_QWORD failed");
return true;
}
@@ -44,12 +46,22 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx)
{
uint32_t d = 0x20;
DATA_BLOB db = { (uint8_t *)&d, sizeof(d) };
- torture_assert_str_equal(ctx, "0x20",
+ torture_assert_str_equal(ctx, "0x00000020",
reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_DWORD, db),
"dword failed");
return true;
}
+static bool test_reg_val_data_string_qword(struct torture_context *ctx)
+{
+ uint64_t d = 0x20;
+ DATA_BLOB db = { (uint8_t *)&d, sizeof(d) };
+ torture_assert_str_equal(ctx, "0x0000000000000020",
+ reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_QWORD, db),
+ "qword failed");
+ return true;
+}
+
static bool test_reg_val_data_string_sz(struct torture_context *ctx)
{
DATA_BLOB db;
@@ -119,6 +131,8 @@ struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx)
test_str_regtype);
torture_suite_add_simple_test(suite, "reg_val_data_string dword",
test_reg_val_data_string_dword);
+ torture_suite_add_simple_test(suite, "reg_val_data_string qword",
+ test_reg_val_data_string_qword);
torture_suite_add_simple_test(suite, "reg_val_data_string sz",
test_reg_val_data_string_sz);
torture_suite_add_simple_test(suite, "reg_val_data_string binary",