2 # Copyright (C) 2001-2005, Parrot Foundation.
7 use lib qw( . lib ../lib ../../lib );
9 use Parrot::Test tests => 1;
13 t/src/exit.t - Exiting
21 Tests C<Parrot_exit()> and C<Parrot_on_exit()> functions.
25 c_output_is( <<'CODE', <<'OUTPUT', "on_exit - interpreter" );
27 #include <parrot/parrot.h>
28 #include <parrot/embed.h>
31 ex1(PARROT_INTERP, int x, void*p)
37 ex2(PARROT_INTERP, int x, void*p)
43 ex3(PARROT_INTERP, int x, void*p)
45 Parrot_io_printf(interp, "ex3\n");
49 main(int argc, char* argv[])
53 interp = Parrot_new(NULL);
57 Parrot_on_exit(interp, ex1, 0);
58 Parrot_on_exit(interp, ex2, 0);
59 Parrot_on_exit(interp, ex3, 0);
60 Parrot_exit(interp, 0);
71 # cperl-indent-level: 4
74 # vim: expandtab shiftwidth=4: