[cage] Fix pgegrep, which was merely an innocent bystander in the Great Namespace...
[parrot.git] / t / op / load_bytecode.t
blob3cf8c8d70a2307b85f02fe1d0ed6e09bcec4c2a5
1 #!perl
2 # Copyright (C) 2006-2007, Parrot Foundation.
3 # $Id$
5 use strict;
6 use warnings;
7 use lib qw( . lib ../lib ../../lib );
8 use Test::More;
9 use Parrot::Test tests => 3;
11 =head1 NAME
13 t/op/load_bytecode.t - loading bytecode tests
15 =head1 SYNOPSIS
17         % prove t/op/load_bytecode.t
19 =head1 DESCRIPTION
21 Tests the C<load_bytecode> operation.
23 =cut
25 pir_error_output_like( <<'CODE', <<'OUTPUT', "load_bytecode on NULL" );
26 .sub main :main
27     load_bytecode $S0
28 .end
29 CODE
30 /no file name/
31 OUTPUT
33 pir_error_output_like( <<'CODE', <<'OUTPUT', "load_bytecode on directory" );
34 .sub main :main
35     load_bytecode 't'
36 .end
37 CODE
38 /t' is a directory/
39 OUTPUT
41 pir_error_output_like( <<'CODE', <<'OUTPUT', "load_bytecode on non-existent file" );
42 .sub main :main
43         load_bytecode 'no_file_by_this_name'
44 .end
45 CODE
46 /"load_bytecode" couldn't find file 'no_file_by_this_name'/
47 OUTPUT
49 # Local Variables:
50 #   mode: cperl
51 #   cperl-indent-level: 4
52 #   fill-column: 100
53 # End:
54 # vim: expandtab shiftwidth=4: