# -*- cperl -*-
use strict;
use warnings;
use utf8;
no warnings 'utf8';

use Test::More tests => 1;

use Biber;
use Biber::Output::bbl;
use Log::Log4perl;
use Unicode::Normalize;
chdir("t/tdata");

# Set up Biber object
my $biber = Biber->new(noconf => 1);
my $LEVEL = 'ERROR';
my $l4pconf = qq|
    log4perl.category.main                             = $LEVEL, Screen
    log4perl.category.screen                           = $LEVEL, Screen
    log4perl.appender.Screen                           = Log::Log4perl::Appender::Screen
    log4perl.appender.Screen.utf8                      = 1
    log4perl.appender.Screen.Threshold                 = $LEVEL
    log4perl.appender.Screen.stderr                    = 0
    log4perl.appender.Screen.layout                    = Log::Log4perl::Layout::SimpleLayout
|;
Log::Log4perl->init(\$l4pconf);

$biber->parse_ctrlfile('translit.bcf');
$biber->set_output_obj(Biber::Output::bbl->new());

# (re)generate information based on option settings
$biber->prepare;
my $section = $biber->sections->get_section(0);
my $main = $biber->datalists->get_list('nty/global//global/global');

is_deeply([map {NFC($_)} $main->get_keys->@*], ['aachen', 'aix-en-provence', 'arnhem', 'augsburg', 'avignon', 'berlin', 'utrecht', 'zeven', 'kumāra', 'kha', 'jīvita', 'jvara', 'tyāga', 'tridaśa', 'tvid', 'kṣetra', 'jñāna'], 'translit sorting - 1');


