summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-25 09:55:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:53 -0500
commitcb8fceab28c71c7513e0732e1a9e2c9f61bfa31b (patch)
tree99012f3ba8225d92b677873230bd104c9e39bf1e /source4/pidl/tests
parent882c5a8b43632517d7b6340b17174721a8b7a388 (diff)
downloadsamba-cb8fceab28c71c7513e0732e1a9e2c9f61bfa31b.tar.gz
samba-cb8fceab28c71c7513e0732e1a9e2c9f61bfa31b.tar.bz2
samba-cb8fceab28c71c7513e0732e1a9e2c9f61bfa31b.zip
r21532: Add tests for StripPrefixes utility function.
(This used to be commit 365052555e0e9224bdfda0c2a10f78cbeee5b06c)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/wireshark-ndr.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/pidl/tests/wireshark-ndr.pl b/source4/pidl/tests/wireshark-ndr.pl
index 574060f8ea..f5229560bd 100755
--- a/source4/pidl/tests/wireshark-ndr.pl
+++ b/source4/pidl/tests/wireshark-ndr.pl
@@ -5,12 +5,12 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 6;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
use Parse::Pidl::Util qw(MyDumper);
-use Parse::Pidl::Wireshark::NDR qw(field2name %res PrintIdl);
+use Parse::Pidl::Wireshark::NDR qw(field2name %res PrintIdl StripPrefixes);
is("Access Mask", field2name("access_mask"));
is("Accessmask", field2name("AccessMask"));
@@ -21,3 +21,7 @@ is("/* IDL: foo */
/* IDL: bar */
", $res{code});
+
+is("bla_foo", StripPrefixes("bla_foo", []));
+is("foo", StripPrefixes("bla_foo", ["bla"]));
+is("foo_bla", StripPrefixes("foo_bla", ["bla"]));