summaryrefslogtreecommitdiff
path: root/source4/param/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:23 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:54 +0100
commit5991108c81afa820f811d8520c51d42e9ca0ec49 (patch)
tree4d91abff279f1346f25e0420552416cb5f3a0bc1 /source4/param/tests
parentfd88c3ca2480fabb90c0d8fc701394bb59f99481 (diff)
downloadsamba-5991108c81afa820f811d8520c51d42e9ca0ec49.tar.gz
samba-5991108c81afa820f811d8520c51d42e9ca0ec49.tar.bz2
samba-5991108c81afa820f811d8520c51d42e9ca0ec49.zip
r26349: More tests.
(This used to be commit c440b130a9d57c1928fb5aef34fa4c00c7e46cff)
Diffstat (limited to 'source4/param/tests')
-rw-r--r--source4/param/tests/loadparm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/param/tests/loadparm.c b/source4/param/tests/loadparm.c
index fa7d7fe176..1d689c0a9a 100644
--- a/source4/param/tests/loadparm.c
+++ b/source4/param/tests/loadparm.c
@@ -97,6 +97,17 @@ static bool test_lp_parm_bytes(struct torture_context *tctx)
return true;
}
+static bool test_lp_do_service_parameter(struct torture_context *tctx)
+{
+ struct loadparm_context *lp_ctx = loadparm_init(tctx);
+ struct loadparm_service *service = lp_add_service(lp_ctx, &sDefault, "foo");
+ torture_assert(tctx, lp_do_service_parameter(lp_ctx, service,
+ "some:thing", "foo"), "lp_set_option failed");
+ torture_assert_str_equal(tctx, lp_parm_string(lp_ctx, service, "some", "thing"), "foo",
+ "invalid parametric option");
+ return true;
+}
+
struct torture_suite *torture_local_loadparm(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "LOADPARM");
@@ -109,6 +120,7 @@ struct torture_suite *torture_local_loadparm(TALLOC_CTX *mem_ctx)
torture_suite_add_simple_test(suite, "set_lp_parm_bool", test_lp_parm_bool);
torture_suite_add_simple_test(suite, "set_lp_parm_int", test_lp_parm_int);
torture_suite_add_simple_test(suite, "set_lp_parm_bytes", test_lp_parm_bytes);
+ torture_suite_add_simple_test(suite, "service_parameter", test_lp_do_service_parameter);
return suite;
}