[svn:parrot] r46695 - trunk/t/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sun May 16 10:00:43 UTC 2010
Author: fperrad
Date: Sun May 16 10:00:42 2010
New Revision: 46695
URL: https://trac.parrot.org/parrot/changeset/46695
Log:
[LWP] test unknown protocol
Modified:
trunk/t/library/lwp.t
Modified: trunk/t/library/lwp.t
==============================================================================
--- trunk/t/library/lwp.t Sun May 16 02:14:02 2010 (r46694)
+++ trunk/t/library/lwp.t Sun May 16 10:00:42 2010 (r46695)
@@ -22,8 +22,9 @@
load_bytecode 'LWP.pir'
load_bytecode 'osutils.pbc'
- plan(30)
+ plan(34)
test_new()
+ test_unknown_protocol()
test_file_not_found()
test_file()
test_file_post_delete()
@@ -58,6 +59,20 @@
ok($I0, "isa ['HTTP';'Message']")
.end
+.sub 'test_unknown_protocol'
+ .local pmc ua, response
+ ua = new ['LWP';'UserAgent']
+ response = ua.'get'('unk:foo/bar')
+ $I0 = isa response, ['HTTP';'Response']
+ ok($I0, "GET unk:foo/bar")
+ $I0 = response.'code'()
+ is($I0, 501, "code")
+ $S0 = response.'message'()
+ is($S0, "Not Implemented", "message")
+ $I0 = response.'is_error'()
+ ok($I0, "is error")
+.end
+
.sub 'test_file_not_found'
unlink('t/no_file')
.local pmc ua, response
More information about the parrot-commits
mailing list