diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-26 19:58:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:37 -0500 |
commit | f96b1778a42d8388fd1c6384cd7c90b6e4bcd437 (patch) | |
tree | 94d53311f479107ecdb760a926d86d9b9114959b /source4/lib/registry/tests | |
parent | 92be36316d91b594ca6c3d1ba3443209d9bc6a5b (diff) | |
download | samba-f96b1778a42d8388fd1c6384cd7c90b6e4bcd437.tar.gz samba-f96b1778a42d8388fd1c6384cd7c90b6e4bcd437.tar.bz2 samba-f96b1778a42d8388fd1c6384cd7c90b6e4bcd437.zip |
r24674: Make sure results are always on a new line, fix typo in test name.
(This used to be commit 40c1635b39b4acff0acecc734583daa0217215ce)
Diffstat (limited to 'source4/lib/registry/tests')
-rw-r--r-- | source4/lib/registry/tests/registry.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c index 851f74fa3c..0fda7587dc 100644 --- a/source4/lib/registry/tests/registry.c +++ b/source4/lib/registry/tests/registry.c @@ -47,6 +47,22 @@ static bool test_get_predefined(struct torture_context *tctx, } /** + * Test obtaining a predefined key. + */ +static bool test_get_predefined_unknown(struct torture_context *tctx, + const void *_data) +{ + const struct registry_context *rctx = _data; + struct registry_key *root; + WERROR error; + + error = reg_get_predefined_key(rctx, 1337, &root); + torture_assert_werr_equal(tctx, error, WERR_BADFILE, + "getting predefined key failed"); + return true; +} + +/** * Test creating a new subkey */ static bool test_create_subkey(struct torture_context *tctx, @@ -200,6 +216,9 @@ static bool test_flush_key(struct torture_context *tctx, const void *_data) error = reg_key_flush(subkey); torture_assert_werr_ok(tctx, error, "flush key"); + torture_assert_werr_equal(tctx, reg_key_flush(NULL), + WERR_INVALID_PARAM, "flush key"); + return true; } @@ -457,6 +476,8 @@ static void tcase_add_tests(struct torture_tcase *tcase) torture_tcase_add_simple_test(tcase, "list_subkeys", test_list_subkeys); torture_tcase_add_simple_test(tcase, "get_predefined_key", test_get_predefined); + torture_tcase_add_simple_test(tcase, "get_predefined_key", + test_get_predefined_unknown); torture_tcase_add_simple_test(tcase, "create_key", test_create_subkey); torture_tcase_add_simple_test(tcase, "create_key", test_create_nested_subkey); |