petdance/test-www-mechanize

Failure in revision e23af8f: tests on MSWin32

Closed this issue · 1 comments

Tests fail on the MSWin32 platform due to incorrect conversion of URI strings to filenames.

I have provided a minimal patch available at particle@7cd50d8

The test output is included below:

HEAD is now at e23af8f... releasing 1.42

C:\Documents and Settings\nbkql8h\My Documents\GitHub\test-www-mechanize>dmake test
C:\usr\strawberry\perl-5.14.2.1-32\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00-load.t ................ # Testing Test::WWW::Mechanize 1.42, with WWW::Mechanize 1.72, LWP 6.03, Test::More 0.98, Perl 5.014002, C:\usr\STRAWB~1\PERL-5~1.1-3\perl\bin\perl.exe
t/00-load.t ................ ok
t/autolint.t ............... skipped: HTML::Lint 2.20 is not installed, cannot test autolint
t/click_ok.t ............... # Test server http://127.0.0.1:30401 as PID -3552
t/click_ok.t ............... ok
t/content_contains.t ....... ok
t/content_lacks.t .......... ok
t/follow_link_ok.t ......... 1/6
#   Failed test 'Handles bad links'
#   at t/follow_link_ok.t line 39.
# STDERR is:
# #   Failed test 'Go after bad link'
# #   at t/follow_link_ok.t line 38.
# # 404
# # File `C:\Documents and Settings\nbkql8h\My Documents\GitHub\test-www-mechanize\t\bad1.html' does not exist
#
# not:
# /#\s+Failed\ test.*?\n?.*?at\ t\/follow_link_ok\.t line 38.*\n?/
#
# # 404
#
# # File `/C:/Documents%20and%20Settings/nbkql8h/My%20Documents/GitHub/test-www-mechanize/t/bad1.html' does not exist
#
# as expected
t/follow_link_ok.t ......... Failed 1/6 subtests
t/followable_links.t ....... ok
t/get_ok-parms.t ........... ok
t/get_ok.t ................. 1/10
#   Failed test 'Fails to get nonexistent URI and reports failure'
#   at t/get_ok.t line 42.
# STDERR is:
# #   Failed test 'Try to get bad URL'
# #   at t/get_ok.t line 41.
# # 404
# # File `C:\Documents and Settings\nbkql8h\My Documents\GitHub\test-www-mechanize\t\no-such-file' does not exist
#
# not:
# /#\s+Failed\ test.*?\n?.*?at\ t\/get_ok\.t line 41.*\n?/
#
# # 404
#
# # File `/C:/Documents%20and%20Settings/nbkql8h/My%20Documents/GitHub/test-www-mechanize/t/no-such-file' does not exist
#
# as expected
t/get_ok.t ................. Failed 1/10 subtests
t/has_tag.t ................ ok
t/head_ok-parms.t .......... ok
t/head_ok.t ................ 1/11
#   Failed test 'Fails to HEAD nonexistent URI and reports failure'
#   at t/head_ok.t line 43.
# STDERR is:
# #   Failed test 'Try to HEAD bad URL'
# #   at t/head_ok.t line 42.
# # 404
# # File `C:\Documents and Settings\nbkql8h\My Documents\GitHub\test-www-mechanize\t\no-such-file' does not exist
#
# not:
# /#\s+Failed\ test.*?\n?.*?at\ t\/head_ok\.t line 42.*\n?/
#
# # 404
#
# # File `/C:/Documents%20and%20Settings/nbkql8h/My%20Documents/GitHub/test-www-mechanize/t/no-such-file' does not exist
#
# as expected
t/head_ok.t ................ Failed 1/11 subtests
t/html_lint_ok.t ........... skipped: HTML::Lint is not installed, cannot test autolint
t/lacks_uncapped_inputs.t .. ok
t/link_content.t ........... ok
t/link_status.t ............ ok
t/links_ok.t ............... ok
t/new.t .................... ok
t/page_links_content.t ..... ok
t/page_links_ok.t .......... ok
t/pod-coverage.t ........... ok
t/pod.t .................... ok
t/put_ok.t ................. # Test server http://127.0.0.1:30184 as PID -984
t/put_ok.t ................. ok
t/scrape-text-by-id.t ...... ok
t/stuff_inputs.t ........... ok
t/submit_form_ok.t ......... # Test server http://127.0.0.1:26545 as PID -2116
t/submit_form_ok.t ......... ok
t/text_contains.t .......... ok
t/title_is.t ............... ok

Test Summary Report
-------------------
t/follow_link_ok.t       (Wstat: 0 Tests: 6 Failed: 1)
  Failed test:  6
t/get_ok.t               (Wstat: 0 Tests: 10 Failed: 1)
  Failed test:  8
t/head_ok.t              (Wstat: 0 Tests: 11 Failed: 1)
  Failed test:  9
Files=28, Tests=221, 25 wallclock secs ( 0.59 usr +  0.48 sys =  1.08 CPU)
Result: FAIL
Failed 3/28 test programs. 3/221 subtests failed.
dmake:  Error code 255, while making 'test_dynamic'

This should be fixed by your pull request as I understand it.