summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-12 23:38:05 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-12 23:38:05 +0100
commit3f9812f951bb110700077503a96b9d7d8cfdb2dc (patch)
tree52c01a3e8125d6e22c051a4a9285ca186473e469 /source4/pidl/tests
parentad559581406313741276e39cf0d28b4d3acdaab1 (diff)
downloadsamba-3f9812f951bb110700077503a96b9d7d8cfdb2dc.tar.gz
samba-3f9812f951bb110700077503a96b9d7d8cfdb2dc.tar.bz2
samba-3f9812f951bb110700077503a96b9d7d8cfdb2dc.zip
pidl/ejs: Fix bug that filled in the body for types without body.
(This used to be commit 4f4dfa6042178c157a09df61d72a42af7aa5c67b)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/parse_idl.pl13
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/pidl/tests/parse_idl.pl b/source4/pidl/tests/parse_idl.pl
index d14c374740..93f772ef41 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 + 5;
+use Test::More tests => 65 * 2 + 6;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util qw(test_errors);
@@ -143,6 +143,13 @@ $x = Parse::Pidl::IDL::parse_string("interface foo { typedef struct {} y; }", "<
is_deeply($x,
[ { 'FILE' => '<foo>', 'NAME' => 'foo', 'DATA' => [
- { 'FILE' => '<foo>', 'LINE' => 0, 'NAME' => 'y', 'TYPE' => 'TYPEDEF', DATA => {
- TYPE => 'STRUCT', ELEMENTS => [] } } ],
+ { 'FILE' => '<foo>', 'LINE' => 0, 'NAME' => 'y', 'TYPE' => 'TYPEDEF', DATA => { TYPE => 'STRUCT', ELEMENTS => [] } } ],
+ 'TYPE' => 'INTERFACE', 'LINE' => 0 } ]);
+
+# A typedef of a bitmap with no body
+$x = Parse::Pidl::IDL::parse_string("interface foo { typedef bitmap x y; }", "<foo>");
+
+is_deeply($x,
+ [ { 'FILE' => '<foo>', 'NAME' => 'foo', 'DATA' => [
+ { 'FILE' => '<foo>', 'LINE' => 0, 'NAME' => 'y', 'TYPE' => 'TYPEDEF', DATA => { TYPE => 'BITMAP', NAME => 'x' } } ],
'TYPE' => 'INTERFACE', 'LINE' => 0 } ]);