Skip to content

Commit

Permalink
add a LexPad test to cover a corner case
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@49623 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
NotFound committed Oct 21, 2010
1 parent 0c08cd4 commit 0259693
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion t/pmc/lexpad.t
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0259693

Please sign in to comment.