diff options
Diffstat (limited to 'Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test')
-rwxr-xr-x | Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test b/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test new file mode 100755 index 00000000000..f422dd3dc70 --- /dev/null +++ b/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test @@ -0,0 +1,57 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2022-2023 TANAKA Takuji <ttk@t-lab.opal.ne.jp> +# You may freely use, modify and/or distribute this file. + +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_bibtexu=$BinDir/bibtexu$ExeExt + +test -d tests || mkdir -p tests + +LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE +# +TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF +BSTINPUTS=$srcdir/tests; export BSTINPUTS +BIBINPUTS=$srcdir/tests; export BIBINPUTS + + +rc=0 + +## test for is.knj.str$ + +icuver=1000 +$_bibtexu --version | grep 'ICU version' | sed -E 's/.*ICU version ([1-9][0-9])\..*/\1/' > tests/icuver.txt +icuver=`cat tests/icuver.txt` +echo "*** icuver="$icuver +if [ $icuver -lt 74 ]; then + # skip CJK Ideograph Extension I + # ex. U+2EBF0 + uchr='\x{2EBF0}' +fi +if [ $icuver -lt 72 ]; then + # skip CJK Ideograph Extension H + # ex. U+31350 + uchr=${uchr}'|\x{31350}' +fi +if [ $icuver -lt 70 ]; then + # skip Kana Extended B + # ex. U+1AFF0 + uchr=${uchr}'|\x{1AFF0}' +fi +if [ $icuver -lt 66 ]; then + # skip CJK Ideograph Extension G, Small Kana Extension + # ex. U+30000, U+1B150 + uchr=${uchr}'|\x{30000}|\x{1B150}' +fi +cp $srcdir/tests/iscjku.aux tests/xiscjku.aux +$_bibtexu tests/xiscjku || rc=1 +cp $srcdir/tests/iscjku.bbl tests/oiscjku.bbl +if [ $icuver -le 73 ]; then + echo "*** skip checking CJK Ideograph Extension G, H or I" + perl -i".bak" -CD -ne "print unless /${uchr}/" tests/oiscjku.bbl + perl -i".bak" -CD -ne "print unless /${uchr}/" tests/xiscjku.bbl +fi +diff tests/oiscjku.bbl tests/xiscjku.bbl || rc=2 + +exit $rc |