Changeset 9355 for trunk/Padre-Plugin-wxGlade/t/03_wxg.t
- Timestamp:
- 11/30/09 22:16:31 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre-Plugin-wxGlade/t/03_wxg.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-wxGlade/t/03_wxg.t
r9354 r9355 6 6 use strict; 7 7 use warnings; 8 use Test::More 0.82 tests => 2;8 use Test::More 0.82 tests => 19; 9 9 use File::Spec::Functions ':ALL'; 10 10 use Padre::Plugin::wxGlade::WXG (); … … 12 12 my $SAMPLE = catfile( 't', 'sample', 'Dialogs.wxg' ); 13 13 ok( -f $SAMPLE, 'Sample wxg file exists' ); 14 15 my @WINDOWS = qw{ 16 frame_1 17 dialog_find 18 dialog_replace 19 dialog_openurl 20 dialog_warning 21 }; 14 22 15 23 … … 25 33 ); 26 34 35 # Accessor tests 36 is( $wxg->wxg, $SAMPLE, '->file ok' ); 37 is( $wxg->language, 'perl', '->language ok' ); 38 is( $wxg->for_version, '2.8', '->for_version ok' ); 39 is( $wxg->path, 'F:\padre\wxglade\Dialogs.pl', '->path ok' ); 40 41 # Get the list of windows 42 my @windows = $wxg->windows; 43 is_deeply( 44 \@windows, 45 \@WINDOWS, 46 'Found expected windows', 47 ); 48 49 # Load a named window 50 is( ref($wxg->window('dialog_warning')), 'HASH', 'Found dialog_warning' ); 51 is( ref($wxg->top_window), 'HASH', 'Found ->top_window' ); 52 53 # Extract the Perl class for each 54 foreach my $name ( @WINDOWS ) { 55 my $code = $wxg->extract( $wxg->window($name) ); 56 ok( defined $code, 'Found code for $name' ); 57 ok( length($code), 'Found code for $name' ); 58 } 59 27 60 1;
Note: See TracChangeset
for help on using the changeset viewer.
