diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-05 00:03:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:12 -0500 |
commit | faaac73ff69699b84266e82b342690c2dc375df2 (patch) | |
tree | 38bbe08dce5601aad48aa6eea55ec2af6502792e /source4 | |
parent | eb3d3fb27a12a833868a65d840fbd61909a3f348 (diff) | |
download | samba-faaac73ff69699b84266e82b342690c2dc375df2.tar.gz samba-faaac73ff69699b84266e82b342690c2dc375df2.tar.bz2 samba-faaac73ff69699b84266e82b342690c2dc375df2.zip |
r21690: Test use of typedef /and/ struct name
(This used to be commit f6d9cdb8a8eca6ff986504d4481b5165aee770c6)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/pidl/tests/header.pl | 5 | ||||
-rwxr-xr-x | source4/pidl/tests/parse_idl.pl | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source4/pidl/tests/header.pl b/source4/pidl/tests/header.pl index bb09969d0f..331f4dd9fb 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 => 14; +use Test::More tests => 15; use FindBin qw($RealBin); use lib "$RealBin"; use Util; @@ -48,3 +48,6 @@ like(parse_idl("interface p { struct x { }; };"), like(parse_idl("interface p { struct x; };"), qr/struct x;/sm, "struct declaration"); + +like(parse_idl("interface p { typedef struct x { int p; } x; };"), + qr/struct x.*{.*int32_t p;.*};/sm, "double struct declaration"); diff --git a/source4/pidl/tests/parse_idl.pl b/source4/pidl/tests/parse_idl.pl index 727f41a293..b82bd80e54 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 => 63 * 2 + 2; +use Test::More tests => 64 * 2 + 2; use FindBin qw($RealBin); use lib "$RealBin"; use Util qw(test_errors); @@ -108,6 +108,7 @@ testfail "import-nosemicolon", "import \"foo.idl\"", testok "import-multiple", "import \"foo.idl\", \"bar.idl\";"; testok "include-multiple", "include \"foo.idl\", \"bar.idl\";"; testok "empty-struct", "interface test { struct foo { }; }"; +testok "typedef-double", "interface test { typedef struct foo { } foo; }"; my $x = Parse::Pidl::IDL::parse_string("interface foo { struct x {}; }", "<foo>"); |