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

« back to all changes in this revision

Viewing changes to t/08-style.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
 
# Test the style subsystem
4
 
 
5
 
use strict;
6
 
use warnings;
7
 
use Test::More;
8
 
 
9
 
 
10
 
BEGIN {
11
 
        unless ( $ENV{DISPLAY} or $^O eq 'MSWin32' ) {
12
 
                plan skip_all => 'Needs DISPLAY';
13
 
                exit 0;
14
 
        }
15
 
}
16
 
 
17
 
use Test::NoWarnings;
18
 
use File::Spec::Functions ':ALL';
19
 
use t::lib::Padre;
20
 
 
21
 
plan( tests => 40 );
22
 
 
23
 
 
24
 
my $dir = catdir( 'share', 'styles' );
25
 
ok( -d $dir, "Found style directory $dir" );
26
 
 
27
 
my @styles = qw{
28
 
        default
29
 
        night
30
 
        notepad
31
 
        ultraedit
32
 
        solarize_dark
33
 
};
34
 
 
35
 
 
36
 
 
37
 
 
38
 
 
39
 
######################################################################
40
 
# Check the new Padre::Style API
41
 
 
42
 
use_ok('Padre::Config::Style');
43
 
my $hash = Padre::Config::Style->core_styles;
44
 
is( scalar( keys %$hash ), 6, 'Found 6 core styles' );
45
 
my @user = Padre::Config::Style->user_styles;
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
51
 
######################################################################
52
 
# Make sure the bundled styles all load
53
 
 
54
 
foreach my $name (@styles) {
55
 
        my $file = catfile( $dir, "$name.yml" );
56
 
        ok( -f $file, "Found style file $file" );
57
 
        my $style = Padre::Config::Style->load( $name => $file );
58
 
        isa_ok( $style, 'Padre::Config::Style' );
59
 
        is( $style->name,        $name,  '->name ok' );
60
 
        is( ref( $style->data ), 'HASH', '->data is a HASH' );
61
 
        foreach (qw{ plain padre perl }) {
62
 
                is( ref( $style->data->{$_} ), 'HASH', "->data->{$_} is defined" );
63
 
        }
64
 
}
65
 
 
66
 
 
67
 
 
68
 
 
69
 
 
70
 
######################################################################
71
 
# Ensure the new style API loads as well
72
 
 
73
 
use_ok('Padre::Wx::Style');