1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/pidl/tests/test_util.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
551 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 => 6;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util qw(test_warnings test_errors);
use Parse::Pidl qw(warning error);
test_warnings("", sub {});
test_warnings("x:1: msg\n", sub { warning({FILE => "x", LINE => 1}, "msg"); });
test_warnings("", sub {});
test_errors("", sub {});
test_errors("x:1: msg\n", sub { error({FILE => "x", LINE => 1}, "msg"); });
test_errors("", sub {});