summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-01 20:15:51 +0100
committerGünther Deschner <gd@samba.org>2010-03-01 21:15:33 +0100
commit61568cf4c8f12148390435cba7845acf0b00e941 (patch)
treebb21044dab40d18d9b47bd5ecabb57984a3aaa1d
parent32371e9ba6b93e6a235054a2db7a34838443e86c (diff)
downloadsamba-61568cf4c8f12148390435cba7845acf0b00e941.tar.gz
samba-61568cf4c8f12148390435cba7845acf0b00e941.tar.bz2
samba-61568cf4c8f12148390435cba7845acf0b00e941.zip
testprogs: allow to test a single printer when given on the cmdline.
-rw-r--r--testprogs/win32/spoolss/spoolss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c
index 38eb7ed7d7..2d3c5588ad 100644
--- a/testprogs/win32/spoolss/spoolss.c
+++ b/testprogs/win32/spoolss/spoolss.c
@@ -1339,6 +1339,15 @@ int main(int argc, char *argv[])
defaults_use.pDevMode = NULL;
defaults_use.DesiredAccess = PRINTER_ACCESS_USE;
+ if ((servername[0] == '\\') && (servername[1] == '\\')) {
+ LPSTR p = servername+2;
+ LPSTR p2;
+ if ((p2 = strchr(p, '\\')) != NULL) {
+ ret = test_OnePrinter(tctx, servername, architecture, NULL);
+ goto done;
+ }
+ }
+
ret &= test_EnumPrinters(tctx, servername);
ret &= test_EnumDrivers(tctx, servername, architecture);
ret &= test_OpenPrinter(tctx, servername, NULL, &server_handle);
@@ -1354,6 +1363,7 @@ int main(int argc, char *argv[])
ret &= test_GetPrinterDriverDirectory(tctx, servername, architecture);
ret &= test_EachPrinter(tctx, servername, architecture, NULL);
+ done:
if (!ret) {
if (tctx->last_reason) {
fprintf(stderr, "failed: %s\n", tctx->last_reason);