diff options
Diffstat (limited to 'Build/source/texk/bibtex-x/tests')
-rwxr-xr-x | Build/source/texk/bibtex-x/tests/bibtexu-char.test | 18 | ||||
-rwxr-xr-x | Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test | 57 | ||||
-rw-r--r-- | Build/source/texk/bibtex-x/tests/iscjku.bbl | 1 | ||||
-rw-r--r-- | Build/source/texk/bibtex-x/tests/testiscjku.bib | 1 |
4 files changed, 60 insertions, 17 deletions
diff --git a/Build/source/texk/bibtex-x/tests/bibtexu-char.test b/Build/source/texk/bibtex-x/tests/bibtexu-char.test index a23e6a81869..88693014cf1 100755 --- a/Build/source/texk/bibtex-x/tests/bibtexu-char.test +++ b/Build/source/texk/bibtex-x/tests/bibtexu-char.test @@ -7,8 +7,7 @@ BinDir=${BinDir:-.} ExeExt=${ExeExt:-} _bibtexu=$BinDir/bibtexu$ExeExt -test -d tests || mkdir tests -test -d tests || exit 1 +test -d tests || mkdir -p tests LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE # @@ -55,19 +54,4 @@ cp $srcdir/tests/nameu.aux tests/xnameu.aux max_print_line=119 $_bibtexu tests/xnameu || rc=13 diff $srcdir/tests/nameu.bbl tests/xnameu.bbl || rc=14 -## test for is.knj.str$ - -DIFF="diff"; icuver=0 -$_bibtexu --version | grep "ICU version 70" && icuver=70 -if [ $icuver -eq 70 ]; then - # skip CJK Ideograph Extension H - # U+31350 -> \360\261\215\220 - uchr='\360\261\215\220' - DIFF="diff --ignore-matching-lines="`printf "${uchr}"` - echo "*** skip checking CJK Ideograph Extension H" -fi -cp $srcdir/tests/iscjku.aux tests/xiscjku.aux -$_bibtexu tests/xiscjku || rc=15 -$DIFF $srcdir/tests/iscjku.bbl tests/xiscjku.bbl || rc=16 - exit $rc 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 diff --git a/Build/source/texk/bibtex-x/tests/iscjku.bbl b/Build/source/texk/bibtex-x/tests/iscjku.bbl index 1cf81b781bd..4bef9f3f231 100644 --- a/Build/source/texk/bibtex-x/tests/iscjku.bbl +++ b/Build/source/texk/bibtex-x/tests/iscjku.bbl @@ -54,6 +54,7 @@ \item 一二三四漆捌玖拾: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𰀀𰀁𰀂𰀃𰀄𰀅𰀆𰀇: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𪜀𪜁𪜂𪜃𪜄𪜅𪜆𪜇: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 +\item : 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𱍐𱍑𱍒𱍓𱍔𱍕𱍖𱍗: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 㐂㒵㓛㞍㟢㐆㐬㐮㔫㚑㐧: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item ⺐⺒⺓⺔⺖⺗⺘⺙⻭⻯⻲: 2048 2048 hz:0 kn:0 hg:0 bp:0 diff --git a/Build/source/texk/bibtex-x/tests/testiscjku.bib b/Build/source/texk/bibtex-x/tests/testiscjku.bib index 34c9df07a26..a0c47dd9902 100644 --- a/Build/source/texk/bibtex-x/tests/testiscjku.bib +++ b/Build/source/texk/bibtex-x/tests/testiscjku.bib @@ -23,6 +23,7 @@ @Type{cjk-ideograph-ExtC-1000, field = {𪜀𪜁𪜂𪜃𪜄𪜅𪜆𪜇}, } @Type{cjk-ideograph-ExtG-1000, field = {𰀀𰀁𰀂𰀃𰀄𰀅𰀆𰀇}, } @Type{cjk-ideograph-ExtH-1000, field = {𱍐𱍑𱍒𱍓𱍔𱍕𱍖𱍗}, } +@Type{cjk-ideograph-ExtI-1000, field = {}, } @Type{hangul-1000, field = {가나다라마한글텍}, } |