summaryrefslogtreecommitdiff
path: root/source4/pidl/tests/test_util.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-05 14:55:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:51 -0500
commit2963c639871665ced7ee0b5afad3406e7496b233 (patch)
tree3ec42ed5e96e027cd2139fa35b1eaf33cb49639e /source4/pidl/tests/test_util.pl
parent306dc32687e68dbf388187ec927444fb4a139158 (diff)
downloadsamba-2963c639871665ced7ee0b5afad3406e7496b233.tar.gz
samba-2963c639871665ced7ee0b5afad3406e7496b233.tar.bz2
samba-2963c639871665ced7ee0b5afad3406e7496b233.zip
r20547: Add tests for expected errors/warnings.
(This used to be commit 2d960d4d7b0bc39c3ec4c2face546adc2cb345ee)
Diffstat (limited to 'source4/pidl/tests/test_util.pl')
-rwxr-xr-xsource4/pidl/tests/test_util.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/pidl/tests/test_util.pl b/source4/pidl/tests/test_util.pl
new file mode 100755
index 0000000000..e6133727af
--- /dev/null
+++ b/source4/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 Test::More tests => 6;
+use FindBin qw($RealBin);
+use lib "$RealBin/../lib";
+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 {});
+