Tagging trunk at r29566 so that the revisionpm can later be synched to it.
[parrot.git] / t / examples / namespace.t
bloba2639b4ff4a9d4fafda3542b29462145040fdd96
1 #!perl
2 # Copyright (C) 2005-2007, The Perl Foundation.
3 # $Id$
5 use strict;
6 use warnings;
7 use lib qw( . lib ../lib ../../lib );
9 use Test::More;
10 use Parrot::Test tests => 1;
11 use Parrot::Config;
13 =head1 NAME
15 t/examples/namespace.t - Test examples in F<examples/namespace>
17 =head1 SYNOPSIS
19     % prove t/examples/namespace.t
21 =head1 DESCRIPTION
23 Test the examples in F<examples/namespace>.
25 =head1 SEE ALSO
27 F<t/examples/pir.t>
29 =head1 AUTHOR
31 Bernhard Schmalhofer - <Bernhard.Schmalhofer@gmx.de>
33 =cut
35 # Set up expected output for examples
37 # cannot test the exact result, just adding one method somewhere
38 # changes all. Also namespaces are hashes. While we preserve
39 # insert order, we do not gurantee any specific order.
40 # test the name of the 2 toplevel names,  parrot is using
41 my %expected = (
42     'namespace_dump.pir' => << 'END_EXPECTED',
43 /^parrot.*
44 ^__parrot_core/sm
45 END_EXPECTED
48 while ( my ( $example, $expected ) = each %expected ) {
49     example_output_like( "examples/namespace/$example", $expected );
52 # Local Variables:
53 #   mode: cperl
54 #   cperl-indent-level: 4
55 #   fill-column: 100
56 # End:
57 # vim: expandtab shiftwidth=4: