File: config_utils.t

package info (click to toggle)
libdancer2-perl 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,768 kB
  • sloc: perl: 8,671; sql: 14; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;

use Test::More;
use Test::Fatal;

use Dancer2::ConfigUtils qw/normalize_config_entry/;

is( normalize_config_entry( 'charset', 'UTF-8' ), 'utf-8', 'normalized UTF-8 to utf-8');

like(
    exception { normalize_config_entry( 'charset', 'BOGUS' ) },
    qr{Charset defined in configuration is wrong : couldn't identify 'BOGUS'},
    'Configuration file charset failure',
);

done_testing;