1# -*- cperl -*-
2use strict;
3use warnings;
4use utf8;
5no warnings 'utf8';
6
7use Test::More;
8
9if ($ENV{BIBER_DEV_TESTS}) {
10  plan tests => 5;
11}
12else {
13  plan skip_all => 'BIBER_DEV_TESTS not set';
14}
15
16use IPC::Run3;
17use File::Temp;
18use File::Compare;
19use File::Which;
20
21
22my $perl = which('perl');
23
24my $tmpfile = File::Temp->new();
25#my $tmpfile = File::Temp->new(UNLINK => 0);
26my $bbl = $tmpfile->filename;
27#print "File: $bbl\n";
28my $stdout;
29
30run3  [ $perl, 'bin/biber', '--noconf', '--nolog', "--output-file=$bbl", 't/tdata/full.bcf' ], \undef, \$stdout, \undef;
31
32is($? >> 8, 0, 'Full test has zero exit status');
33ok(compare($bbl, 't/tdata/full1.bbl') == 0, 'Testing lossort case and sortinit for macros');
34like($stdout, qr|WARN - Duplicate entry key: 'F1' in file 't/tdata/full\.bib', skipping \.\.\.|ms, 'Testing duplicate/case key warnings - 1');
35like($stdout, qr|WARN - Possible typo \(case mismatch\) between datasource keys: 'f1' and 'F1' in file 't/tdata/full\.bib'|ms, 'Testing duplicate/case key warnings - 2');
36like($stdout, qr|WARN - Possible typo \(case mismatch\) between citation and datasource keys: 'C1' and 'c1' in file 't/tdata/full\.bib'|ms, 'Testing duplicate/case key warnings - 3');
37