summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rap/printing.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/torture/rap/printing.c b/source4/torture/rap/printing.c
index b3119cf0e9..62d5da98d7 100644
--- a/source4/torture/rap/printing.c
+++ b/source4/torture/rap/printing.c
@@ -472,6 +472,29 @@ static bool test_netprintjobsetinfo(struct torture_context *tctx,
return true;
}
+static bool test_netprintdestenum(struct torture_context *tctx,
+ struct smbcli_state *cli)
+{
+ struct rap_NetPrintDestEnum r;
+ int i;
+ uint16_t levels[] = { 0, 1, 2, 3 };
+
+ for (i=0; i < ARRAY_SIZE(levels); i++) {
+
+ r.in.level = levels[i];
+ r.in.bufsize = 8192;
+
+ torture_comment(tctx,
+ "Testing rap_NetPrintDestEnum level %d\n", r.in.level);
+
+ torture_assert_ntstatus_ok(tctx,
+ smbcli_rap_netprintdestenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ "smbcli_rap_netprintdestenum failed");
+ }
+
+ return true;
+}
+
static bool test_rap_print(struct torture_context *tctx,
struct smbcli_state *cli)
{
@@ -499,6 +522,7 @@ struct torture_suite *torture_rap_printing(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "rap_printjob_getinfo", test_netprintjobgetinfo);
torture_suite_add_1smb_test(suite, "rap_printjob_setinfo", test_netprintjobsetinfo);
torture_suite_add_1smb_test(suite, "rap_printjob", test_netprintjob);
+ torture_suite_add_1smb_test(suite, "rap_printdest_enum", test_netprintdestenum);
return suite;
}