summaryrefslogtreecommitdiff
path: root/Build/source/texk/bibtex-x/tests
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/bibtex-x/tests')
-rwxr-xr-xBuild/source/texk/bibtex-x/tests/bibtex8-mem.test70
-rwxr-xr-xBuild/source/texk/bibtex-x/tests/bibtex8.test15
-rwxr-xr-xBuild/source/texk/bibtex-x/tests/bibtexu-yannis.test24
-rwxr-xr-xBuild/source/texk/bibtex-x/tests/bibtexu.test10
-rw-r--r--Build/source/texk/bibtex-x/tests/sort.aux4
-rwxr-xr-xBuild/source/texk/bibtex-x/tests/sort.test25
-rw-r--r--Build/source/texk/bibtex-x/tests/sort1.bbl15
-rw-r--r--Build/source/texk/bibtex-x/tests/sort1.csf275
-rw-r--r--Build/source/texk/bibtex-x/tests/sort2.bbl15
-rw-r--r--Build/source/texk/bibtex-x/tests/sort2.csf114
-rw-r--r--Build/source/texk/bibtex-x/tests/sort3.bbl15
-rw-r--r--Build/source/texk/bibtex-x/tests/sort3.csf281
-rw-r--r--Build/source/texk/bibtex-x/tests/testdata.bib43
-rw-r--r--Build/source/texk/bibtex-x/tests/teststyle.bst36
-rw-r--r--Build/source/texk/bibtex-x/tests/yannis.aux4
-rw-r--r--Build/source/texk/bibtex-x/tests/yannis.bbl44
-rw-r--r--Build/source/texk/bibtex-x/tests/yannis.bib48
17 files changed, 1038 insertions, 0 deletions
diff --git a/Build/source/texk/bibtex-x/tests/bibtex8-mem.test b/Build/source/texk/bibtex-x/tests/bibtex8-mem.test
new file mode 100755
index 00000000000..50424af632d
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/bibtex8-mem.test
@@ -0,0 +1,70 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Using test data from Philipp Lehman <lehman@gmx.net>
+
+test -d tests || mkdir -p tests
+
+# Create bib data
+mk_bib () {
+ for i
+ do
+ for j in 0 1 2 3 4 5 6 7 8 9; do
+ for k in 0 1 2 3 4 5 6 7 8 9; do
+ for l in 0 1 2 3 4 5 6 7 8 9; do
+ cat <<EOF
+@Type{key$i$j$k$l,
+ field001 = {Value 001},
+ field002 = {Value 002},
+ field003 = {Value 003},
+ field004 = {Value 004},
+ field005 = {Value 005},
+ field006 = {Value 006},
+ field007 = {Value 007},
+ field008 = {Value 008},
+ field009 = {Value 009},
+ field010 = {Value 010}
+}
+
+EOF
+ done
+ done
+ done
+ done
+}
+
+# Create aux data
+mk_aux () {
+ cat <<EOF
+\relax
+\citation{*}
+\bibstyle{$1}
+\bibdata{memtest}
+EOF
+}
+
+for t in 1 2 3; do
+
+ mk_aux memdata$t >tests/memtest$t.aux
+
+ env=
+
+ case $t in
+ 1) mk_bib 0 >tests/memtest.bib;;
+ 2) mk_bib 1 >>tests/memtest.bib;;
+ 3) env='ent_str_size=2000 glob_str_size=2000';;
+ esac
+
+ echo "Running memtest$t ..."
+
+ eval $env \
+ TEXMFCNF=$srcdir/../kpathsea \
+ BSTINPUTS=$srcdir/../web2c/tests:$srcdir/csf \
+ BIBINPUTS=./tests \
+ ./bibtex8 tests/memtest$t || exit 1
+
+done
+
diff --git a/Build/source/texk/bibtex-x/tests/bibtex8.test b/Build/source/texk/bibtex-x/tests/bibtex8.test
new file mode 100755
index 00000000000..472705f7157
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/bibtex8.test
@@ -0,0 +1,15 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d tests || mkdir -p tests
+
+cp $srcdir/../web2c/tests/exampl.aux tests/xexampl.aux
+
+TEXMFCNF=$srcdir/../kpathsea \
+ BSTINPUTS=$srcdir/../web2c/tests \
+ BIBINPUTS=$srcdir/../web2c/tests \
+ ./bibtex8 -7 tests/xexampl || test $? = 1 || exit 1
+
diff --git a/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test b/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test
new file mode 100755
index 00000000000..548d30f32cb
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/bibtexu-yannis.test
@@ -0,0 +1,24 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2019 Karl Berry <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Test file prepared by Yannis Haralambous in 2009.
+
+exit 0 # temp until fixed
+
+test -d tests || mkdir -p tests
+
+cp $srcdir/tests/yannis.aux tests/xyannis.aux
+
+TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
+BSTINPUTS=$srcdir/../web2c/tests; export BSTINPUTS
+BIBINPUTS=$srcdir/tests; export BIBINPUTS
+if ./bibtexu -l fr -o fr -t -d all tests/xyannis; then :; else
+ echo "bibtexu failed, tests/xyannis.blg is:" >&2
+ cat tests/xyannis.blg >&2
+ exit 1
+fi
+
+diff $srcdir/tests/yannis.bbl tests/xyannis.bbl || exit 1
+
diff --git a/Build/source/texk/bibtex-x/tests/bibtexu.test b/Build/source/texk/bibtex-x/tests/bibtexu.test
new file mode 100755
index 00000000000..d2e4370d551
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/bibtexu.test
@@ -0,0 +1,10 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Not really a test, just making sure the program executes.
+
+./bibtexu -version || exit 1
+
diff --git a/Build/source/texk/bibtex-x/tests/sort.aux b/Build/source/texk/bibtex-x/tests/sort.aux
new file mode 100644
index 00000000000..8b9b435001f
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort.aux
@@ -0,0 +1,4 @@
+\relax
+\citation{*}
+\bibstyle{teststyle}
+\bibdata{testdata}
diff --git a/Build/source/texk/bibtex-x/tests/sort.test b/Build/source/texk/bibtex-x/tests/sort.test
new file mode 100755
index 00000000000..ed4ffe6ffad
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort.test
@@ -0,0 +1,25 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Using test data from Philipp Lehman <lehman@gmx.net>
+
+test -d tests || mkdir -p tests
+
+cp $srcdir/tests/sort.aux tests/xsort.aux
+
+for i in 1 2 3; do
+
+rm -f xsort.bbl
+
+TEXMFCNF=$srcdir/../kpathsea \
+ BSTINPUTS=$srcdir/tests \
+ BIBINPUTS=$srcdir/tests \
+ ./bibtex8 --csfile sort$i.csf tests/xsort || exit 1
+
+diff $srcdir/tests/sort$i.bbl tests/xsort.bbl || exit 1
+
+done
+
diff --git a/Build/source/texk/bibtex-x/tests/sort1.bbl b/Build/source/texk/bibtex-x/tests/sort1.bbl
new file mode 100644
index 00000000000..4cee6977490
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort1.bbl
@@ -0,0 +1,15 @@
+\section*{Test result}
+\begin{itemize}
+\item Aa AA aa
+\item
+\item
+\item Bb BB bb
+\item Cc CC cc
+\item Oo OO oo
+\item
+\item
+\item Xx XX xx
+\item Yy YY yy
+\item Zz ZZ zz
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/bibtex-x/tests/sort1.csf b/Build/source/texk/bibtex-x/tests/sort1.csf
new file mode 100644
index 00000000000..8871a2eb4b3
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort1.csf
@@ -0,0 +1,275 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% CHARACTER SET: ISO 8859-1 (Latin 1)
+%
+% ISO 8859-1 is the system character set used by Unix/X Windows and
+% MS Windows.
+%
+% SORTING ORDER: Latin countries
+%
+% Alphabetical sorting order of Aa..Zz (including accented characters).
+%
+% This is a BibTeX Codepage and Sort definition file (CSF). It is
+% used to define the 8-bit character set used by BibTeX and the
+% order in which those characters should be sorted. The file
+% format is documented below this header section.
+%
+% This file will only work with the 8-bit implementation of BibTeX
+% written by Niel Kempson and Alejandro Aguilar-Sierra:
+%
+% http://www.ctan.org/tex-archive/biblio/bibtex/8-bit/
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% FILE FORMAT
+%
+% The codepage and sorting order (CS) file defines how BibTeX will treat an
+% 8-bit character set, specifically which characters are to be treated as
+% letters, the upper/lower case relationships between characters, and the
+% sorting order of characters.
+%
+% The CS file may contain a number of sections, each presented in the
+% form of a TeX macro:
+%
+% \section-name{
+% <section definitions>
+% }
+%
+% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+% and \order. The syntax of the four supported sections is summarised below.
+%
+% 8-bit characters may be entered naturally, but to avoid problems with
+% character set translation or corruption, they can also be entered using
+% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+% is the hexadecimal value ofthe character code.
+%
+% Reading of the sections ends when the first '}' character is reached, so
+% '}' can't be included in a section. You can't use ^^7d either.
+%
+% The percent sign ('%') is used to introduce a trailing comment - it and
+% all remaining characters on a line are ignored. ^^25 has the same effect.
+%
+%
+% \lowupcase section
+%
+% The \lowupcase section of the CS file is used to define the lower
+% /upper and upper/lower case relationship of pairs of specified
+% characters. It is only used if the relationship is symmetrical - use
+% \lowercase or \upcase if it isn't.
+%
+% The syntax of the \lowupcase section is:
+%
+% \lowupcase{
+% <LC-1> <UC-1> % Comment begins with a percent sign
+% <LC-2> <UC-2>
+% ...
+% <LC-N> <UC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the upper case
+% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+% <UC-n> is <LC-n>.
+%
+% You cannot redefine the lower or upper case equivalent of an ASCII
+% character (code < 128), so all instances of <LC-n> and <UC-n>
+% (i.e. both sides of the relationship) must have codes > 127.
+%
+%
+% \lowercase section
+%
+% The \lowercase section of the CS file is used to define the lower case
+% equivalent of specified characters. It should normally only be used
+% if the relationship isn't symmetrical - use \lowupcase if it is.
+%
+% The syntax of the \lowercase section is:
+%
+% \lowercase{
+% <UC-1> <LC-1> % Comment begins with a percent sign
+% <UC-2> <LC-2>
+% ...
+% <UC-N> <LC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the lower case
+% equivalent of <UC-n> is <LC-n>.
+%
+% You cannot redefine the lower case equivalent of an ASCII character
+% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+% of the relationship) must have codes > 127.
+%
+%
+% \uppercase section
+%
+% The \uppercase section of the CS file is used to define the upper case
+% equivalent of specified characters. It should normally only be used
+% if the relationship isn't symmetrical - use \lowupcase if it is.
+%
+% The syntax of the \uppercase section is:
+%
+% \uppercase{
+% <LC-1> <UC-1> % Comment begins with a percent sign
+% <LC-2> <UC-2>
+% ...
+% <LC-N> <UC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the upper case
+% case equivalent of <LC-n> is <UC-n>.
+%
+% You cannot redefine the upper case equivalent of an ASCII character
+% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+% of the relationship) must have codes > 127.
+%
+%
+% \order section
+%
+% The \order section of the CS file is used to define the order in which
+% characters are sorted.
+%
+% The syntax of the \order section is:
+%
+% \order{
+% <char-1> % Comment begins with a percent sign
+% <char-2> <char-3> % whitespace between the chars
+% <char-4> - <char-5> % a hyphen between the chars
+% <char-4> _ <char-5> % an underscore between the chars
+% ...
+% <char-n>
+% }
+%
+% All characters on the same line are given the same sorting weight.
+%
+% The construct <char-1> <underscore> <char-2> is used to denote that
+% all characters in the range <char-1> to <char-2> should be given the
+% same sorting weight. For example, "A _ Z" would cause all ASCII
+% upper case alphabetical characters to have the same sorting weight
+% and would be equivalent to placing all 26 characters on the same line.
+%
+% The construct <char-1> <hyphen> <char-2> is used to denote that all
+% characters in the range <char-1> to <char-2> should be given an
+% ascending set of sorting weights, starting with <char-1> and ending
+% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+% alphabetical characters to be sorted in ascending order and would be
+% equivalent to placing 'A' on the first line, 'B' on the second,
+% through to 'Z' on the 26th line.
+%
+% The characters at the beginning of the order section are given a lower
+% sorting weight than characters occuring later. When sorting
+% alphabetically, characters with the lowest weight come first.
+%
+% All characters not in the \order section (including ASCII characters)
+% are given the same very high sorting weight to ensure that they come
+% last when sorting alphabetically.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% CHARACTER SET
+
+\lowupcase{ % Lowercase Uppercase
+ % Code TeX Code TeX
+ %
+ % ^^e0 \`{a} ^^c0 \`{A}
+ % ^^e1 \'{a} ^^c1 \'{A}
+ % ^^e2 \^{a} ^^c2 \^{A}
+ % ^^e3 \~{a} ^^c3 \~{A}
+ % ^^e4 \"{a} ^^c4 \"{A}
+ % ^^e5 \aa ^^c5 \AA
+ % ^^e6 \ae ^^c6 \AE
+ % ^^e7 \c{c} ^^c7 \c{C}
+ % ^^e8 \`{e} ^^c8 \`{E}
+ % ^^e9 \'{e} ^^c9 \'{E}
+ % ^^ea \^{e} ^^ca \^{E}
+ % ^^eb \"{e} ^^cb \"{E}
+ % ^^ec \`{\i} ^^cc \`{I}
+ % ^^ed \'{\i} ^^cd \'{I}
+ % ^^ee \^{\i} ^^ce \^{I}
+ % ^^ef \"{\i} ^^cf \"{I}
+ % ^^f0 \dh ^^d0 \DH
+ % ^^f1 \~{n} ^^d1 \~{N}
+ % ^^f2 \`{o} ^^d2 \`{O}
+ % ^^f3 \'{o} ^^d3 \'{O}
+ % ^^f4 \^{o} ^^d4 \^{O}
+ % ^^f5 \~{o} ^^d5 \~{O}
+ % ^^f6 \"{o} ^^d6 \"{O}
+ % ^^f8 \o ^^d8 \O
+ % ^^f9 \`{u} ^^d9 \`{U}
+ % ^^fa \'{u} ^^da \'{U}
+ % ^^fb \^{u} ^^db \^{U}
+ % ^^fc \"{u} ^^dc \"{U}
+ % ^^fd \'{y} ^^dd \'{Y}
+ % ^^fe \th ^^de \TH
+}
+
+% SORTING ORDER
+
+\order{
+ 0-9
+ A
+
+ a
+
+ B
+ b
+ C
+ c
+ D
+ d
+ E
+
+ e
+
+ F
+ f
+ G
+ g
+ H
+ h
+ I
+
+ i
+
+ J
+ j
+ K
+ k
+ L
+ l
+ M
+ m
+ N
+ n
+ O
+
+ o
+
+ P
+ p
+ Q
+ q
+ R
+ r
+ S
+ s
+ T
+ t
+ U
+
+ u
+
+ V
+ v
+ W
+ w
+ X
+ x
+ Y
+
+ y
+
+ Z
+ z
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Build/source/texk/bibtex-x/tests/sort2.bbl b/Build/source/texk/bibtex-x/tests/sort2.bbl
new file mode 100644
index 00000000000..15464fe5b18
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort2.bbl
@@ -0,0 +1,15 @@
+\section*{Test result}
+\begin{itemize}
+\item Aa AA aa
+\item
+\item Bb BB bb
+\item Cc CC cc
+\item Oo OO oo
+\item
+\item Xx XX xx
+\item Yy YY yy
+\item Zz ZZ zz
+\item
+\item
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/bibtex-x/tests/sort2.csf b/Build/source/texk/bibtex-x/tests/sort2.csf
new file mode 100644
index 00000000000..6ac91cd7443
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort2.csf
@@ -0,0 +1,114 @@
+% CHARACTER SET
+
+\lowupcase{ % Lowercase Uppercase
+ % Code TeX Code TeX
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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Build/source/texk/bibtex-x/tests/sort3.bbl b/Build/source/texk/bibtex-x/tests/sort3.bbl
new file mode 100644
index 00000000000..a2ec3bea9b7
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort3.bbl
@@ -0,0 +1,15 @@
+\section*{Test result}
+\begin{itemize}
+\item Aa AA aa
+\item Bb BB bb
+\item Cc CC cc
+\item Oo OO oo
+\item
+\item Xx XX xx
+\item Yy YY yy
+\item Zz ZZ zz
+\item
+\item
+\item
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/bibtex-x/tests/sort3.csf b/Build/source/texk/bibtex-x/tests/sort3.csf
new file mode 100644
index 00000000000..909cf0f60ed
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/sort3.csf
@@ -0,0 +1,281 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% CHARACTER SET: ISO 8859-1 (Latin 1)
+%
+% ISO 8859-1 is the system character set used by Unix/X Windows and
+% MS Windows.
+%
+% SORTING ORDER: Swedish
+%
+% Alphabetical sorting order of Aa..Zz (including accented characters).
+%
+% This is a BibTeX Codepage and Sort definition file (CSF). It is
+% used to define the 8-bit character set used by BibTeX and the
+% order in which those characters should be sorted. The file
+% format is documented below this header section.
+%
+% This file will only work with the 8-bit implementation of BibTeX
+% written by Niel Kempson and Alejandro Aguilar-Sierra:
+%
+% http://www.ctan.org/tex-archive/biblio/bibtex/8-bit/
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% FILE FORMAT
+%
+% The codepage and sorting order (CS) file defines how BibTeX will treat an
+% 8-bit character set, specifically which characters are to be treated as
+% letters, the upper/lower case relationships between characters, and the
+% sorting order of characters.
+%
+% The CS file may contain a number of sections, each presented in the
+% form of a TeX macro:
+%
+% \section-name{
+% <section definitions>
+% }
+%
+% Four sections are currently supported: \lowupcase, \lowercase, \uppercase
+% and \order. The syntax of the four supported sections is summarised below.
+%
+% 8-bit characters may be entered naturally, but to avoid problems with
+% character set translation or corruption, they can also be entered using
+% the TeX-style portable notation for character codes, i.e. ^^XX, where XX
+% is the hexadecimal value ofthe character code.
+%
+% Reading of the sections ends when the first '}' character is reached, so
+% '}' can't be included in a section. You can't use ^^7d either.
+%
+% The percent sign ('%') is used to introduce a trailing comment - it and
+% all remaining characters on a line are ignored. ^^25 has the same effect.
+%
+%
+% \lowupcase section
+%
+% The \lowupcase section of the CS file is used to define the lower
+% /upper and upper/lower case relationship of pairs of specified
+% characters. It is only used if the relationship is symmetrical - use
+% \lowercase or \upcase if it isn't.
+%
+% The syntax of the \lowupcase section is:
+%
+% \lowupcase{
+% <LC-1> <UC-1> % Comment begins with a percent sign
+% <LC-2> <UC-2>
+% ...
+% <LC-N> <UC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the upper case
+% equivalent of <LC-n> is <UC-n> *and* the lower case equivalent of
+% <UC-n> is <LC-n>.
+%
+% You cannot redefine the lower or upper case equivalent of an ASCII
+% character (code < 128), so all instances of <LC-n> and <UC-n>
+% (i.e. both sides of the relationship) must have codes > 127.
+%
+%
+% \lowercase section
+%
+% The \lowercase section of the CS file is used to define the lower case
+% equivalent of specified characters. It should normally only be used
+% if the relationship isn't symmetrical - use \lowupcase if it is.
+%
+% The syntax of the \lowercase section is:
+%
+% \lowercase{
+% <UC-1> <LC-1> % Comment begins with a percent sign
+% <UC-2> <LC-2>
+% ...
+% <UC-N> <LC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the lower case
+% equivalent of <UC-n> is <LC-n>.
+%
+% You cannot redefine the lower case equivalent of an ASCII character
+% (code < 128), so all instances of <UC-n> (i.e. the left hand side
+% of the relationship) must have codes > 127.
+%
+%
+% \uppercase section
+%
+% The \uppercase section of the CS file is used to define the upper case
+% equivalent of specified characters. It should normally only be used
+% if the relationship isn't symmetrical - use \lowupcase if it is.
+%
+% The syntax of the \uppercase section is:
+%
+% \uppercase{
+% <LC-1> <UC-1> % Comment begins with a percent sign
+% <LC-2> <UC-2>
+% ...
+% <LC-N> <UC-N>
+% }
+%
+% Each <LC-n> <UC-n> pair of characters defines that the upper case
+% case equivalent of <LC-n> is <UC-n>.
+%
+% You cannot redefine the upper case equivalent of an ASCII character
+% (code < 128), so all instances of <LC-n> (i.e. the left hand side
+% of the relationship) must have codes > 127.
+%
+%
+% \order section
+%
+% The \order section of the CS file is used to define the order in which
+% characters are sorted.
+%
+% The syntax of the \order section is:
+%
+% \order{
+% <char-1> % Comment begins with a percent sign
+% <char-2> <char-3> % whitespace between the chars
+% <char-4> - <char-5> % a hyphen between the chars
+% <char-4> _ <char-5> % an underscore between the chars
+% ...
+% <char-n>
+% }
+%
+% All characters on the same line are given the same sorting weight.
+%
+% The construct <char-1> <underscore> <char-2> is used to denote that
+% all characters in the range <char-1> to <char-2> should be given the
+% same sorting weight. For example, "A _ Z" would cause all ASCII
+% upper case alphabetical characters to have the same sorting weight
+% and would be equivalent to placing all 26 characters on the same line.
+%
+% The construct <char-1> <hyphen> <char-2> is used to denote that all
+% characters in the range <char-1> to <char-2> should be given an
+% ascending set of sorting weights, starting with <char-1> and ending
+% with <char-2>. For example, "A - Z" would cause all upper case ASCII
+% alphabetical characters to be sorted in ascending order and would be
+% equivalent to placing 'A' on the first line, 'B' on the second,
+% through to 'Z' on the 26th line.
+%
+% The characters at the beginning of the order section are given a lower
+% sorting weight than characters occuring later. When sorting
+% alphabetically, characters with the lowest weight come first.
+%
+% All characters not in the \order section (including ASCII characters)
+% are given the same very high sorting weight to ensure that they come
+% last when sorting alph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+ N
+ n
+ O
+
+ o
+
+ P
+ p
+ Q
+ q
+ R
+ r
+ S
+ s
+ T
+ t
+ U
+
+ u
+
+ V
+ v
+ W
+ w
+ X
+ x
+ Y
+
+ y
+
+ Z
+ z
+
+
+
+
+
+
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Build/source/texk/bibtex-x/tests/testdata.bib b/Build/source/texk/bibtex-x/tests/testdata.bib
new file mode 100644
index 00000000000..c17aa9c838d
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/testdata.bib
@@ -0,0 +1,43 @@
+@Type{8bit-1,
+ field = {},
+}
+
+@Type{8bit-2,
+ field = {},
+}
+
+@Type{8bit-3,
+ field = {},
+}
+
+@Type{8bit-4,
+ field = {},
+}
+
+@Type{aa,
+ field = {Aa},
+}
+
+@Type{bb,
+ field = {Bb},
+}
+
+@Type{cc,
+ field = {Cc},
+}
+
+@Type{oo,
+ field = {Oo},
+}
+
+@Type{xx,
+ field = {Xx},
+}
+
+@Type{yy,
+ field = {Yy},
+}
+
+@Type{zz,
+ field = {Zz},
+}
diff --git a/Build/source/texk/bibtex-x/tests/teststyle.bst b/Build/source/texk/bibtex-x/tests/teststyle.bst
new file mode 100644
index 00000000000..72f7525c7b5
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/teststyle.bst
@@ -0,0 +1,36 @@
+ENTRY {field}{}{}
+
+FUNCTION {output_entry} {
+ "\item " field * " " *
+ field "u" change.case$ * " " *
+ field "l" change.case$ *
+ write$ newline$
+}
+
+FUNCTION {type} {output_entry}
+
+READ
+
+FUNCTION {set_sortkey} {
+ field 'sort.key$ :=
+}
+
+ITERATE {set_sortkey}
+
+SORT
+
+FUNCTION {output_beg} {
+ "\section*{Test result}" write$ newline$
+ "\begin{itemize}" write$ newline$
+}
+
+FUNCTION {output_end} {
+ "\end{itemize}" write$ newline$
+ "\endinput" write$ newline$
+}
+
+EXECUTE {output_beg}
+
+ITERATE {call.type$}
+
+EXECUTE {output_end}
diff --git a/Build/source/texk/bibtex-x/tests/yannis.aux b/Build/source/texk/bibtex-x/tests/yannis.aux
new file mode 100644
index 00000000000..bc896a7a621
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/yannis.aux
@@ -0,0 +1,4 @@
+\relax
+\citation{*}
+\bibstyle{apalike}
+\bibdata{yannis}
diff --git a/Build/source/texk/bibtex-x/tests/yannis.bbl b/Build/source/texk/bibtex-x/tests/yannis.bbl
new file mode 100644
index 00000000000..4d98ec3e3d9
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/yannis.bbl
@@ -0,0 +1,44 @@
+\begin{thebibliography}{}
+
+\bibitem[Échelon, 2009]{cle2}
+Échelon, N. (2009).
+\newblock {\em La vie est un long fleuve tranquille}.
+\newblock Les Éditions du désastre.
+
+\bibitem[Œtingen, 2009]{cle8}
+Œtingen, N. (2009).
+\newblock {\em Un livre}.
+\newblock Les Éditions du désastre.
+
+\bibitem[Tarantin, 2009]{cle4}
+Tarantin, N. (2009).
+\newblock {\em En revenant de Tarascon}.
+\newblock Les Éditions du désastre.
+
+\bibitem[Διογένης, 2009]{cle1}
+Διογένης (2009).
+\newblock {\em Μήπως εἴδατε τὸ φανάρι μου;}.
+\newblock Τὰ σοφὰ βιβλία.
+
+\bibitem[Ἕλληνας, 2009]{cle7}
+Ἕλληνας, Μ. (2009).
+\newblock {\em Τὸ καλὸ παράδειγμα}.
+\newblock Ἐκδοτικὸς οἶκος «Δὲν βαριέσαι».
+
+\bibitem[Ζαχαρόπουλος, 2009]{cle5}
+Ζαχαρόπουλος, Ζ. (2009).
+\newblock {\em Μοῦ λένε νὰ μὴν κλαίω, μὰ τί νὰ
+ κάνω, ἀφοῦ σὲ χάνω}.
+\newblock Ἐκδόσεις τῶν χαμένων ἐλπίδων.
+
+\bibitem[天堂最新的章节表, 2009]{cle3}
+天堂最新的章节表, 格. (2009).
+\newblock {\em 製版・文書処理システム Ω}.
+\newblock Les Éditions du désastre.
+
+\bibitem[天王最新章, 2009]{cle6}
+天王最新章, 节. (2009).
+\newblock {\em 製版・文書処理システム Ω}.
+\newblock Les Éditions du désastre.
+
+\end{thebibliography}
diff --git a/Build/source/texk/bibtex-x/tests/yannis.bib b/Build/source/texk/bibtex-x/tests/yannis.bib
new file mode 100644
index 00000000000..b442eeb88a2
--- /dev/null
+++ b/Build/source/texk/bibtex-x/tests/yannis.bib
@@ -0,0 +1,48 @@
+
+@book{cle1,
+ Author = {Διογένης},
+ Publisher = {Τὰ σοφὰ βιβλία},
+ Title = {Μήπως εἴδατε τὸ φανάρι μου;},
+ Year = {2009}}
+
+@book{cle2,
+ Author = {Échelon, Nicolas},
+ Publisher = {Les Éditions du désastre},
+ Title = {La vie est un long fleuve tranquille},
+ Year = {2009}}
+
+@book{cle3,
+ Author = {天堂最新的章节表, 格的儿子},
+ Publisher = {Les Éditions du désastre},
+ Title = {製版・文書処理システム Ω},
+ Year = {2009}}
+
+@book{cle4,
+ Author = {Tarantin, Nicolas},
+ Publisher = {Les Éditions du désastre},
+ Title = {En revenant de Tarascon},
+ Year = {2009}}
+
+@book{cle5,
+ Author = {Ζαχαρόπουλος, Ζαχαρίας},
+ Publisher = {Ἐκδόσεις τῶν χαμένων ἐλπίδων},
+ Title = {Μοῦ λένε νὰ μὴν κλαίω, μὰ τί νὰ κάνω, ἀφοῦ σὲ χάνω},
+ Year = {2009}}
+
+@book{cle6,
+ Author = {天王最新章, 节列表},
+ Publisher = {Les Éditions du désastre},
+ Title = {製版・文書処理システム Ω},
+ Year = {2009}}
+
+@book{cle7,
+ Author = {Ἕλληνας, Μῆτσος},
+ Publisher = {Ἐκδοτικὸς οἶκος «Δὲν βαριέσαι»},
+ Title = {Τὸ καλὸ παράδειγμα},
+ Year = {2009}}
+
+@book{cle8,
+ Author = {Œtingen, Nicolas},
+ Publisher = {Les Éditions du désastre},
+ Title = {Un livre},
+ Year = {2009}}