~ubuntu-branches/ubuntu/raring/padre/raring

« back to all changes in this revision

Viewing changes to t/04_config.t

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont
  • Date: 2012-01-25 16:16:07 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20120125161607-ydc0rgxlfqk2ctrb
Tags: 0.94+dfsg1-1
* new upstream version
* watch: updated to match dfsg tag
* debian/not-real-manual.list: updated lib/Padre/Document/Perl.pm entry
* debian/copyright:
  * fixed DEP-5 syntax errors
  * updated copyright years.
  * reformatted with cme
* control: updated dependency list

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
use strict;
4
4
use warnings;
5
 
use constant NUMBER_OF_CONFIG_OPTIONS => 145;
 
5
use constant NUMBER_OF_CONFIG_OPTIONS => 159;
6
6
 
7
7
# Move of Debug to Run Menu
8
 
use Test::More tests => NUMBER_OF_CONFIG_OPTIONS * 2 + 28;
 
8
use Test::More tests => NUMBER_OF_CONFIG_OPTIONS * 2 + 24;
9
9
use Test::NoWarnings;
10
10
use File::Spec::Functions ':ALL';
11
11
use File::Temp ();
31
31
isa_ok( $config->host,  'Padre::Config::Host' );
32
32
isa_ok( $config->human, 'Padre::Config::Human' );
33
33
is( $config->project,        undef, '->project is undef' );
34
 
is( $config->host->version,  undef, '->host->version is undef' );
35
 
is( $config->human->version, undef, '->human->version is undef' );
36
34
 
37
35
# Loading the config file should not result in Wx loading
38
36
is( $Wx::VERSION, undef, 'Wx was not loaded during config read' );
51
49
 
52
50
# The config version number is a requirement for every config and
53
51
# the only key which is allowed to live in an empty config.
54
 
my %test_config = ( Version => $Padre::Config::VERSION );
 
52
my %test_config = ();
55
53
 
56
54
# ... and that they don't leave a permanent state.
57
55
is_deeply(
69
67
# Saving the config file should not result in Wx loading
70
68
is( $Wx::VERSION, undef, 'Wx was not loaded during config write' );
71
69
 
72
 
# Check that we have a version for the parts now
73
 
is( $config->host->version,  1, '->host->version is set' );
74
 
is( $config->human->version, 1, '->human->version is set' );
75
 
 
76
70
# Set values on both the human and host sides
77
71
ok( $config->set( main_lockinterface => 0 ),
78
72
        '->set(human) ok',
100
94
 
101
95
 
102
96
 
 
97
 
103
98
######################################################################
104
99
# Check configuration values not in the relevant option list
105
100
 
130
125
 
131
126
        # Configuration should ignore a value not in configuration and go
132
127
        # with the default instead.
133
 
        is( $bad->default('lang_perl5_lexer'), 'stc', 'Default Perl 5 lexer ok' );
134
 
        is( $bad->lang_perl5_lexer,            'stc', '->lang_perl5_lexer matches default' );
 
128
        is( $bad->default('lang_perl5_lexer'), '', 'Default Perl 5 lexer ok' );
 
129
        is( $bad->lang_perl5_lexer,            '', '->lang_perl5_lexer matches default' );
135
130
}