www.t (997B)
1 # 2 # Test live website has correct html and no broken links. 3 # 4 use Lingua::EN::Fathom; 5 use Modern::Perl; 6 use Test::More skip_all => 'website is down'; 7 use Test::WWW::Mechanize; 8 9 10 my $mech = Test::WWW::Mechanize->new; 11 12 $mech->get_ok("http://cit.run", [ charset => 'utf-8' ]); 13 14 $mech->base_is("http://cit.run"); 15 $mech->title_is("C It Run", "title is 'C It Run'"); 16 $mech->text_like(qr/C It Run lets you watch code execute/); 17 #$mech->html_lint_ok("is html correct"); 18 $mech->page_links_ok("is no broken links"); 19 20 my $www_content = $mech->content( format => 'text' ); 21 22 # Check readability of text. 23 my $www_text = Lingua::EN::Fathom->new(); 24 $www_text->analyse_block($www_content, 0); 25 print STDERR $www_text->report; 26 27 # Check aliases. 28 $mech->get_ok("http://citrun.com", [ charset => 'utf-8' ]); 29 $mech->base_is("http://citrun.com"); 30 $mech->title_is("C It Run", "title is 'C It Run'"); 31 $mech->text_like(qr/C It Run lets you watch code execute/); 32 33 $mech->get_ok("http://www.cit.run", [ charset => 'utf-8' ]);