#!/usr/bin/perl -w

use lib '.'; use lib 't';
use WMTest; webmake_t_init("navlinks_no");
use Test; BEGIN { plan tests => 9 };

# ---------------------------------------------------------------------------

%patterns = (

q{     <h1>Navlinks Test</h1><hr />
     <a href="../log/navlinks_no.html">Index</a> | 
          <a href="../log/navlinks_no_map.html">Site Map</a><hr />
	      
	           Previous | Up | <a href="../log/navlinks_no_story_3.html">Next</a><hr />
		       <ul>
		             <li>
}, 'index_top',


q{
     <h1>Navlinks Test</h1><hr />
     <a href="../log/navlinks_no.html">Index</a> | 
     <a href="../log/navlinks_no_map.html">Site Map</a><hr />
     <a href="../log/navlinks_no_story_3.html">Previous</a> | <a href="../log/navli
nks_no.html">Up</a> | <a href="../log/navlinks_no_story_2.html">Next</a><hr />
    <p>
      This is story 1.

}, 'story1',


q{
  <body bgcolor="#ffffff">
     <h1>Navlinks Test</h1><hr />
     <a href="../log/navlinks_no.html">Index</a> | 
     <a href="../log/navlinks_no_map.html">Site Map</a><hr />
     <a href="../log/navlinks_no_map.html">Previous</a> | <a href="../log/navlinks_
no.html">Up</a> | Next
     <hr />
    <p>
      This is story 4. It's astoundingly boring, which is why it's down here.
},
'story4',

q{
     <h1>Navlinks Test</h1><hr />
     <a href="../log/navlinks_no.html">Index</a> | 
     <a href="../log/navlinks_no_map.html">Site Map</a><hr />
     <a href="../data/contentsfind.data/foo.txt">Previous</a> | <a href="../log/nav
links_no.html">Up</a> | <a href="../log/navlinks_no_story_4.html">Next</a><hr />
    <li>
      <p>
         <a href="../log/navlinks_no.html">WebMake Sample: a news site</a>: some ol
d news site<br />
         <em>[score: 50, name: index_chunk, is_node: 1]</em><ul>
          <li>
            <p>
}, 'sitemap',

);

# ---------------------------------------------------------------------------

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();

