#!/usr/bin/perl -w
use lib '.'; use lib 't';
use WMTest; webmake_t_init("sitetree");
use Test; BEGIN { plan tests => 17 };
# ---------------------------------------------------------------------------
%patterns = (
q{
WebMake Sitemap Demo
> WebMake Sample: a news site<
/a>: some old news site
}, 'firstpage',
q{. Story 5, zzz blah blah<
/a>: Story 5, nothing much here.
> WebMake Sample: site map
: Map of the site
. Story 4, zzzzzzz: S
tory 4, incredibly boring.
}, 'bot_map',
q{
> Story 1, blah blah
a>: Story 1, just another story.
. Story 2, blah blah:
Story 2, just another story.
}, 'story1',
q{
> Story 2, blah blah
a>: Story 2, just another story.
. Story 6, blah blah:
Story 6, just another story.
}, 'story2',
q{- WebMake Sample: a news site
: some old news site
}, 'story4',
q{. Story 6, blah blah:
Story 6, just another story.
> Story 5, zzz blah bl
ah: Story 5, nothing much here.
. WebMake Sample: site map: Map of the site
}, 'story5',
q{
> Story 6, blah blah
a>: Story 6, just another story.
. Story 5, zzz blah blah<
/a>: Story 5, nothing much here.
}, 'story6',
);
# ---------------------------------------------------------------------------
ok (wmrun ("-F -f data/$testname.wmk", \&patterns_run_cb));
checkfile ($testname."_map.html", \&patterns_run_cb);
checkfile ($testname."_story_1.html", \&patterns_run_cb);
checkfile ($testname."_story_2.html", \&patterns_run_cb);
checkfile ($testname."_story_3.html", \&patterns_run_cb);
checkfile ($testname."_story_4.html", \&patterns_run_cb);
checkfile ($testname."_story_5.html", \&patterns_run_cb);
checkfile ($testname."_story_6.html", \&patterns_run_cb);
# etc.
ok_all_patterns();