summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/bibtex/biber/t/10-configfile.t
blob: 039cfbadd8d58c7e185fe6a5fd27ac0a9bfe02e0 (plain)
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
use strict;
use warnings;

use Test::More tests => 6;
use Biber;
use Cwd qw(getcwd);
use File::Spec;
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($ERROR);

my $biberA = Biber->new( configfile => "t/tdata/biber2.conf" );
is(Biber::Config->getoption('mincrossrefs'), 5);
my %colloptsA = ( level => 3, table => "/home/user/data/otherkeys.txt" );
my %nosort = (author => [ q/\A\p{L}{2}\p{Pd}/, q/[\x{2bf}\x{2018}]/ ],
              translator => q/[\x{2bf}\x{2018}]/ );
is_deeply(Biber::Config->getoption('collate_options'), \%colloptsA);
is_deeply(Biber::Config->getoption('nosort'), \%nosort);

chdir("t/tdata");
my $cwdB = getcwd();
my $biberB = Biber->new(configfile => "biber3.conf");
is(Biber::Config->getcmdlineoption('configfile'), File::Spec->catfile("biber3.conf"));
is(Biber::Config->getoption('mincrossrefs'), 3);
my %colloptsB = ( level => 1, table => "/home/user/data/mykeys.txt" );
is_deeply(Biber::Config->getoption('collate_options'), \%colloptsB);