<commit_before>#!/usr/bin/perl

use lib '.'; use lib 't';
use SATest; sa_t_init("spamc");
use Test; BEGIN { plan tests => 2 };

# ---------------------------------------------------------------------------

%patterns = (

q{ hello world }, 'spamc',

);

ok (scrun ("-p 0 < data/etc/hello.txt", \&patterns_run_cb));
ok_all_patterns();
<commit_msg>Port 9 (discard) is the correct one to use in this test<commit_after>#!/usr/bin/perl

use lib '.'; use lib 't';
use SATest; sa_t_init("spamc");
use Test; BEGIN { plan tests => 2 };

# ---------------------------------------------------------------------------

%patterns = (

q{ hello world }, 'spamc',

);

# connect on port 9 (discard): should always fail
ok (scrun ("-p 9 < data/etc/hello.txt", \&patterns_run_cb));
ok_all_patterns();

{'fraction_non_alphanumeric': 0.34438775510204084, 'fraction_numerical': 0.007653061224489796, 'mean_word_length': 1.8339350180505416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '161092', 'n_tokens_mistral': 274, 'n_tokens_neox': 261, 'n_words': 73}