App-SimpleScan-Plugin-Snapshot
view release on metacpan or search on metacpan
t/06leader.t view on Meta::CPAN
use Test::More;
use Test::Differences;
my $simple_scan = `which simple_scan`;
chomp $simple_scan;
system "rm -rf t/run_*" unless $ENV{DEBUG};
my %counts = (
'snaponrun_leader.in' => 2,
'snaperrorrun_leader.in' => 1,
);
my %test_pairs = (
"snaponrun_leader.in" => <<EOS,
1..2
not ok 1 - branding [http://cpan.org/] [/Python/ should match]
# Failed test 'branding [http://cpan.org/] [/Python/ should match]'
# in ... at line XX.
# got: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans"...
# length: ...
# doesn't match '(?-xism:Python)'
# See snapshot http://somewhere.com/run_xxx-xxx-xx-xx-xx-xx-xxxx/frame_xxx-xxx-xx-xx-xx-xx-xxxx-x.html
ok 2 - branding [http://perl.org/] [/Perl/ should match]
# See snapshot http://somewhere.com/run_xxx-xxx-xx-xx-xx-xx-xxxx/frame_xxx-xxx-xx-xx-xx-xx-xxxx-x.html
# Looks like you failed 1 test of 2.
EOS
"snaperrorrun_leader.in" => <<EOS,
1..2
ok 1 - branding [http://perl.org/] [/Perl/ should match]
not ok 2 - branding [http://perl.org/] [/Python/ should match]
# Failed test 'branding [http://perl.org/] [/Python/ should match]'
# in ... at line XX.
# got: "\\x{0a}<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Tran"...
# length: ...
# doesn't match '(?-xism:Python)'
# See snapshot http://somewhere.com/run_xxx-xxx-xx-xx-xx-xx-xxxx/frame_xxx-xxx-xx-xx-xx-xx-xxxx-x.html
# Looks like you failed 1 test of 2.
EOS
);
my %test_pairs_2 = (
"-snap_dir t -snap_prefix 'http://someplace.com'" => <<EOS,
1..1
ok 1 - branding [http://perl.org/] [/Perl/ should match]
# See snapshot http://someplace.com/run_xxx-xxx-xx-xx-xx-xx-xxxx/frame_xxx-xxx-xx-xx-xx-xx-xxxx-x.html
EOS
"--snap_dir /nonexistent -snap_prefix 'http://someplace.com'" => <<EOS,
1..1
Couldn't create directory /nonexistent/run_xxx-xxx-xx-xx-xx-xx-xxxx: mkdir /nonexistent: Permission denied at ...
EOS
"-snap_dir t -snap_prefix 'http://someplace.com/'" => <<EOS,
1..1
ok 1 - branding [http://perl.org/] [/Perl/ should match]
# See snapshot http://someplace.com/run_xxx-xxx-xx-xx-xx-xx-xxxx/frame_xxx-xxx-xx-xx-xx-xx-xxxx-x.html
EOS
"--snap_dir /nonexistent -snap_prefix 'http://someplace.com/'" => <<EOS,
1..1
Couldn't create directory /nonexistent/run_xxx-xxx-xx-xx-xx-xx-xxxx: mkdir /nonexistent: Permission denied at ...
EOS
);
( run in 0.884 second using v1.01-cache-2.11-cpan-6aa56a78535 )