<commit_before>#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;

zci answer_type => 'private_network';
zci is_cached => 1;

ddg_goodie_test(
        [qw(
                DDG::Goodie::PrivateNetwork
        )],
        map { ("$_" => test_zci(
            'Private network IPv4 addresses (rfc1918):
10.0.0.0 - 10.255.255.255 | 10.0.0.0/8
172.16.0.0 - 172.31.255.255 | 172.16.0.0/12
192.168.0.0 - 192.168.255.255 | 192.168.0.0/16

Carrier NAT IPv4 private addresses (rfc6598):
172.16.31.10 - 192.168.127.12 | 172.16.31.10/10

Test Networks (rfc5735):
TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24
TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24
TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24
Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15

Private network IPv6 addresses (rfc4193):
Unique local addresses: fd00::/8
',
        html => 'Private network IP addresses:
<br>IPv4 addresses (<a href="https://www.ietf.org/rfc/rfc1918.txt">rfc1918</a>):
<br>10.0.0.0 - 10.255.255.255 | 10.0.0.0/8
<br>172.16.0.0 - 172.31.255.255 | 172.16.0.0/12
<br>192.168.0.0 - 192.168.255.255 | 192.168.0.0/16
<br>
<br>Carrier NAT (<a href="https://www.ietf.org/rfc/rfc6598.txt">rfc6598</a>):
<br>172.16.31.10 - 192.168.127.12 | 172.16.31.10/10
<br>
<br>Test Networks (<a href="https://www.ietf.org/rfc/rfc5735.txt">rfc5735</a>):
<br>TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24
<br>TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24
<br>TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24
<br>Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15
<br>
<br>Private network IPv6 addresses (<a href="https://www.ietf.org/rfc/rfc4193.txt">rfc4193</a>):
<br>Unique local addresses: fd00::/8
'
)) } ( 'private network', 'private networks', 'private ips' )
);

done_testing;<commit_msg>PrivateNetwork: Updating Tests for new css etc<commit_after>#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;

zci answer_type => 'private_network';
zci is_cached => 1;

ddg_goodie_test(
    [qw(
        DDG::Goodie::PrivateNetwork
    )],
    map { ("$_" => test_zci(
        'Private network IPv4 addresses (rfc1918):
10.0.0.0 - 10.255.255.255 | 10.0.0.0/8
172.16.0.0 - 172.31.255.255 | 172.16.0.0/12
192.168.0.0 - 192.168.255.255 | 192.168.0.0/16

Carrier NAT IPv4 private addresses (rfc6598):
172.16.31.10 - 192.168.127.12 | 172.16.31.10/10

Test Networks (rfc5735):
TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24
TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24
TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24
Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15

Private network IPv6 addresses (rfc4193):
Unique local addresses: fd00::/8
',
    html => q#<style type='text/css'>.private_network .left-column {
    vertical-align: top;
    display: inline-block;
    width: 30%;
}

.private_network .right-column {
    vertical-align: top;
    display: inline-block;
    width: 70%;
}</style><div class='private_network'>
<div>
    <div class='text--primary left-column'>
        IPv4 addresses (<a href="https://www.ietf.org/rfc/rfc1918.txt">rfc1918</a>):
    </div>
    <div class='text--secondary right-column'>
        <p>10.0.0.0 - 10.255.255.255 | 10.0.0.0/8</p>
        <p>172.16.0.0 - 172.31.255.255 | 172.16.0.0/12</p>
        <p>192.168.0.0 - 192.168.255.255 | 192.168.0.0/16</p>
    </div>
</div>
<div>
    <div class='text--primary left-column'>
        Carrier NAT (<a href="https://www.ietf.org/rfc/rfc6598.txt">rfc6598</a>):
    </div>
    <div class='text--secondary right-column'>
        172.16.31.10 - 192.168.127.12 | 172.16.31.10/10
    </div>
</div>
<div>
    <div class='text--primary left-column'>
        Test Networks (<a href="https://www.ietf.org/rfc/rfc5735.txt">rfc5735</a>):
    </div>
    <div class='text--secondary right-column'>
        <p>TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24</p>
        <p>TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24</p>
        <p>TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24</p>
        <p>Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15</p>
    </div>
</div>
<div>
    <div class='text--primary left-column'>
        IPv6 addresses (<a href="https://www.ietf.org/rfc/rfc4193.txt">rfc4193</a>):
    </div>
    <div class='text--secondary right-column'>
        Unique local addresses: fd00::/8
    </div>
</div>
</div>#
)) } ( 'private network', 'private networks', 'private ips' )
);

done_testing;
{'fraction_non_alphanumeric': 0.21485411140583555, 'fraction_numerical': 0.22281167108753316, 'mean_word_length': 2.6818551668022783, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 85, 'https://': 8, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 96, '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': '6300158', 'n_tokens_mistral': 2638, 'n_tokens_neox': 2005, 'n_words': 330}