1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/pidl/tests/ndr_compat.pl
Douglas Bagnall efef4366f1 pidl: use perl warnings
Warnings are good. If we turn on warnings with 'use warnings', we will
see bugs that have lain latent for years.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10 02:53:34 +00:00

23 lines
602 B
Perl
Executable File

#!/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);"); });