From b36a0aedd2dbe47429bfc2dda6ea802a92efb526 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 13 Jan 2008 00:05:24 +0100 Subject: pidl: Avoid accidently filling in empty body for types without body. (This used to be commit 1fe5c1ad07c574dc094f59f728025dfcafa0cf22) --- source4/pidl/tests/parse_idl.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/pidl/tests/parse_idl.pl') diff --git a/source4/pidl/tests/parse_idl.pl b/source4/pidl/tests/parse_idl.pl index 93f772ef41..9d43ddccc7 100755 --- a/source4/pidl/tests/parse_idl.pl +++ b/source4/pidl/tests/parse_idl.pl @@ -4,7 +4,7 @@ # Published under the GNU General Public License use strict; -use Test::More tests => 65 * 2 + 6; +use Test::More tests => 65 * 2 + 7; use FindBin qw($RealBin); use lib "$RealBin"; use Util qw(test_errors); @@ -153,3 +153,12 @@ is_deeply($x, [ { 'FILE' => '', 'NAME' => 'foo', 'DATA' => [ { 'FILE' => '', 'LINE' => 0, 'NAME' => 'y', 'TYPE' => 'TYPEDEF', DATA => { TYPE => 'BITMAP', NAME => 'x' } } ], 'TYPE' => 'INTERFACE', 'LINE' => 0 } ]); + + +# A typedef of a union with no body +$x = Parse::Pidl::IDL::parse_string("interface foo { typedef union x y; }", ""); + +is_deeply($x, + [ { 'FILE' => '', 'NAME' => 'foo', 'DATA' => [ + { 'FILE' => '', 'LINE' => 0, 'NAME' => 'y', 'TYPE' => 'TYPEDEF', DATA => { TYPE => 'UNION', NAME => 'x' } } ], + 'TYPE' => 'INTERFACE', 'LINE' => 0 } ]); -- cgit