tagged release 0.6.4
[parrot.git] / languages / pugs / t / pmc / capture.t
blob1a2527c87d8a0cfffd715efc64ce78f541211d27
1 =head NAME
3 dynclasses/siva.t     -- siva pmc test
5 =head DESCRIPTION
8 This file is used to test the siva.pmc.
9 Run C<make> in dynclasses/ to buil the siva library.
11 Run from the root folder of the parrot distribution
13   perl  dynclasses/siva.t
15 from the the shell to test.
17 See the README in dynclasses/ for more information.
19 =cut
22 use lib 'lib';
23 use Parrot::Test tests => 1;
24 use Test::More;
26 pir_output_is(<<'CODE', <<'OUTPUT', "Testing siva");
28 .HLL "Perl6", "pugs_group"
29 .sub _main
30 #  loadlib P10, "siva"
31 #  print "siva loaded\n"
32 #  find_type I10, "siva"
33   loadlib $P1, "pugs_group"
35   $P0 = new .PugsCapture
36   $P1 = new .PugsInt
37   $P2 = new .PugsInt
38   set $P1, 4
39   set $P0[5], P1
40   print $P1
41   elements $I0, $P0
42   print $I0
44   set $S1, "toto"
45   set $S2, $S1
46   print $S2
47   print "\n"
49   print $P1
50   print $I0
51   print $S2
52   print "\n"
54   new $P3, .Key
55   set $P3, "key"
56   set $P0[$P3], "val"
57   set $P4,  $P0[$P3]
58   print $P4
59   print "\n"
60   set $S4,  $P0[$P3]
61   print $S4
62   print "\n"
64   set $P3, 2
65   set $P0[$P3], 666
66   set $I3, $P0[$P3]
67   print $I3
68   print "\n"
70   set $P5,  $P0["val"]
72 .end
73 CODE
74 46toto
75 46toto
76 val
77 val
78 666
79 OUTPUT