python:tests: Store keys as bytes rather than as lists of ints
[samba.git] / examples / libsmbclient / testctx.c
1 #include <libsmbclient.h>
2 #include <stdlib.h>
3 #include <stdio.h>
4 #include <string.h>
5
6 static void create_and_destroy_context (void)
7 {
8   int i;
9   SMBCCTX *ctx;
10   ctx = smbc_new_context ();
11   /* Both should do the same thing */
12   smbc_setOptionDebugToStderr(ctx, 1);
13   smbc_option_set(ctx, strdup("debug_to_stderr"), 1);
14   smbc_setDebug(ctx, 1);
15   i = smbc_getDebug(ctx);
16   if (i != 1) { 
17           printf("smbc_getDebug() did not return debug level set\n");
18           exit(1);
19   }
20   if (!smbc_getOptionDebugToStderr(ctx)) {
21           printf("smbc_setOptionDebugToStderr() did not stick\n");
22           exit(1);
23   }
24   smbc_init_context (ctx);
25   smbc_free_context (ctx, 1);
26 }
27
28 int main (int argc, char **argv)
29 {
30   create_and_destroy_context ();
31   create_and_destroy_context ();
32   return 0;
33 }