Item12616: Fixes for perl 5.18

The HTTP headers can now be generated in any order.  The unit tests were
sensitive to location of the Status: line.  Change the tests to allow it
on any line in the headers.

This also exposed a bug in Render.pm which will have caused inconsistent
escaping of characters in the HTML.  The %ESCAPED hash defined the
backslash as
      '\\' => '%5C',
This actually inserts a single backslash.   But in the regex, a single
backslash is an escape, which caused the backslash to be ignored.

With the changes in hash key order, the backslash occasionally ended up
as the final character in the regex, which escaped the closing square
bracket, breaking the regex.

    my $chars = join( '', keys(%ESCAPED) );
    $txt =~ s/([$chars])/$ESCAPED{$1}/g;

Changing the hash key to '\\\\' inserts an escaped backslash \\ as the
actual key, which causes it to be matched as a backslash in the regex.

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@16985 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: Fix perl issues found on newer perl

Attach fails with with *** Possible precedence issue with control flow
operator at /var/www/foswiki/trunk/core/lib/Foswiki/Attach.pm line 202.

LoggerTests fail because qw( .. ) list must be written (qw( ... ))

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@16986 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12357: Sync over trunk unit test.

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@16994 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: Unit test should deal with perl 5.18

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@16998 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: use assert_html_equals, not string compare

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@16999 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: use html_matches for tag validation

Tested on perl 5.8.8, and 5.19.5

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@17003 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: fixed missing ordering constraint resulting in random test failures



git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@17005 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: Zone ordering of blocks inconsistent

On perl 5.18+, order of any zone blocks that do not specify a "requires"
will be unpredictable.  Rewrite tests to examine individual requirements
instead of the entire block of rendered output.

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@17010 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Item12616: Recent versions of HTML::Tidy complains

 HTMLValidation_compare_plain (116:3444) Warning: replacing invalid
 UTF-8 bytes (char. code U+00A0)

 It seems to be happening consistently on recent versions of HTML::TIdy.
 It doesn't appear to be a core issue.   Change HTML::Tidy to use ascii
 encoding to avoid the error.

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@17011 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
Revert "Item12616: Recent versions of HTML::Tidy complains"

This reverts commit 24f635d3c07f86a6550ec4b50e7a00483d78b267.

git-svn-id: http://svn.foswiki.org/branches/Release01x01/UnitTestContrib@17018 0b4bb1d4-4e5a-0410-9cc4-b2b747904278