3
# Tests the logic for extracting the list of functions in a program
10
unless ( $ENV{DISPLAY} or $^O eq 'MSWin32' ) {
11
plan skip_all => 'Needs DISPLAY';
18
use Padre::Document::Perl::FunctionList ();
20
# Sample code we will be parsing
21
my $code = <<'END_PERL';
32
*_backwards = \&backwards;
39
######################################################################
44
# Create the function list parser
46
'Padre::Document::Perl::FunctionList',
51
# Executing the parsing job
52
ok( $task->run, '->run ok' );
54
# Check the result of the parsing
68
'Found expected functions',
76
######################################################################
77
# Alphabetical Ordering
81
# Create the function list parser
83
'Padre::Document::Perl::FunctionList',
85
order => 'alphabetical',
89
# Executing the parsing job
90
ok( $task->run, '->run ok' );
92
# Check the result of the parsing
106
'Found expected functions',
114
######################################################################
115
# Alphabetical Ordering (Private Last)
119
# Create the function list parser
121
'Padre::Document::Perl::FunctionList',
123
order => 'alphabetical_private_last',
127
# Executing the parsing job
128
ok( $task->run, '->run ok' );
130
# Check the result of the parsing
144
'Found expected functions',