~ubuntu-branches/ubuntu/saucy/padre/saucy-proposed

« back to all changes in this revision

Viewing changes to t/97_help_about.t

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont, gregor herrmann, Dominique Dumont
  • Date: 2012-01-04 12:04:20 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120104120420-i5oybqwf91m1d3il
Tags: 0.92.ds1-1
[ gregor herrmann ]
* Remove debian/source/local-options; abort-on-upstream-changes
  and unapply-patches are default in dpkg-source since 1.16.1.
* Swap order of alternative (build) dependencies after the perl
  5.14 transition.

[ Dominique Dumont ]
* Imported Upstream version 0.92.ds1
* removed fix-spelling patch (applied upstream)
* lintian-override: use wildcard to avoid listing a gazillion files
* updated size of some 'not-real-man-page' entries
* rules: remove dekstop cruft (replaced by a file provided in debian
  directory)
* control: removed Breaks statement. Add /me to uploaders. Updated
  dependencies
* rules: make sure that non-DFSG file (i.e. the cute butterfly, sigh)
  is not distributed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
# Turn on $OUTPUT_AUTOFLUSH
 
7
$| = 1;
 
8
use Test::More;
 
9
 
 
10
BEGIN {
 
11
        unless ( $ENV{DISPLAY} or $^O eq 'MSWin32' ) {
 
12
                plan skip_all => 'Needs DISPLAY';
 
13
                exit 0;
 
14
        }
 
15
        plan tests => 21;
 
16
}
 
17
 
 
18
use Test::NoWarnings;
 
19
use t::lib::Padre;
 
20
use Padre::Wx;
 
21
use Padre;
 
22
use_ok('Padre::Wx::Dialog::About');
 
23
 
 
24
# Create the IDE
 
25
my $padre = new_ok('Padre');
 
26
my $main  = $padre->wx->main;
 
27
isa_ok( $main, 'Padre::Wx::Main' );
 
28
 
 
29
# Create the patch dialog
 
30
my $dialog = new_ok( 'Padre::Wx::Dialog::About', [$main] );
 
31
 
 
32
# Check the notebook properties
 
33
my $notebook = $dialog->notebook;
 
34
isa_ok( $notebook, 'Wx::Notebook' );
 
35
 
 
36
# Check the output properties
 
37
my $output = $dialog->output;
 
38
isa_ok( $output, 'Wx::TextCtrl' );
 
39
 
 
40
# Check unicode translated names
 
41
SCOPE: {
 
42
        use utf8;
 
43
 
 
44
        $dialog->_set_up;
 
45
        is( $dialog->creator->GetLabel,       'Gábor Szabó',     'Check utf8 name for Gabor Szabo' );
 
46
        is( $dialog->ahmad_zawawi->GetLabel,  'أحمد محمد زواوي', 'Check utf8 name for Ahmad Zawawi' );
 
47
        is( $dialog->jerome_quelin->GetLabel, 'Jérôme Quelin',   'Check utf8 name for Jerome Quelin' );
 
48
        is( $dialog->shlomi_fish->GetLabel,   'שלומי פיש',       'Check utf8 name for Shlomi Fish' );
 
49
}
 
50
 
 
51
#######
 
52
# let's check our subs/methods.
 
53
#######
 
54
my @subs = qw( _core_info _set_up _information _translation _wx_info new run );
 
55
 
 
56
use_ok( 'Padre::Wx::Dialog::About', @subs );
 
57
 
 
58
foreach my $subs (@subs) {
 
59
        can_ok( 'Padre::Wx::Dialog::About', $subs );
 
60
}
 
61
 
 
62
#######
 
63
# let's test for image as it's our centre piece
 
64
#######
 
65
use_ok('Padre::Util');
 
66
 
 
67
my $FILENAME = Padre::Util::splash;
 
68
ok( -f $FILENAME, "Found image $FILENAME" );