From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

#!/usr/local/bin/perl
use Test::More tests=>2;
@output = `$^X -It bin/simple_scan --gen <examples/ss_country.in`;
@expected = map {"$_\n"} split /\n/,<<EOF;
use Test::More tests=>4;
use Test::WWW::Simple;
use strict;
my \@accent;
qr/yahoo/,
"Yahoo should be there (au) [http://au.yahoo.com/] [/yahoo/ should match]";
qr/yahoo/,
"Yahoo should be there (es) [http://es.yahoo.com/] [/yahoo/ should match]";
qr/yahoo/,
"Yahoo should be there (de) [http://de.yahoo.com/] [/yahoo/ should match]";
qr/yahoo/,
"Yahoo should be there (asia) [http://asia.yahoo.com/] [/yahoo/ should match]";
EOF
push @expected, "\n";
eq_or_diff(\@output, \@expected, "uninserted output as expected");
@output = `$^X -It bin/simple_scan --test_expand --gen <examples/ss_country.in`;
@expected = map {"$_\n"} split /\n/,<<EOF;
use Test::More tests=>4;
use Test::WWW::Simple;
use strict;
my \@accent;
# Adding test expansion comment
qr/yahoo/,
"Yahoo should be there (au) [http://au.yahoo.com/] [/yahoo/ should match]";
# per-test comment
qr/yahoo/,
"Yahoo should be there (es) [http://es.yahoo.com/] [/yahoo/ should match]";
# per-test comment
qr/yahoo/,
"Yahoo should be there (de) [http://de.yahoo.com/] [/yahoo/ should match]";
# per-test comment
qr/yahoo/,
"Yahoo should be there (asia) [http://asia.yahoo.com/] [/yahoo/ should match]";
# per-test comment
EOF
push @expected, "\n";
eq_or_diff(\@output, \@expected, "inserted output as expected");