summaryrefslogtreecommitdiff
path: root/biblio/bibtex/bibtex-x/tests/bibtexu-char.test
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-12 03:03:37 +0000
committerNorbert Preining <norbert@preining.info>2023-08-12 03:03:37 +0000
commit1671b301fbe6cef52ccfa6085824e9677703e023 (patch)
tree351f5c112c4ca58d43310883a432d05d9c60670b /biblio/bibtex/bibtex-x/tests/bibtexu-char.test
parent3bfa493a1fafa36f78e84022bfe6511b23f51781 (diff)
CTAN sync 202308120303
Diffstat (limited to 'biblio/bibtex/bibtex-x/tests/bibtexu-char.test')
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-char.test37
1 files changed, 28 insertions, 9 deletions
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu-char.test b/biblio/bibtex/bibtex-x/tests/bibtexu-char.test
index 0ee0c0c1bd..6a06d3c8cb 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu-char.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu-char.test
@@ -1,8 +1,12 @@
#! /bin/sh -vx
-# $Id: bibtexu-char.test 67639 2023-07-15 13:46:41Z takuji $
+# $Id: bibtexu-char.test 67881 2023-08-11 11:46:28Z takuji $
# 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 tests
test -d tests || exit 1
@@ -15,40 +19,55 @@ BIBINPUTS=$srcdir/tests; export BIBINPUTS
rc=0
+if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
+ echo "*** skip test $0 on MINGW"
+ exit $rc
+fi
+
## test for add.period$
cp $srcdir/tests/periodu.aux tests/xperiodu.aux
-./bibtexu tests/xperiodu || rc=3
+$_bibtexu tests/xperiodu || rc=3
diff $srcdir/tests/periodu.bbl tests/xperiodu.bbl || rc=4
## test for substring$
cp $srcdir/tests/substru.aux tests/xsubstru.aux
-./bibtexu tests/xsubstru || rc=5
+$_bibtexu tests/xsubstru || rc=5
diff $srcdir/tests/substru.bbl tests/xsubstru.bbl || rc=6
## test for text.length$, text.prefix$
cp $srcdir/tests/txtprfxu.aux tests/xtxtprfxu.aux
-./bibtexu tests/xtxtprfxu || rc=7
+$_bibtexu tests/xtxtprfxu || rc=7
diff $srcdir/tests/txtprfxu.bbl tests/xtxtprfxu.bbl || rc=8
## test for width$
## (FIXME) Greek, Cyrillic are not impremented yet
cp $srcdir/tests/widthu.aux tests/xwidthu.aux
-./bibtexu tests/xwidthu || rc=9
+$_bibtexu tests/xwidthu || rc=9
diff $srcdir/tests/widthu.bbl tests/xwidthu.bbl || rc=10
## test for chr.to.int$, int.to.str$, int.to.chr$
cp $srcdir/tests/charu.aux tests/xcharu.aux
-./bibtexu tests/xcharu || rc=11
+$_bibtexu tests/xcharu || rc=11
diff $srcdir/tests/charu.bbl tests/xcharu.bbl || rc=12
## test for num.names$, format.name$
cp $srcdir/tests/nameu.aux tests/xnameu.aux
-max_print_line=119 ./bibtexu tests/xnameu || rc=13
+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
+$_bibtexu tests/xiscjku || rc=15
+$DIFF $srcdir/tests/iscjku.bbl tests/xiscjku.bbl || rc=16
exit $rc