summaryrefslogtreecommitdiffstats
path: root/pidl/tests/test_util.pl
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/tests/test_util.pl')
-rwxr-xr-xpidl/tests/test_util.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/pidl/tests/test_util.pl b/pidl/tests/test_util.pl
new file mode 100755
index 0000000..93addce
--- /dev/null
+++ b/pidl/tests/test_util.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 => 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 {});
+