#!/usr/bin/perl use warnings; use strict; BEGIN { foreach my $module (qw(Image::Magick)) { eval qq{use $module}; if ($@) { eval qq{ use Test::More skip_all => "$module not available" } } } } use Test::More 'no_plan'; BEGIN { use_ok("IkiWiki"); } my $blob; ok(! system("rm -rf t/tmp")); ok(mkdir("t/tmp")); ok(mkdir("t/tmp/in")); ok(mkdir("t/tmp/in/myalbum")); my $image = Image::Magick->new; $image->Set(size => '640x480'); $image->Read('canvas:red'); $image->Draw(fill => 'yellow', primitive => 'rectangle', points => '0,0 100,100'); $image->Write('t/tmp/in/myalbum/r.jpg'); $image = Image::Magick->new; $image->Set(size => '480x640'); $image->Read('canvas:green'); $image->Draw(fill => 'yellow', primitive => 'rectangle', points => '0,0 100,100'); $image->Write('t/tmp/in/myalbum/g.png'); $image = Image::Magick->new; $image->Set(size => '640x640'); $image->Read('canvas:blue'); $image->Draw(fill => 'yellow', primitive => 'rectangle', points => '0,0 100,100'); $image->Write('t/tmp/in/myalbum/b.gif'); writefile("myalbum.mdwn", "t/tmp/in", <]*>Section:\s+green$ .*? .*? ]*>Assorted$ .*? .*? .*? .*? ]*>Section:\s+green$ .*? .*? ]*>Assorted$ .*? .*? .*? a blue box}); like($blob, qr{

hello,\s+world!

.*? .*?