summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-04-22 14:19:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:23 -0500
commitb0d209087939c0de765349c80a22884b956f3f0f (patch)
treec22fbe48204f1870c1019ab1e9d8d62d9ca24492 /source4/pidl/tests
parent68d92f0a123374972ee2aa54dd708f089cb59837 (diff)
downloadsamba-b0d209087939c0de765349c80a22884b956f3f0f.tar.gz
samba-b0d209087939c0de765349c80a22884b956f3f0f.tar.bz2
samba-b0d209087939c0de765349c80a22884b956f3f0f.zip
r22457: Fix tests for Samba3 client generator.
(This used to be commit cf5162ad100c1a8201d3309549c8ff0d3bd5a732)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/samba3-cli.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/pidl/tests/samba3-cli.pl b/source4/pidl/tests/samba3-cli.pl
index 1d1bae8550..c5537c145e 100755
--- a/source4/pidl/tests/samba3-cli.pl
+++ b/source4/pidl/tests/samba3-cli.pl
@@ -9,8 +9,7 @@ use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
use Parse::Pidl::Util qw(MyDumper);
-use Parse::Pidl::Samba3::ClientNDR qw(GenerateFunctionInEnv ParseFunction $res
- $res_hdr);
+use Parse::Pidl::Samba3::ClientNDR qw(GenerateFunctionInEnv ParseFunction);
# Make sure GenerateFunctionInEnv and GenerateFunctionOutEnv work
my $fn = { ELEMENTS => [ { DIRECTION => ["in"], NAME => "foo" } ] };
@@ -22,9 +21,11 @@ is_deeply({ "foo" => "r.in.foo" }, GenerateFunctionInEnv($fn));
$fn = { ELEMENTS => [ { DIRECTION => ["out"], NAME => "foo" } ] };
is_deeply({ }, GenerateFunctionInEnv($fn));
+my $x = new Parse::Pidl::Samba3::ClientNDR();
+
$fn = { NAME => "bar", ELEMENTS => [ ] };
-ParseFunction("foo", $fn);
-is($res, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+$x->ParseFunction("foo", $fn);
+is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
{
\tstruct bar r;
\tNTSTATUS status;