Commit c3a3400a authored by Felix Lechner's avatar Felix Lechner

Update t/scripts/harness/check_result.t to newer test format.

The test case was updated to declare a field Check, which did not
exist when the script was written. Also, the defaults are properly
parsed in addition to the test specification.

The changes are not essential but will make the test work better in
the future.

Gbp-Dch: ignore
parent 16f9a0be
......@@ -52,9 +52,8 @@ Testname: $TESTNAME
Sequence: 2500
Version: 1.0
Description: Multiple distributions with at least one bad one
References: Debian Bug #514853
my $descpath = $testpath->child('desc');
......@@ -87,9 +86,17 @@ $nomatch->spew($nomatchtext);
my $match = $testpath->child('tags.match');
# read test case
my $testcase = read_config($descpath);
# read test defaults
my $defaultspath = 't/defaults/desc';
my $testcase = read_config($defaultspath);
my $defaults = read_config($defaultspath);
foreach my $key (keys %{$defaults}) {
$testcase->{$key} = $defaults->{$key}
unless exists $testcase->{$key};
# test plan
plan tests => 2;
......@@ -101,3 +108,9 @@ ok(!scalar check_result($testcase, $testpath, $expected, $match),
# check tags do not match
ok(scalar check_result($testcase, $testpath, $expected, $nomatch),
'Different tags do not match');
# Local Variables:
# indent-tabs-mode: nil
# cperl-indent-level: 4
# End:
# vim: syntax=perl sw=4 sts=4 sr et
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment