8
unless ( $ENV{DISPLAY} or $^O eq 'MSWin32' ) {
9
plan skip_all => 'Needs DISPLAY';
19
isa_ok( $app, 'Padre' );
23
isa_ok( $ide, 'Padre' );
24
refis( $ide, $app, '->ide matches ->new' );
28
my $ide = Padre::Current->ide;
29
isa_ok( $ide, 'Padre' );
30
refis( $ide, $app, '->ide matches ->new' );
34
my $config = $app->config;
35
isa_ok( $config, 'Padre::Config' );
37
is( $config->startup_files => 'new' );
38
is( $config->main_lockinterface => 1 );
39
is( $config->main_functions => 0 );
40
is( $config->main_functions_order => 'alphabetical' );
41
is( $config->main_outline => 0 );
42
is( $config->main_directory => 0 );
43
is( $config->main_output => 0 );
44
is( $config->main_output_ansi => 1 );
45
is( $config->main_syntaxcheck => 0 );
46
is( $config->main_statusbar => 1 );
48
my $editor_font = $config->editor_font;
49
if ( $^O eq 'MSWin32' ) {
50
ok( ( $editor_font eq '' ) || ( $editor_font eq 'consolas 10' ),
51
'editor_font is either empty or consolas 10 on win32'
54
is( $editor_font => '' );
57
is( $config->editor_linenumbers => 1 );
58
is( $config->editor_eol => 0 );
59
is( $config->editor_indentationguides => 0 );
60
is( $config->editor_calltips => 0 );
61
is( $config->editor_autoindent => 'deep' );
62
is( $config->editor_whitespace => 0 );
63
is( $config->editor_folding => 0 );
64
is( $config->editor_wordwrap => 0 );
65
is( $config->editor_currentline => 1 );
66
is( $config->editor_currentline_color => 'FFFF04' );
67
is( $config->editor_indent_auto => 1 );
68
is( $config->editor_indent_tab_width => 8 );
69
is( $config->editor_indent_width => 8 );
70
is( $config->editor_indent_tab => 1 );
71
is( $config->lang_perl5_beginner => 1 );
72
is( $config->find_case => 1 );
73
is( $config->find_regex => 0 );
74
is( $config->find_reverse => 0 );
75
is( $config->find_first => 0 );
76
is( $config->find_nohidden => 1 );
77
is( $config->run_save => 'same' );
78
is( $config->threads => 1 );
79
is( $config->locale => '' );
80
is( $config->locale_perldiag => '' );
81
is( $config->editor_style => 'default' );
82
is( $config->main_maximized => 0 );
83
is( $config->main_top => -1 );
84
is( $config->main_left => -1 );
85
is( $config->main_width => -1 );
86
is( $config->main_height => -1 );
93
#####################################################################
94
# Internal Structure Tests
96
# These test that the internal structure of the application matches
97
# expected normals, and that structure navigation methods works normally.
99
my $padre = Padre->ide;
100
isa_ok( $padre, 'Padre' );
102
# The Wx::App(lication)
103
my $app = $padre->wx;
104
isa_ok( $app, 'Padre::Wx::App' );
107
my $main = $app->main;
108
isa_ok( $main, 'Padre::Wx::Main' );
110
# By default, most of the tools shouldn't exist
111
ok( !$main->has_output, '->has_output is false' );
112
ok( !$main->has_outline, '->has_outline is false' );
113
ok( !$main->has_syntax, '->has_syntax is false' );
116
my $menu = $main->menu;
117
isa_ok( $menu, 'Padre::Wx::Menubar' );
118
refis( $menu->main, $main, 'Menubar ->main gets the main window' );
121
my $file = $menu->file;
122
isa_ok( $file, 'Padre::Wx::Menu' );
125
my $notebook = $main->notebook;
126
isa_ok( $notebook, 'Padre::Wx::Notebook' );
129
my $current = $main->current;
130
isa_ok( $current, 'Padre::Current' );
131
isa_ok( $current->main, 'Padre::Wx::Main' );
132
isa_ok( $current->notebook, 'Padre::Wx::Notebook' );
133
refis( $current->main, $main, '->current->main ok' );
134
refis( $current->notebook, $notebook, '->current->notebook ok' );