Author: jhorwitz
Date: Wed Dec 26 10:42:51 2007
New Revision: 297
Modified:
mod_parrot/trunk/t/response/TestAPI/request_rec.pir
Log:
add some missing tests
Modified: mod_parrot/trunk/t/response/TestAPI/request_rec.pir
==============================================================================
--- mod_parrot/trunk/t/response/TestAPI/request_rec.pir (original)
+++ mod_parrot/trunk/t/response/TestAPI/request_rec.pir Wed Dec 26 10:42:51 2007
@@ -9,7 +9,7 @@
ap_const = get_root_global [ 'Apache'; 'Constants' ], 'ap_constants'
- r.'puts'("1..27\n")
+ r.'puts'("1..31\n")
# XXX this should be fatal on failure
START_1:
@@ -27,9 +27,9 @@
START_3:
push_eh NOT_OK_3
- $I0 = r.'write'("testing 123\n", 12)
+ $I0 = r.'write'("# testing 123\n", 14)
pop_eh
- if $I0 == 12 goto OK_3
+ if $I0 == 14 goto OK_3
NOT_OK_3:
r.'puts'("not ")
OK_3:
@@ -310,6 +310,51 @@
OK_27:
r.'puts'("ok 27 - unparsed_uri()\n")
+ START_28:
+ push_eh NOT_OK_28
+ $S0 = r.'custom_response'(403, 'The squirrels are tired')
+ pop_eh
+ goto OK_28
+ NOT_OK_28:
+ r.'puts'("not ")
+ OK_28:
+ r.'puts'("ok 28 - custom_response()\n")
+
+ START_29:
+ push_eh NOT_OK_29
+ $I0 = r.'is_initial_req'()
+ pop_eh
+ goto OK_29
+ NOT_OK_29:
+ r.'puts'("not ")
+ OK_29:
+ r.'puts'("ok 29 - is_initial_req()\n")
+
+ # NOTE: this test will emit authentication headers, but we don't return
+ # a 401 unauthorized status, so it shouldn't cause a problem
+ START_30:
+ push_eh NOT_OK_30
+ r.'note_basic_auth_failure'()
+ pop_eh
+ goto OK_30
+ NOT_OK_30:
+ r.'puts'("not ")
+ OK_30:
+ r.'puts'("ok 30 - note_basic_auth_failure()\n")
+
+ # XXX putc() "succeeds" but doesn't output the proper character
+ START_31:
+ # push_eh NOT_OK_31
+ # r.'putc'('#')
+ # pop_eh
+ # r.'puts'("\n")
+ # goto OK_31
+ #NOT_OK_31:
+ # r.'puts'("not ")
+ #OK_31:
+ # r.'puts'("ok 31 - putc()\n")
+ r.'puts'("not ok 31 - putc() # TODO succeeds with incorrect output\n")
+
# STILL TODO (not tested in original client-side tests)
# assbackwards
# proxyreq
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.