Add test for INCLUDE command.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 19 Feb 2008 01:02:48 +0000 (02:02 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 19 Feb 2008 01:02:48 +0000 (02:02 +0100)
(This used to be commit d1aa25249d64513f785430cab7437b5c7ca8db27)

source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
source4/pidl/tests/wireshark-conf.pl

index 43604cb51a9ea74470e1a840b84f6ce1776e435d..5c37b4a0c4f8eab2f02851e896d85c7f86ab0c92 100644 (file)
@@ -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);
 }
index c06ac16de4418e13d057258144ec79fe0c46f281..9da5c7d1ed901a3320fe70de5e8eb4f0ac51c129 100755 (executable)
@@ -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"); });