From 02596938868beb3c59d2a4b1446470c7847dc299 Mon Sep 17 00:00:00 2001 From: Julian Albo Date: Thu, 21 Oct 2010 17:18:30 +0000 Subject: [PATCH] add a LexPad test to cover a corner case git-svn-id: https://svn.parrot.org/parrot/trunk@49623 d31e2699-5ff4-0310-a27c-f18f2fbe73fe --- t/pmc/lexpad.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/pmc/lexpad.t b/t/pmc/lexpad.t index 76ab09957d..a15cae4c75 100644 --- a/t/pmc/lexpad.t +++ b/t/pmc/lexpad.t @@ -19,10 +19,11 @@ Tests the LexPad PMC. .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 @@ eh: 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