Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 328899
Collapse All | Expand All

(-)a/t/back_ok.t (-2 / +2 lines)
Lines 47-60 GOOD_GET: { Link Here
47
}
47
}
48
48
49
BAD_GET: {
49
BAD_GET: {
50
    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
50
    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
51
    $mech->get($badurl);
51
    $mech->get($badurl);
52
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
52
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
53
53
54
    test_out( 'not ok 1 - Try to get bad URL' );
54
    test_out( 'not ok 1 - Try to get bad URL' );
55
    test_fail( +3 );
55
    test_fail( +3 );
56
    test_diag( '500' );
56
    test_diag( '500' );
57
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
57
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname 'wango.nonexistent.xx-only-testing.')} );
58
    my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
58
    my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
59
    test_test( 'Fails to get nonexistent URI and reports failure' );
59
    test_test( 'Fails to get nonexistent URI and reports failure' );
60
60
(-)a/t/get_ok.t (-2 / +2 lines)
Lines 48-61 GOOD_GET: { Link Here
48
}
48
}
49
49
50
BAD_GET: {
50
BAD_GET: {
51
    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
51
    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
52
    $mech->get($badurl);
52
    $mech->get($badurl);
53
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
53
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
54
54
55
    test_out( 'not ok 1 - Try to get bad URL' );
55
    test_out( 'not ok 1 - Try to get bad URL' );
56
    test_fail( +3 );
56
    test_fail( +3 );
57
    test_diag( '500' );
57
    test_diag( '500' );
58
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
58
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname 'wango.nonexistent.xx-only-testing.')} );
59
    my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
59
    my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
60
    test_test( 'Fails to get nonexistent URI and reports failure' );
60
    test_test( 'Fails to get nonexistent URI and reports failure' );
61
61
(-)a/t/head_ok.t (-2 / +2 lines)
Lines 47-60 GOOD_HEAD: { # Stop giggling, you! Link Here
47
}
47
}
48
48
49
BAD_HEAD: {
49
BAD_HEAD: {
50
    my $badurl = 'http://wango.nonexistent.xx-only-testing/';
50
    my $badurl = 'http://wango.nonexistent.xx-only-testing./';
51
    $mech->head($badurl);
51
    $mech->head($badurl);
52
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
52
    ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
53
53
54
    test_out( 'not ok 1 - Try to HEAD bad URL' );
54
    test_out( 'not ok 1 - Try to HEAD bad URL' );
55
    test_fail( +3 );
55
    test_fail( +3 );
56
    test_diag( '500' );
56
    test_diag( '500' );
57
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad hostname 'wango.nonexistent.xx-only-testing')} );
57
    test_diag( q{Can't connect to wango.nonexistent.xx-only-testing.:80 (Bad hostname 'wango.nonexistent.xx-only-testing.')} );
58
    my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
58
    my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
59
    test_test( 'Fails to HEAD nonexistent URI and reports failure' );
59
    test_test( 'Fails to HEAD nonexistent URI and reports failure' );
60
60

Return to bug 328899