From e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:34:10 +0200 Subject: Adding upstream version 4.2.2. Signed-off-by: Daniel Baumann --- tools/pidl/tests/test_util.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tools/pidl/tests/test_util.pl (limited to 'tools/pidl/tests/test_util.pl') diff --git a/tools/pidl/tests/test_util.pl b/tools/pidl/tests/test_util.pl new file mode 100755 index 00000000..2d59f628 --- /dev/null +++ b/tools/pidl/tests/test_util.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij +# Published under the GNU General Public License +use strict; + +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 {}); + -- cgit v1.2.3