File: 12setenvars.t

package info (click to toggle)
libconfig-apacheformat-perl 1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 828 kB
  • ctags: 19
  • sloc: perl: 408; makefile: 45
file content (27 lines) | stat: -rwxr-xr-x 663 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

use Test::More tests => 13;
BEGIN { use_ok 'Config::ApacheFormat'; }

$ENV{PRESET} = $ENV{VARS} = 1;

my $config = Config::ApacheFormat->new(setenv_vars => 1, expand_vars => 1);
$config->read("t/setenvars.conf");

is($config->get('SPECIALNESS'), "Super");
isnt($ENV{SPECIALNESS}, "Super");

is($config->get('toughness'), '*Negative*');
isnt($ENV{TOUGHNESS}, '*Negative*');

is($config->get('bindir'), 'bin');
is($ENV{bindir}, undef);

is($config->get('ORACLE_HOME'), '/oracle/bin');
isnt($ENV{'ORACLE_HOME'}, '/oracle/bin');
is($ENV{'SUPER'}, ($config->get('setenv'))[1]);

is($ENV{PRESET}, undef);
is($ENV{VARS}, undef);

is($config->get('SomeVar'), 'yabba');