diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-19 02:02:48 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-19 02:02:48 +0100 |
commit | 35dd0b0f4ad6ab0d9365d2858b60bf82e4877bda (patch) | |
tree | 3d5f0c589a903851baf2626bd22f2a247b40a335 /source4/pidl | |
parent | c455774d9330fc1903a701a2042e29f68b8227f8 (diff) | |
download | samba-35dd0b0f4ad6ab0d9365d2858b60bf82e4877bda.tar.gz samba-35dd0b0f4ad6ab0d9365d2858b60bf82e4877bda.tar.bz2 samba-35dd0b0f4ad6ab0d9365d2858b60bf82e4877bda.zip |
Add test for INCLUDE command.
(This used to be commit d1aa25249d64513f785430cab7437b5c7ca8db27)
Diffstat (limited to 'source4/pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm | 4 | ||||
-rwxr-xr-x | source4/pidl/tests/wireshark-conf.pl | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm index 43604cb51a..5c37b4a0c4 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm @@ -330,7 +330,7 @@ sub handle_ett_field unless(defined($ett)) { error($pos, "incomplete ETT_FIELD command"); return; - }; + } push (@{$data->{ett}}, $ett); } @@ -344,7 +344,7 @@ sub handle_include unless(defined($fn)) { error($pos, "incomplete INCLUDE command"); return; - }; + } ReadConformance($fn, $data); } diff --git a/source4/pidl/tests/wireshark-conf.pl b/source4/pidl/tests/wireshark-conf.pl index c06ac16de4..9da5c7d1ed 100755 --- a/source4/pidl/tests/wireshark-conf.pl +++ b/source4/pidl/tests/wireshark-conf.pl @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests => 48; +use Test::More tests => 49; use FindBin qw($RealBin); use lib "$RealBin"; use Util; @@ -35,7 +35,6 @@ test_warnings("nofile:1: Unknown command `foobar'\n", test_warnings("nofile:1: incomplete HF_RENAME command\n", sub { parse_conf("HF_RENAME\n"); }); - is_deeply(parse_conf("HF_RENAME foo bar\n")->{hf_renames}->{foo}, { OLDNAME => "foo", NEWNAME => "bar", POS => {FILE => "nofile", LINE => 1}, USED => 0}); @@ -47,6 +46,9 @@ test_warnings("nofile:1: incomplete MANUAL command\n", is_deeply(parse_conf("MANUAL foo\n"), { manual => {foo => 1}}); +test_errors("nofile:1: incomplete INCLUDE command\n", + sub { parse_conf("INCLUDE\n"); } ); + test_warnings("nofile:1: incomplete FIELD_DESCRIPTION command\n", sub { parse_conf("FIELD_DESCRIPTION foo\n"); }); |