1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

Add test for INCLUDE command.

This commit is contained in:
Jelmer Vernooij 2008-02-19 02:02:48 +01:00
parent 8a8ed4fae8
commit d1aa25249d
2 changed files with 6 additions and 4 deletions

View 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);
}

View File

@ -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"); });