mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-12 07:10:03 +03:00
31 lines
555 B
Perl
Executable File
31 lines
555 B
Perl
Executable File
#! /usr/bin/perl -w
|
|
|
|
# This runs all the tests.
|
|
|
|
# Tests scripts are in *.tst files.
|
|
# Corresponding output is put in *.out.
|
|
# Reference output is put in *.ref.
|
|
# Any discrepancy will be reported!
|
|
|
|
use strict;
|
|
|
|
my @res;
|
|
foreach my $fn (`ls *.tst`) {
|
|
chomp $fn;
|
|
my $cmd = "./htest $fn $fn.out";
|
|
print "$cmd\n";
|
|
`$cmd`;
|
|
my $res = system("diff -u $fn.ref $fn.out");
|
|
push @res, [$fn, ($res == 0 ? "OK" : "*KO*")];
|
|
}
|
|
|
|
format =
|
|
@<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>
|
|
$_->[0], $_->[1]
|
|
.
|
|
|
|
|
|
#format_name STDOUT test_result;
|
|
map { write; } @res;
|
|
|