File: 13-loader-no-env.t

package info (click to toggle)
libconfig-zomg-perl 1.000000-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 264 kB
  • sloc: perl: 352; makefile: 9; sh: 4
file content (21 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;

use Test::More;

use Config::ZOMG;

$ENV{XYZZY_CONFIG} = "t/assets/some_non_existent_file.pl";

my $config = Config::ZOMG->new(qw{ name xyzzy path t/assets no_env 1 });

ok($config->load);
is($config->load->{'Controller::Foo'}->{foo},       'bar');
is($config->load->{'Controller::Foo'}->{new},       'key');
is($config->load->{'Model::Baz'}->{qux},            'xyzzy');
is($config->load->{'Model::Baz'}->{another},        'new key');
is($config->load->{'view'},                         'View::TT::New');
is($config->load->{'foo_sub'},                      '__foo(x,y)__' );
is($config->load->{'literal_macro'},                '__literal(__DATA__)__');

done_testing;