From b0d209087939c0de765349c80a22884b956f3f0f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 22 Apr 2007 14:19:22 +0000 Subject: r22457: Fix tests for Samba3 client generator. (This used to be commit cf5162ad100c1a8201d3309549c8ff0d3bd5a732) --- source4/pidl/tests/samba3-cli.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/pidl/tests') 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; -- cgit