diff options
author | Günther Deschner <gd@samba.org> | 2010-02-09 15:59:29 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-02-09 16:39:35 +0100 |
commit | bf7156b6dd89a7f4cb33fac4b13d66e9a099661e (patch) | |
tree | ec4e6c5132288a6206ac5335bca043de41cf1b75 | |
parent | dcad5447cf32eba0296bdca07668333004cc50ef (diff) | |
download | samba-bf7156b6dd89a7f4cb33fac4b13d66e9a099661e.tar.gz samba-bf7156b6dd89a7f4cb33fac4b13d66e9a099661e.tar.bz2 samba-bf7156b6dd89a7f4cb33fac4b13d66e9a099661e.zip |
testprogs: print datatypes info levels in EnumPrintProcessorDatatypes() spoolss tests.
Guenther
-rw-r--r-- | testprogs/win32/spoolss/printlib.c | 38 | ||||
-rw-r--r-- | testprogs/win32/spoolss/spoolss.c | 4 |
2 files changed, 42 insertions, 0 deletions
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c index a5d2342ce8..11c672f598 100644 --- a/testprogs/win32/spoolss/printlib.c +++ b/testprogs/win32/spoolss/printlib.c @@ -668,6 +668,44 @@ void print_printprocessor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) } } +void print_datatypes_info_1(PDATATYPES_INFO_1 info) +{ + printf("\tDataTypes Name\t= %s\n", info->pName); + + return; +} + +void print_datatypes_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PDATATYPES_INFO_1 buffer1 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PDATATYPES_INFO_1)buffer; + break; + default: + break; + } + + printf("DataTypes Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; i<count; i++) { + print_datatypes_info_1(&buffer1[i]); + printf("\n"); + } + break; + default: + break; + } +} + void print_driver_info_1(PDRIVER_INFO_1 info) { printf("\tDriver Name\t= %s\n\n", info->pName); diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index 4e1672e67c..ae8fc0fb12 100644 --- a/testprogs/win32/spoolss/spoolss.c +++ b/testprogs/win32/spoolss/spoolss.c @@ -466,6 +466,10 @@ static BOOL test_EnumPrintProcessorDatatypes(struct torture_context *tctx, } } + if (tctx->print) { + print_datatypes_info_bylevel(levels[i], buffer, returned); + } + free(buffer); buffer = NULL; } |