File: 02_clientsim_txt_parsable.t

package info (click to toggle)
testssl.sh 3.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,624 kB
  • sloc: sh: 22,574; perl: 1,139; java: 42; makefile: 19
file content (30 lines) | stat: -rwxr-xr-x 637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env perl

# Just a functional test, whether ~/etc/client-simulation.txt
# doesn't have any syntax errors

use strict;
use Test::More;

my $tests = 0;
my $fileout="";
# Blacklists we use to trigger an error:
my $error_regexp1='(syntax|parse) (e|E)rror';
my $error_regexp2='client-simulation.txt:';

printf "\n%s\n", "Testing whether \"~/etc/client-simulation.txt\" isn't broken ...";
$fileout = `bash ./etc/client-simulation.txt 2>&1`;

#1
unlike($fileout, qr/$error_regexp1/, "regex 1");
$tests++;

#2
unlike($fileout, qr/$error_regexp2/, "regex 2");
$tests++;

printf "\n";
done_testing($tests);

#  vim:ts=5:sw=5:expandtab