# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
-$target = shift;
+use strict;
+use warnings;
+
+my $target = shift;
+my $notbefore;
+my $inception;
while (<>) {
- $notbefore = $1 if m{^.* must not be signed before \d+ [(](\d+)[)]$};
- $inception = $1 if m{^.* inception time \d+ [(](\d+)[)]$};
+ $notbefore = $1 if m{^.* must not be signed before \d+ [(](\d+)[)]};
+ $inception = $1 if m{^.* inception time \d+ [(](\d+)[)]};
}
die "missing notbefore time" unless $notbefore;
die "missing inception time" unless $inception;
my $delta = $inception - $notbefore;
-die "bad inception time $delta"
- unless abs($delta - $target) < 3;
+die "bad inception time $delta" unless abs($delta - $target) < 3;
}
check_stdout() {
- cmp out.$n "${out:-empty}" >/dev/null && return
+ $DIFF out.$n "${out:-empty}" >/dev/null && return
echo_d "stdout did not match '$out'"
( echo "wanted"
cat "$out"
testcase 0 $PERL checkmtime.pl 7200 DS.inplace.bak
name='in-place correct output'
-testcase 0 cmp DS.1 DS.inplace
+testcase 0 $DIFF DS.1 DS.inplace
name='in-place backup unmodified'
-testcase 0 cmp DS.1 DS.inplace.bak
+testcase 0 $DIFF DS.1 DS.inplace.bak
name='one mangled DS'
err='found RRSIG by key'