Created
May 13, 2010 13:43
-
-
Save aanoaa/399845 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Failed test 'PUTs existing URI and reports success' | |
| # at t/put_ok.t line 32. | |
| # STDOUT is: | |
| # not ok 1 - Try to PUT goodlinks.html | |
| # | |
| # not: | |
| # ok 1 - Try to PUT goodlinks.html | |
| # | |
| # as expected | |
| # STDERR is: | |
| # # Failed test 'Try to PUT goodlinks.html' | |
| # # at t/put_ok.t line 31. | |
| # # 500 | |
| # # read timeout | |
| # | |
| # not: | |
| # | |
| # as expected | |
| # Failed test 'And the result should be true' | |
| # at t/put_ok.t line 34. | |
| # Failed test 'PUTs existing URI and reports success - default desc' | |
| # at t/put_ok.t line 39. | |
| # STDOUT is: | |
| # not ok 1 - PUT http://localhost:13432/goodlinks.html | |
| # | |
| # not: | |
| # ok 1 - PUT http://localhost:13432/goodlinks.html | |
| # | |
| # as expected | |
| # STDERR is: | |
| # # Failed test 'PUT http://localhost:13432/goodlinks.html' | |
| # # at t/put_ok.t line 38. | |
| # # 500 | |
| # # read timeout | |
| # | |
| # not: | |
| # | |
| # as expected | |
| t/put_ok.t .............. | |
| Failed 3/8 subtests | |
| t/stuff_inputs.t ........ ok | |
| bind to *:13432: Address already in use at t/submit_form_ok.t line 16 | |
| t/submit_form_ok.t ...... ok | |
| Test Summary Report | |
| ------------------- | |
| t/put_ok.t (Wstat: 0 Tests: 8 Failed: 3) | |
| Failed tests: 5, 7-8 | |
| Files=25, Tests=196, 386 wallclock secs ( 0.16 usr 0.04 sys + 5.17 cusr 0.60 csys = 5.97 CPU) | |
| Result: FAIL | |
| Failed 1/25 test programs. 3/196 subtests failed. | |
| make: *** [test_dynamic] ì¤ë¥ 255 | |
| -> FAIL Installing Test::WWW::Mechanize failed. See /home/hshong/.cpanm/build.log for details. | |
| #!perl | |
| use strict; | |
| use warnings; | |
| use Test::More; | |
| use Test::Builder::Tester; | |
| BEGIN { | |
| plan tests => 8; | |
| use_ok( 'Test::WWW::Mechanize' ); | |
| } | |
| use lib 't'; | |
| use TestServer; | |
| my $server = TestServer->new; | |
| my $pid = $server->background; | |
| my $server_root = $server->root; | |
| my $mech = Test::WWW::Mechanize->new( autocheck => 0 ); | |
| isa_ok($mech,'Test::WWW::Mechanize'); | |
| my $text = 'This is what we are putting'; | |
| GOOD_PUT: { | |
| my $goodlinks = "$server_root/goodlinks.html"; | |
| $mech->put_ok($goodlinks, {content => $text}); | |
| ok($mech->success, 'sanity check: we can load goodlinks.html'); | |
| test_out('ok 1 - Try to PUT goodlinks.html'); | |
| my $ok = $mech->put_ok($goodlinks, 'Try to PUT goodlinks.html'); | |
| test_test('PUTs existing URI and reports success'); | |
| is( ref($ok), '', 'put_ok() should only return a scalar' ); | |
| ok( $ok, 'And the result should be true' ); | |
| # default desc | |
| test_out("ok 1 - PUT $goodlinks"); | |
| $mech->put_ok($goodlinks); | |
| test_test('PUTs existing URI and reports success - default desc'); | |
| } | |
| $server->stop; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment