summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-17 23:38:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:28 -0500
commitec587914ed4df87b6aedab129fb59248b137f07b (patch)
tree0193c4debd18a0af2d83a1d293fc52b3a9c57896 /source4/pidl/tests
parent6cb2ce4275b727e220ab24bd22aa65f3f47e0557 (diff)
downloadsamba-ec587914ed4df87b6aedab129fb59248b137f07b.tar.gz
samba-ec587914ed4df87b6aedab129fb59248b137f07b.tar.bz2
samba-ec587914ed4df87b6aedab129fb59248b137f07b.zip
r21411: Add some simple tests for the wireshark NDR generator.
(This used to be commit 361977448210dfd889abca19b520cd259b9d0855)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/wireshark-ndr.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/source4/pidl/tests/wireshark-ndr.pl b/source4/pidl/tests/wireshark-ndr.pl
new file mode 100755
index 0000000000..574060f8ea
--- /dev/null
+++ b/source4/pidl/tests/wireshark-ndr.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
+# Published under the GNU General Public License
+# test parsing wireshark conformance files
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+use FindBin qw($RealBin);
+use lib "$RealBin";
+use Util;
+use Parse::Pidl::Util qw(MyDumper);
+use Parse::Pidl::Wireshark::NDR qw(field2name %res PrintIdl);
+
+is("Access Mask", field2name("access_mask"));
+is("Accessmask", field2name("AccessMask"));
+
+$res{code} = "";
+PrintIdl("foo\nbar\n");
+is("/* IDL: foo */
+/* IDL: bar */
+
+", $res{code});