#! /bin/sh -vx
# $Id: bibtexu-range.test 67881 2023-08-11 11:46:28Z takuji $
# Public domain. Originally written by Karl Berry, 2021.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_bibtexu=$BinDir/bibtexu$ExeExt

test -d tests || mkdir -p tests

testname=urange
# Segmentation fault

cp $srcdir/tests/$testname.aux tests/x$testname.aux

TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
BSTINPUTS=$srcdir/../tests/texmf; export BSTINPUTS
BIBINPUTS=$srcdir/tests; export BIBINPUTS

if $_bibtexu -t -d all tests/x$testname; then :; else
  echo "*** bibtexu failed, tests/x$testname.blg is:" >&2
  cat tests/x$testname.blg >&2
  exit 1
fi

diff $srcdir/tests/$testname.bbl tests/x$testname.bbl || exit 1

exit 0
