diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-04 14:16:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:10 -0500 |
commit | 035adfb94399a2e2d5d4ca26aaa214576f5c0b64 (patch) | |
tree | 5fcd91a9be9f68e4ad935157fcbbfbfd17175555 /source4/pidl/tests/header.pl | |
parent | 1ec8f79baeef1a04ccdb01978a3f3624e70b69c6 (diff) | |
download | samba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.tar.gz samba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.tar.bz2 samba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.zip |
r21681: Fix bug in the parsing code that parsed "struct foo;" the same as
"struct foo {};".
Reported by one of the OpenChange folks, thanks!
(This used to be commit d65b520f08ea4ee82c35ff334a58aa6ffc403d67)
Diffstat (limited to 'source4/pidl/tests/header.pl')
-rwxr-xr-x | source4/pidl/tests/header.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/pidl/tests/header.pl b/source4/pidl/tests/header.pl index 7092eb0d14..bb09969d0f 100755 --- a/source4/pidl/tests/header.pl +++ b/source4/pidl/tests/header.pl @@ -4,7 +4,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 14; use FindBin qw($RealBin); use lib "$RealBin"; use Util; @@ -42,3 +42,9 @@ like(parse_idl("interface p { struct x { struct y z; }; };"), like(parse_idl("interface p { struct x { union y z; }; };"), qr/struct x.*{.*union y z;.*}.*;/sm, "tagged type union member"); + +like(parse_idl("interface p { struct x { }; };"), + qr/struct x.*{.*char _empty_;.*}.*;/sm, "empty struct"); + +like(parse_idl("interface p { struct x; };"), + qr/struct x;/sm, "struct declaration"); |