2 # Copyright (C) 2006-2010, Parrot Foundation.
7 t/pmc/lexpad.t - test LexPad PMC
12 % prove t/pmc/lexpad.t
21 .include 'test_more.pir'
33 ok(0, "shouldn't be able to create a LexPad without an initializer")
36 ok(1, "can't create a LexPad without an initializer")
47 is($I0, 1, "get LexPad elements")
49 $I0 = exists $P0['p1']
50 is($I0, 1, ".lex exists_keyed true")
52 $I0 = exists $P0['nosuchlex']
53 is($I0, 0, ".lex exists_keyed false")
57 $P0['nosuchlex'] = $P1
58 ok(0, "setting a non existent .lex should throw")
62 ok(1, "setting a non existent .lex throws")
68 .local pmc str1,str2,str3
81 dlp = interp['lexpad']
86 unless iterator goto iter_done
91 is(value, 'pants', "Got value from iterator")
100 # vim: expandtab shiftwidth=4 ft=pir: