summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-06 00:57:14 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-06 00:57:14 +0200
commitc30f9add8cc5b060b73381f53671ecd01c31cdd8 (patch)
tree59674b7882bf7b6c1bd3d7b5ebd427fcdfaa72f1 /source4/pidl/tests
parentf5e6534ee7934c12eb19dca307f1732d73c86ec5 (diff)
downloadsamba-c30f9add8cc5b060b73381f53671ecd01c31cdd8.tar.gz
samba-c30f9add8cc5b060b73381f53671ecd01c31cdd8.tar.bz2
samba-c30f9add8cc5b060b73381f53671ecd01c31cdd8.zip
Add test for authservice struct.
(This used to be commit da8b8364b06a79a10d4ebdc0e451463b3105730e)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/samba-ndr.pl16
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/pidl/tests/samba-ndr.pl b/source4/pidl/tests/samba-ndr.pl
index a14111961f..114ca01cfa 100755
--- a/source4/pidl/tests/samba-ndr.pl
+++ b/source4/pidl/tests/samba-ndr.pl
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More tests => 31;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -277,3 +277,17 @@ $generator->ParseElementPrint({ NAME => "x", TYPE => "uint32", REPRESENTATION_TY
PROPERTIES => { value => "23" },
LEVELS => [ { TYPE => "DATA", DATA_TYPE => "uint32"} ]}, "var", { "x" => "r->foobar" } );
is($generator->{res}, "ndr_print_uint32(ndr, \"x\", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?23:var);\n");
+
+$generator = new Parse::Pidl::Samba4::NDR::Parser();
+$generator->AuthServiceStruct("bridge", "\"rot13\",\"onetimepad\"");
+is($generator->{res}, "static const char * const bridge_authservice_strings[] = {
+ \"rot13\",
+ \"onetimepad\",
+};
+
+static const struct ndr_interface_string_array bridge_authservices = {
+ .count = 2,
+ .names = bridge_authservice_strings
+};
+
+");