[svn:mod_parrot] r482 - mod_parrot/trunk/t/response/TestAPI

[email protected] Fri, 7 Nov 2008 08:57:44 -0800 (PST)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Fri Nov  7 08:57:43 2008
New Revision: 482

Modified:
   mod_parrot/trunk/t/response/TestAPI/request_rec.pir

Log:
add a null test for read(), just to make sure the raw call works.
need to flesh out some more tests in the near future


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	Fri Nov  7 08:57:43 2008
@@ -9,7 +9,7 @@
 
     ap_const = get_root_global [ 'ModParrot'; 'Apache'; 'Constants' ], 'table'
 
-    r.'puts'("1..33\n")
+    r.'puts'("1..34\n")
 
   # XXX this should be fatal on failure
   START_1:
@@ -376,6 +376,17 @@
   OK_33:
     r.'puts'("ok 33 - method()\n")
 
+  START_34:
+    push_eh NOT_OK_34
+    $P0 = new 'String'
+    $I0 = r.'read'($P0, 1024)
+    pop_eh
+    if $I0 == 0 goto OK_34
+  NOT_OK_34:
+    r.'puts("not ")
+  OK_34:
+    r.'puts'("ok 34 - null read()\n")
+
     # STILL TODO (not tested in original client-side tests)
     # assbackwards
     # proxyreq