[svn:parrot] r49623 - trunk/t/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Oct 21 17:18:31 UTC 2010


Author: NotFound
Date: Thu Oct 21 17:18:30 2010
New Revision: 49623
URL: https://trac.parrot.org/parrot/changeset/49623

Log:
add a LexPad test to cover a corner case

Modified:
   trunk/t/pmc/lexpad.t

Modified: trunk/t/pmc/lexpad.t
==============================================================================
--- trunk/t/pmc/lexpad.t	Thu Oct 21 07:09:20 2010	(r49622)
+++ trunk/t/pmc/lexpad.t	Thu Oct 21 17:18:30 2010	(r49623)
@@ -19,10 +19,11 @@
 
 .sub main :main
     .include 'test_more.pir'
-    plan(8)
+    plan(9)
 
     new_test()
     test_keyed()
+    test_keyed_empty()
     test_iter()
 .end
 
@@ -63,6 +64,15 @@
 end:
 .end
 
+.sub test_keyed_empty
+    .local pmc info, pad, lex
+    info = new ['LexInfo']
+    pad = new ['LexPad'], info
+    lex = pad['nosuchlex']
+    $I0 = isnull lex
+    ok($I0, 'get an item from empty lexpad gives null')
+.end
+
 .sub 'test_iter'
 
     .local pmc str1,str2,str3


More information about the parrot-commits mailing list