[svn:parrot] r38079 - branches/packfile_revamp/t/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Apr 12 08:03:15 UTC 2009


Author: bacek
Date: Sun Apr 12 08:03:14 2009
New Revision: 38079
URL: https://trac.parrot.org/parrot/changeset/38079

Log:
Add test for uuid equals to '\0'

Modified:
   branches/packfile_revamp/t/pmc/packfile.t

Modified: branches/packfile_revamp/t/pmc/packfile.t
==============================================================================
--- branches/packfile_revamp/t/pmc/packfile.t	Sun Apr 12 08:02:58 2009	(r38078)
+++ branches/packfile_revamp/t/pmc/packfile.t	Sun Apr 12 08:03:14 2009	(r38079)
@@ -22,7 +22,7 @@
 .sub main :main
 .include 'test_more.pir'
 
-    plan(28)
+    plan(30)
     'test_new'()
     'test_get_string'()
     'test_set_string'()
@@ -71,6 +71,15 @@
     pf = new ['Packfile']
     pf["uuid"] = "fe9ab64082e0f6bbbd7b1e8264127908"
     ok(1, 'set_string(uuid)')
+
+    # Special check for 0
+    $S0 = "\0"
+    $I0 = length $S0
+    is($I0, 1, "Length is 1")
+    pf["uuid"] = $S0
+    $S1 = pf["uuid"]
+    $I1 = length $S1
+    is($I1, 1, "Fetched length is 1")
     
     # Requesting unknown key should throw exception
     push_eh unknown_key


More information about the parrot-commits mailing list