2020-01-13 15:52:17 +01:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
2020-01-13 16:26:05 +01:00
|
|
|
# Just a functional test, whether ~/etc/client-simulation.txt
|
2021-09-03 23:37:37 +02:00
|
|
|
# doesn't have any syntax errors
|
2020-01-13 15:52:17 +01:00
|
|
|
|
|
|
|
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`;
|
2020-01-14 18:44:11 +01:00
|
|
|
unlike($fileout, qr/$error_regexp1/, "regex 1");
|
2020-01-13 15:52:17 +01:00
|
|
|
$tests++;
|
|
|
|
|
2020-01-14 18:44:11 +01:00
|
|
|
unlike($fileout, qr/$error_regexp2/, "regex 2");
|
2020-01-13 15:52:17 +01:00
|
|
|
$tests++;
|
|
|
|
|
2020-01-14 18:44:11 +01:00
|
|
|
printf "\n";
|
2020-01-13 15:52:17 +01:00
|
|
|
done_testing($tests);
|
|
|
|
|
2021-05-31 22:39:22 +02:00
|
|
|
# vim:ts=5:sw=5:expandtab
|
2020-01-13 15:52:17 +01:00
|
|
|
|