diff options
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/Makefile.in | 37 | ||||
-rw-r--r-- | Build/source/texk/web2c/am/web.am | 4 | ||||
-rwxr-xr-x | Build/source/texk/web2c/tests/bibtex-mem.test | 64 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/memdata1.bst | 84 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/memdata2.bst | 234 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/memdata3.bst | 654 |
7 files changed, 1063 insertions, 18 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index f009c76dd2a..1d000ce83b8 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -3,6 +3,10 @@ * bibtex.ch (max_cites): Dynamically resize the cite_list, type_list, entry_exists, and cite_info arrays. + * tests/bibtex-mem.test: New shell script for dynamic arrays. + * tests/memdata[123].bst: Test data from Philipp Lehman. + * am/web.am: Adapted. + 2010-03-16 Peter Breitenlohner <peb@mppmu.mpg.de> * bibtex.ch (entry_ints, entry_strs): Delay allocation until diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index 00d36794da7..4088baafdc8 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -856,7 +856,7 @@ am__EXEEXT_22 = bibtex.test dvicopy.test dvitype.test gftodvi.test \ pktype.test pltotf.test pooltype.test tftopl.test vftovp.test \ vptovf.test weave.test am__EXEEXT_23 = $(am__EXEEXT_22) tests/bibtex-openout-test.pl \ - tests/bibtex-longline-test.pl + tests/bibtex-longline-test.pl tests/bibtex-mem.test @WEB_TRUE@am__EXEEXT_24 = $(am__EXEEXT_23) DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -1101,7 +1101,8 @@ EXTRA_LIBRARIES = libmf.a libmplib.a libpdftex.a liblua51.a \ EXTRA_DIST = PROJECTS cftests config.h cpascal.h help.h triptrap-sh \ tangle.web tangle.ch tangleboot.pin cwebdir ctangleboot.cin \ cwebboot.cin cwebboot.hin tangle.test $(web_programs:=.web) \ - $(web_programs:=.ch) $(web_tests) tests/allbib.aux \ + $(web_programs:=.ch) $(web_tests) tests/memdata1.bst \ + tests/memdata2.bst tests/memdata3.bst tests/allbib.aux \ tests/allbib.tex tests/apalike.bst tests/batch.tex \ tests/check.log tests/cmr10.600gf tests/cmr10.pk \ tests/cmr10.pl tests/cmr10.tfm tests/cmr7.tfm tests/cmr8.tfm \ @@ -1310,21 +1311,21 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) tangle.c tangle.h tangle.p \ common-ctangle ctangleboot.c cwebboot.c cwebboot.h cftest.p \ $(web_programs:=.c) $(web_programs:=.h) $(web_programs:=.p) \ $(web_programs:=-web2c) tests/xexampl.aux tests/xexampl.bbl \ - tests/xexampl.blg tests/xstory.dvi tests/xpplr.dvi \ - tests/xstory.dvityp tests/xpagenum.typ cmr10.dvi \ - tests/xcmr10.dvi cmr10.pk tests/xcmr10.pk tests/xcmr10.gft1 \ - tests/xcmr10.gft2 io.tex tests/io.tex tests/xpatout pattmp.4 \ - cmr10.gf tests/xcmr10.600gf tests/xcmr10.pktyp \ - tests/xcmr10.tfm tests/xtexpool.typ tests/xcmr10.pl \ - tests/xptmr.vpl tests/xptmr.tfm tests/xptmr.vf pooltype.tex \ - ctie.c cweave.c tie.c ctie.outc ctie.outm common.tex \ - common.scn common.idx tie.outc tie.outm $(nodist_tex_SOURCES) \ - tex-final.ch tex-web2c tex.p tex.pool tex-tangle trip.diffs \ - mftrap.diffs $(nodist_libmf_a_SOURCES) mfextra.c mf-final.ch \ - mf-web2c mf.p mf.pool mf-tangle $(nodist_mpost_SOURCES) \ - mpxout-tangle mptrap.diffs ptmr.mpx tests/xptmr.mpx \ - tests/xstory.mpx $(nodist_libmplib_a_SOURCES) memio-tangle \ - mp-tangle psout-tangle svgout-tangle tfmin-tangle \ + tests/xexampl.blg tests/memtest* tests/xstory.dvi \ + tests/xpplr.dvi tests/xstory.dvityp tests/xpagenum.typ \ + cmr10.dvi tests/xcmr10.dvi cmr10.pk tests/xcmr10.pk \ + tests/xcmr10.gft1 tests/xcmr10.gft2 io.tex tests/io.tex \ + tests/xpatout pattmp.4 cmr10.gf tests/xcmr10.600gf \ + tests/xcmr10.pktyp tests/xcmr10.tfm tests/xtexpool.typ \ + tests/xcmr10.pl tests/xptmr.vpl tests/xptmr.tfm tests/xptmr.vf \ + pooltype.tex ctie.c cweave.c tie.c ctie.outc ctie.outm \ + common.tex common.scn common.idx tie.outc tie.outm \ + $(nodist_tex_SOURCES) tex-final.ch tex-web2c tex.p tex.pool \ + tex-tangle trip.diffs mftrap.diffs $(nodist_libmf_a_SOURCES) \ + mfextra.c mf-final.ch mf-web2c mf.p mf.pool mf-tangle \ + $(nodist_mpost_SOURCES) mpxout-tangle mptrap.diffs ptmr.mpx \ + tests/xptmr.mpx tests/xstory.mpx $(nodist_libmplib_a_SOURCES) \ + memio-tangle mp-tangle psout-tangle svgout-tangle tfmin-tangle \ $(nodist_etex_SOURCES) etex.web etex.ch etex-web2c etex.p \ etex.pool etex-tangle etexdir/etex.version etrip.diffs \ $(nodist_pdftex_SOURCES) pdftex.ch pdftex-web2c pdftex.p \ @@ -1406,7 +1407,7 @@ web_programs = bibtex dvicopy dvitype gftodvi gftopk gftype mft \ patgen pktogf pktype pltotf pooltype tftopl vftovp vptovf weave web_tests = $(web_programs:=.test) tests/bibtex-openout-test.pl \ - tests/bibtex-longline-test.pl + tests/bibtex-longline-test.pl tests/bibtex-mem.test nodist_bibtex_SOURCES = bibtex.c bibtex.h nodist_dvicopy_SOURCES = dvicopy.c dvicopy.h nodist_dvitype_SOURCES = dvitype.c dvitype.h diff --git a/Build/source/texk/web2c/am/web.am b/Build/source/texk/web2c/am/web.am index 462c681d327..e6dc123bed8 100644 --- a/Build/source/texk/web2c/am/web.am +++ b/Build/source/texk/web2c/am/web.am @@ -27,6 +27,7 @@ bibtex-web2c: bibtex.p $(web2c_depend) web2c/cvtbib.sed bibtex.p: tangle$(EXEEXT) bibtex.web bibtex.ch $(tangle) bibtex bibtex web_tests += tests/bibtex-openout-test.pl tests/bibtex-longline-test.pl +web_tests += tests/bibtex-mem.test nodist_dvicopy_SOURCES = dvicopy.c dvicopy.h dvicopy.c dvicopy.h: dvicopy-web2c @@ -158,6 +159,9 @@ EXTRA_DIST += $(web_tests) ## bibtex.test DISTCLEANFILES += tests/xexampl.aux tests/xexampl.bbl tests/xexampl.blg +## tests/bibtex-mem.test +EXTRA_DIST += tests/memdata1.bst tests/memdata2.bst tests/memdata3.bst +DISTCLEANFILES += tests/memtest* ## dvicopy.test DISTCLEANFILES += tests/xstory.dvi tests/xpplr.dvi ## dvitype.test diff --git a/Build/source/texk/web2c/tests/bibtex-mem.test b/Build/source/texk/web2c/tests/bibtex-mem.test new file mode 100755 index 00000000000..044b1c5888a --- /dev/null +++ b/Build/source/texk/web2c/tests/bibtex-mem.test @@ -0,0 +1,64 @@ +#! /bin/sh + +# Copyright (C) 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 () { + echo '\relax' + echo '\citation{*}' + echo '\bibstyle{'$1'}' + echo '\bibdata{memtest}' +} + +for t in 1 2 3; do + + mk_aux memdata$t >tests/memtest$t.aux + + case $t in + 1) mk_bib 0 >tests/memtest.bib;; + 2) mk_bib 1 >>tests/memtest.bib;; + 3) exit 0;; # requires larger constatnts + esac + + echo "Running memtest$t ..." + + TEXMFCNF=$srcdir/../kpathsea \ + BSTINPUTS=$srcdir/tests \ + BIBINPUTS=./tests \ + ./bibtex tests/memtest$t || exit 1 + +done + diff --git a/Build/source/texk/web2c/tests/memdata1.bst b/Build/source/texk/web2c/tests/memdata1.bst new file mode 100644 index 00000000000..dae063cf2ef --- /dev/null +++ b/Build/source/texk/web2c/tests/memdata1.bst @@ -0,0 +1,84 @@ +ENTRY { + field001 + field002 + field003 + field004 + field005 + field006 + field007 + field008 + field009 + field010 + field011 + field012 + field013 + field014 + field015 + field016 + field017 + field018 + field019 + field020 + field021 + field022 + field023 + field024 + field025 + field026 + field027 + field028 + field029 + field030 + field031 + field032 + field033 + field034 + field035 + field036 + field037 + field038 + field039 + field040 + field041 + field042 + field043 + field044 + field045 + field046 + field047 + field048 + field049 + field050 +}{}{} + +FUNCTION {output_entry} { + cite$ " " * write$ +} + +FUNCTION {type} {output_entry} + +READ + +FUNCTION {set_sortkey} { + cite$ 'sort.key$ := +} + +ITERATE {set_sortkey} + +SORT + +FUNCTION {output_beg} { + "\section*{Test result}" write$ newline$ + "Processing... " write$ +} + +FUNCTION {output_end} { + newline$ + "\endinput" write$ newline$ +} + +EXECUTE {output_beg} + +ITERATE {call.type$} + +EXECUTE {output_end} diff --git a/Build/source/texk/web2c/tests/memdata2.bst b/Build/source/texk/web2c/tests/memdata2.bst new file mode 100644 index 00000000000..98dd2df3f1a --- /dev/null +++ b/Build/source/texk/web2c/tests/memdata2.bst @@ -0,0 +1,234 @@ +ENTRY { + field001 + field002 + field003 + field004 + field005 + field006 + field007 + field008 + field009 + field010 + field011 + field012 + field013 + field014 + field015 + field016 + field017 + field018 + field019 + field020 + field021 + field022 + field023 + field024 + field025 + field026 + field027 + field028 + field029 + field030 + field031 + field032 + field033 + field034 + field035 + field036 + field037 + field038 + field039 + field040 + field041 + field042 + field043 + field044 + field045 + field046 + field047 + field048 + field049 + field050 + field051 + field052 + field053 + field054 + field055 + field056 + field057 + field058 + field059 + field060 + field061 + field062 + field063 + field064 + field065 + field066 + field067 + field068 + field069 + field070 + field071 + field072 + field073 + field074 + field075 + field076 + field077 + field078 + field079 + field080 + field081 + field082 + field083 + field084 + field085 + field086 + field087 + field088 + field089 + field090 + field091 + field092 + field093 + field094 + field095 + field096 + field097 + field098 + field099 + field100 + field101 + field102 + field103 + field104 + field105 + field106 + field107 + field108 + field109 + field110 + field111 + field112 + field113 + field114 + field115 + field116 + field117 + field118 + field119 + field120 + field121 + field122 + field123 + field124 + field125 + field126 + field127 + field128 + field129 + field130 + field131 + field132 + field133 + field134 + field135 + field136 + field137 + field138 + field139 + field140 + field141 + field142 + field143 + field144 + field145 + field146 + field147 + field148 + field149 + field150 + field151 + field152 + field153 + field154 + field155 + field156 + field157 + field158 + field159 + field160 + field161 + field162 + field163 + field164 + field165 + field166 + field167 + field168 + field169 + field170 + field171 + field172 + field173 + field174 + field175 + field176 + field177 + field178 + field179 + field180 + field181 + field182 + field183 + field184 + field185 + field186 + field187 + field188 + field189 + field190 + field191 + field192 + field193 + field194 + field195 + field196 + field197 + field198 + field199 + field200 +}{}{} + +FUNCTION {output_entry} { + cite$ " " * write$ +} + +FUNCTION {type} {output_entry} + +READ + +FUNCTION {set_sortkey} { + cite$ 'sort.key$ := +} + +ITERATE {set_sortkey} + +SORT + +FUNCTION {output_beg} { + "\section*{Test result}" write$ newline$ + "Processing... " write$ +} + +FUNCTION {output_end} { + newline$ + "\endinput" write$ newline$ +} + +EXECUTE {output_beg} + +ITERATE {call.type$} + +EXECUTE {output_end} diff --git a/Build/source/texk/web2c/tests/memdata3.bst b/Build/source/texk/web2c/tests/memdata3.bst new file mode 100644 index 00000000000..0f0205f4bba --- /dev/null +++ b/Build/source/texk/web2c/tests/memdata3.bst @@ -0,0 +1,654 @@ +ENTRY { + field001 + field002 + field003 + field004 + field005 + field006 + field007 + field008 + field009 + field010 + field011 + field012 + field013 + field014 + field015 + field016 + field017 + field018 + field019 + field020 + field021 + field022 + field023 + field024 + field025 + field026 + field027 + field028 + field029 + field030 + field031 + field032 + field033 + field034 + field035 + field036 + field037 + field038 + field039 + field040 + field041 + field042 + field043 + field044 + field045 + field046 + field047 + field048 + field049 + field050 + field051 + field052 + field053 + field054 + field055 + field056 + field057 + field058 + field059 + field060 + field061 + field062 + field063 + field064 + field065 + field066 + field067 + field068 + field069 + field070 + field071 + field072 + field073 + field074 + field075 + field076 + field077 + field078 + field079 + field080 + field081 + field082 + field083 + field084 + field085 + field086 + field087 + field088 + field089 + field090 + field091 + field092 + field093 + field094 + field095 + field096 + field097 + field098 + field099 + field100 + field101 + field102 + field103 + field104 + field105 + field106 + field107 + field108 + field109 + field110 + field111 + field112 + field113 + field114 + field115 + field116 + field117 + field118 + field119 + field120 + field121 + field122 + field123 + field124 + field125 + field126 + field127 + field128 + field129 + field130 + field131 + field132 + field133 + field134 + field135 + field136 + field137 + field138 + field139 + field140 + field141 + field142 + field143 + field144 + field145 + field146 + field147 + field148 + field149 + field150 + field151 + field152 + field153 + field154 + field155 + field156 + field157 + field158 + field159 + field160 + field161 + field162 + field163 + field164 + field165 + field166 + field167 + field168 + field169 + field170 + field171 + field172 + field173 + field174 + field175 + field176 + field177 + field178 + field179 + field180 + field181 + field182 + field183 + field184 + field185 + field186 + field187 + field188 + field189 + field190 + field191 + field192 + field193 + field194 + field195 + field196 + field197 + field198 + field199 + field200 +} +{ + int001 + int002 + int003 + int004 + int005 + int006 + int007 + int008 + int009 + int010 + int011 + int012 + int013 + int014 + int015 + int016 + int017 + int018 + int019 + int020 + int021 + int022 + int023 + int024 + int025 + int026 + int027 + int028 + int029 + int030 + int031 + int032 + int033 + int034 + int035 + int036 + int037 + int038 + int039 + int040 + int041 + int042 + int043 + int044 + int045 + int046 + int047 + int048 + int049 + int050 + int051 + int052 + int053 + int054 + int055 + int056 + int057 + int058 + int059 + int060 + int061 + int062 + int063 + int064 + int065 + int066 + int067 + int068 + int069 + int070 + int071 + int072 + int073 + int074 + int075 + int076 + int077 + int078 + int079 + int080 + int081 + int082 + int083 + int084 + int085 + int086 + int087 + int088 + int089 + int090 + int091 + int092 + int093 + int094 + int095 + int096 + int097 + int098 + int099 + int100 +} +{ + str001 + str002 + str003 + str004 + str005 + str006 + str007 + str008 + str009 + str010 + str011 + str012 + str013 + str014 + str015 + str016 + str017 + str018 + str019 + str020 + str021 + str022 + str023 + str024 + str025 + str026 + str027 + str028 + str029 + str030 + str031 + str032 + str033 + str034 + str035 + str036 + str037 + str038 + str039 + str040 + str041 + str042 + str043 + str044 + str045 + str046 + str047 + str048 + str049 + str050 + str051 + str052 + str053 + str054 + str055 + str056 + str057 + str058 + str059 + str060 + str061 + str062 + str063 + str064 + str065 + str066 + str067 + str068 + str069 + str070 + str071 + str072 + str073 + str074 + str075 + str076 + str077 + str078 + str079 + str080 + str081 + str082 + str083 + str084 + str085 + str086 + str087 + str088 + str089 + str090 + str091 + str092 + str093 + str094 + str095 + str096 + str097 + str098 + str099 + str100 +} + +INTEGERS { + g_int001 + g_int002 + g_int003 + g_int004 + g_int005 + g_int006 + g_int007 + g_int008 + g_int009 + g_int010 + g_int011 + g_int012 + g_int013 + g_int014 + g_int015 + g_int016 + g_int017 + g_int018 + g_int019 + g_int020 + g_int021 + g_int022 + g_int023 + g_int024 + g_int025 + g_int026 + g_int027 + g_int028 + g_int029 + g_int030 + g_int031 + g_int032 + g_int033 + g_int034 + g_int035 + g_int036 + g_int037 + g_int038 + g_int039 + g_int040 + g_int041 + g_int042 + g_int043 + g_int044 + g_int045 + g_int046 + g_int047 + g_int048 + g_int049 + g_int050 +} + +STRINGS { + g_str001 + g_str002 + g_str003 + g_str004 + g_str005 + g_str006 + g_str007 + g_str008 + g_str009 + g_str010 + g_str011 + g_str012 + g_str013 + g_str014 + g_str015 + g_str016 + g_str017 + g_str018 + g_str019 + g_str020 + g_str021 + g_str022 + g_str023 + g_str024 + g_str025 + g_str026 + g_str027 + g_str028 + g_str029 + g_str030 + g_str031 + g_str032 + g_str033 + g_str034 + g_str035 + g_str036 + g_str037 + g_str038 + g_str039 + g_str040 + g_str041 + g_str042 + g_str043 + g_str044 + g_str045 + g_str046 + g_str047 + g_str048 + g_str049 + g_str050 +} + +FUNCTION {single_fn_space} { + "text" + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + duplicate$ pop$ + pop$ +} + +FUNCTION {output_entry} { + cite$ " " * write$ +} + +FUNCTION {type} {output_entry} + +FUNCTION {default.type} {type} + +READ + +FUNCTION {set_sortkey} { + cite$ 'sort.key$ := +} + +ITERATE {set_sortkey} + +SORT + +FUNCTION {pool_size} { + "abcdefghijklmnopqrstuvwxy" + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + pop$ +} + +EXECUTE {pool_size} + +FUNCTION {glob_str_size} { + "abcdefghijklmnopqrstuvwxy" + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + 'g_str001 := +} + +EXECUTE {glob_str_size} + +FUNCTION {ent_str_size} { + "abcdefghijklmnopqrstuvwxy" + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + duplicate$ * + 'str001 := +} + +ITERATE {ent_str_size} + +FUNCTION {output_beg} { + "\section*{Test result}" write$ newline$ + "Processing... " write$ +} + +FUNCTION {output_end} { + newline$ + "\endinput" write$ newline$ +} + +EXECUTE {output_beg} + +ITERATE {call.type$} + +EXECUTE {output_end} |