testprogs: add DeletePrinterDataEx test.
authorGünther Deschner <gd@samba.org>
Mon, 1 Mar 2010 16:42:19 +0000 (17:42 +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 2d3c5588ad5dab1c1bf9de0966c42ec300d5f2da..698f024b11ea057f579cccd9d590d183016ccad2 100644 (file)
@@ -1243,6 +1243,30 @@ static BOOL test_GetPrinterDataEx(struct torture_context *tctx,
 /****************************************************************************
 ****************************************************************************/
 
 /****************************************************************************
 ****************************************************************************/
 
+static BOOL test_DeletePrinterDataEx(struct torture_context *tctx,
+                                    LPSTR servername,
+                                    LPSTR keyname,
+                                    LPSTR valuename,
+                                    HANDLE handle)
+{
+       DWORD err = 0;
+       char tmp[1024];
+
+       torture_comment(tctx, "Testing DeletePrinterDataEx(%s - %s)", keyname, valuename);
+
+       err = DeletePrinterDataEx(handle, keyname, valuename);
+       if (err) {
+               sprintf(tmp, "DeletePrinterDataEx(%s - %s) failed on [%s], error: %s\n",
+                       keyname, valuename, servername, errstr(err));
+               torture_fail(tctx, tmp);
+       }
+
+       return TRUE;
+}
+
+/****************************************************************************
+****************************************************************************/
+
 static BOOL test_PrinterData(struct torture_context *tctx,
                             LPSTR servername,
                             HANDLE handle)
 static BOOL test_PrinterData(struct torture_context *tctx,
                             LPSTR servername,
                             HANDLE handle)