texlive[67881] Build/source/texk/bibtex-x: bibtex-x: update tests

commits+takuji at tug.org commits+takuji at tug.org
Fri Aug 11 13:46:28 CEST 2023


Revision: 67881
          http://tug.org/svn/texlive?view=revision&revision=67881
Author:   takuji
Date:     2023-08-11 13:46:28 +0200 (Fri, 11 Aug 2023)
Log Message:
-----------
bibtex-x: update tests

Modified Paths:
--------------
    trunk/Build/source/texk/bibtex-x/ChangeLog
    trunk/Build/source/texk/bibtex-x/tests/bibtex8-char.test
    trunk/Build/source/texk/bibtex-x/tests/bibtex8-sort.test
    trunk/Build/source/texk/bibtex-x/tests/bibtex8.test
    trunk/Build/source/texk/bibtex-x/tests/bibtex8u-mem.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu-basic.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu-char.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu-range.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu-sort.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test
    trunk/Build/source/texk/bibtex-x/tests/bibtexu.test

Modified: trunk/Build/source/texk/bibtex-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/bibtex-x/ChangeLog	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/ChangeLog	2023-08-11 11:46:28 UTC (rev 67881)
@@ -1,3 +1,11 @@
+2023-08-11  TANAKA Takuji  <ttk at 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 at t-lab.opal.ne.jp>
 
 	* configure.ac, version.h:

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtex8-char.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtex8-char.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtex8-char.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -3,12 +3,16 @@
 # Copyright 2022 TANAKA Takuji <ttk at 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
 
@@ -15,32 +19,32 @@
 
 ## 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
 
 

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtex8-sort.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtex8-sort.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtex8-sort.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -6,6 +6,10 @@
 
 # Using test data from Philipp Lehman <lehman at gmx.net>
 
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_bibtex8=$BinDir/bibtex8$ExeExt
+
 test -d tests || mkdir -p tests
 
 rc=0
@@ -21,12 +25,12 @@
 
 ## 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

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtex8.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtex8.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtex8.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -5,6 +5,10 @@
 # Copyright 2023 TANAKA Takuji <ttk at 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,13 +21,13 @@
 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
 
@@ -30,18 +34,18 @@
 
 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

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtex8u-mem.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtex8u-mem.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtex8u-mem.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -6,6 +6,11 @@
 
 # Using test data from Philipp Lehman <lehman at 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 @@
 
   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
 

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu-basic.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu-basic.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu-basic.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -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 @@
 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

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu-char.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu-char.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu-char.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -3,6 +3,10 @@
 # Copyright 2022-2023 TANAKA Takuji <ttk at 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 @@
 
 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

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu-range.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu-range.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu-range.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -2,6 +2,10 @@
 # $Id$
 # 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,7 +17,7 @@
 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
@@ -20,3 +24,5 @@
 fi
 
 diff $srcdir/tests/$testname.bbl tests/x$testname.bbl || exit 1
+
+exit 0

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu-sort.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu-sort.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu-sort.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -3,6 +3,10 @@
 # Copyright 2022-2023 TANAKA Takuji <ttk at 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 @@
 
 ## 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 @@
 
 ## 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

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -4,6 +4,10 @@
 # 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,7 +18,7 @@
 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
@@ -21,3 +25,5 @@
 fi
 
 diff $srcdir/tests/$testname.bbl tests/x$testname.bbl || exit 1
+
+exit 0

Modified: trunk/Build/source/texk/bibtex-x/tests/bibtexu.test
===================================================================
--- trunk/Build/source/texk/bibtex-x/tests/bibtexu.test	2023-08-11 11:46:24 UTC (rev 67880)
+++ trunk/Build/source/texk/bibtex-x/tests/bibtexu.test	2023-08-11 11:46:28 UTC (rev 67881)
@@ -5,6 +5,10 @@
 # Copyright 2023 TANAKA Takuji <ttk at 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 @@
 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 @@
 
 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



More information about the tex-live-commits mailing list.