diff options
Diffstat (limited to 'pidl/tests/ndr_compat.pl')
-rwxr-xr-x | pidl/tests/ndr_compat.pl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pidl/tests/ndr_compat.pl b/pidl/tests/ndr_compat.pl new file mode 100755 index 0000000..06f7efb --- /dev/null +++ b/pidl/tests/ndr_compat.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij <jelmer@samba.org> +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests => 2; +use FindBin qw($RealBin); +use lib "$RealBin"; +use Util; +use Parse::Pidl; +use Parse::Pidl::IDL; + +sub parse_idl($) +{ + my $idl = shift; + my $pidl = Parse::Pidl::IDL::parse_string("interface echo { $idl }; ", "nofile"); + Parse::Pidl::NDR::Parse($pidl); +} + +test_warnings("", sub {parse_idl("void x();"); }); +test_warnings("nofile:0: top-level [out] pointer `x' is not a [ref] pointer\n", sub {parse_idl("void x([out,unique] int *x);"); }); |