testprogs: add DeletePrinterKey test.
authorGünther Deschner <gd@samba.org>
Mon, 1 Mar 2010 19:56:36 +0000 (20:56 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 1 Mar 2010 20:15:33 +0000 (21:15 +0100)
Guenther

testprogs/win32/spoolss/spoolss.c

index 698f024b11ea057f579cccd9d590d183016ccad2..13168f0c12d4cae3918a7bc936973e27ccdb07de 100644 (file)
@@ -1267,6 +1267,29 @@ static BOOL test_DeletePrinterDataEx(struct torture_context *tctx,
 /****************************************************************************
 ****************************************************************************/
 
+static BOOL test_DeletePrinterKey(struct torture_context *tctx,
+                                 LPSTR servername,
+                                 LPSTR keyname,
+                                 HANDLE handle)
+{
+       DWORD err = 0;
+       char tmp[1024];
+
+       torture_comment(tctx, "Testing DeletePrinterKey(%s)", keyname);
+
+       err = DeletePrinterKey(handle, keyname);
+       if (err) {
+               sprintf(tmp, "DeletePrinterKey(%s) failed on [%s], error: %s\n",
+                       keyname, servername, errstr(err));
+               torture_fail(tctx, tmp);
+       }
+
+       return TRUE;
+}
+
+/****************************************************************************
+****************************************************************************/
+
 static BOOL test_PrinterData(struct torture_context *tctx,
                             LPSTR servername,
                             HANDLE handle)