diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-11 14:25:18 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-11 14:25:18 +0000 |
commit | 312568e4a550d6a982c70c80ea52b17194f59af9 (patch) | |
tree | 622ee6ab055ebab811c73da2eb30d27604a15ac7 /Build/source | |
parent | 5757a53cfcfc259bee001ed4fe1302532159ace6 (diff) |
dvips: update tests
git-svn-id: svn://tug.org/texlive/trunk@67885 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/beginfontk1.test | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/eepic-nan.test | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/pfbincl.test | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/same-name.test | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/test-afm2tfm.test | 8 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/test-dvips.test | 8 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/test-missing-image.test | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/test-overflow-buffers.test | 8 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/uptex-vf.test | 40 |
10 files changed, 73 insertions, 27 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index c08f2b2b081..53edb7b7165 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,9 @@ +2023-08-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * beginfontk1.test, eepic-nan.test, pfbincl.test, same-name.test, + test-{afm2tfm,dvips,missing-image,overflow-buffers}.test, + uptex-vf.test: Make easier to test on Windows. + 2023-04-29 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * {virtualfont,pprescan,scanpage,dopage,tfmload}.c, dvips.h: diff --git a/Build/source/texk/dvipsk/beginfontk1.test b/Build/source/texk/dvipsk/beginfontk1.test index 8f9d92349d2..ab8bb13185a 100755 --- a/Build/source/texk/dvipsk/beginfontk1.test +++ b/Build/source/texk/dvipsk/beginfontk1.test @@ -4,8 +4,12 @@ # ensure -K1 does not remove newline after %%BeginFont line. # Report from T S, 1 Jan 2010 16:32:16. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + tst=beginfontk1 -./dvips -K1 $srcdir/testdata/$tst.dvi -o || exit 1 +$_dvips -K1 $srcdir/testdata/$tst.dvi -o || exit 1 grep '^%%BeginFont: /MC1_ArialBold$' $tst.ps || exit 1 exit 0 diff --git a/Build/source/texk/dvipsk/eepic-nan.test b/Build/source/texk/dvipsk/eepic-nan.test index fc0713a7338..ecffa198bda 100755 --- a/Build/source/texk/dvipsk/eepic-nan.test +++ b/Build/source/texk/dvipsk/eepic-nan.test @@ -4,8 +4,12 @@ # ensure we don't get nan from eepic doc. # Report from Stefan Moser to mactex-support, 20 Oct 2010 02:37:45. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + tst=eepic-nan -./dvips -Ppdf $srcdir/testdata/$tst.dvi -o || exit 1 +$_dvips -Ppdf $srcdir/testdata/$tst.dvi -o || exit 1 grep ' nan ' $tst.ps && exit 1 exit 0 diff --git a/Build/source/texk/dvipsk/pfbincl.test b/Build/source/texk/dvipsk/pfbincl.test index 6b06c194b8b..b3088cd00bc 100755 --- a/Build/source/texk/dvipsk/pfbincl.test +++ b/Build/source/texk/dvipsk/pfbincl.test @@ -2,7 +2,11 @@ # $Id$ # Public domain. -./dvips -D 300 $srcdir/testdata/pfbincl.xdv -o pfbincl.ps || exit 1 +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + +$_dvips -D 300 $srcdir/testdata/pfbincl.xdv -o pfbincl.ps || exit 1 diff $srcdir/testdata/pfbincl.xps pfbincl.ps exit 0 diff --git a/Build/source/texk/dvipsk/same-name.test b/Build/source/texk/dvipsk/same-name.test index 4459ab3e48e..732a099c4b8 100755 --- a/Build/source/texk/dvipsk/same-name.test +++ b/Build/source/texk/dvipsk/same-name.test @@ -3,9 +3,13 @@ # Public domain. # Test oname == iname. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + rm -f same-name.dvi same-name.out -./dvips same-name.dvi -o same-name.dvi 2>same-name.out \ +$_dvips same-name.dvi -o same-name.dvi 2>same-name.out \ && exit 1 grep 'Output name should be different from input name' \ diff --git a/Build/source/texk/dvipsk/test-afm2tfm.test b/Build/source/texk/dvipsk/test-afm2tfm.test index 769aaa25910..c4ed60d75cc 100755 --- a/Build/source/texk/dvipsk/test-afm2tfm.test +++ b/Build/source/texk/dvipsk/test-afm2tfm.test @@ -7,6 +7,10 @@ # make -C $wp TESTS=test-afm2tfm.test check # where wp=.../Work/texk/dvipsk +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_afm2tfm=$BinDir/afm2tfm$ExeExt + test_file=afmtest.afm test_dir=$srcdir/../tests/texmf test_input=$test_dir/$test_file @@ -34,7 +38,7 @@ do_check () { # could run tftopl, but let's not assume it. } -do_check ./afm2tfm "$test_file" -do_check ./afm2tfm "$test_file" -p $srcdir/testdata/8r.enc # options after +do_check $_afm2tfm "$test_file" +do_check $_afm2tfm "$test_file" -p $srcdir/testdata/8r.enc # options after exit 0 diff --git a/Build/source/texk/dvipsk/test-dvips.test b/Build/source/texk/dvipsk/test-dvips.test index 2ce1dff2b71..5a942e6bb0d 100755 --- a/Build/source/texk/dvipsk/test-dvips.test +++ b/Build/source/texk/dvipsk/test-dvips.test @@ -2,11 +2,15 @@ # $Id$ # Public domain. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + rm -f mtest.ps -./dvips -D 300 $srcdir/testdata/dvipstst.xdv -o dvipstst.ps +$_dvips -D 300 $srcdir/testdata/dvipstst.xdv -o dvipstst.ps mv dvipstst.ps mtest.ps || exit 1 -./dvips -D 300 $srcdir/testdata/dvipstst.xdv -o || exit 1 +$_dvips -D 300 $srcdir/testdata/dvipstst.xdv -o || exit 2 diff $srcdir/testdata/dvipstst.xps dvipstst.ps exit 0 diff --git a/Build/source/texk/dvipsk/test-missing-image.test b/Build/source/texk/dvipsk/test-missing-image.test index a7aaa32b6d3..bff34639e9a 100755 --- a/Build/source/texk/dvipsk/test-missing-image.test +++ b/Build/source/texk/dvipsk/test-missing-image.test @@ -7,7 +7,11 @@ # make -C $wp TESTS=test-missing-image.test check # where wp=.../Work/texk/dvipsk -if ./dvips $srcdir/testdata/missing-image.dvi -o missing-image.ps; then +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + +if $_dvips $srcdir/testdata/missing-image.dvi -o missing-image.ps; then echo "$0: found image file, but shouldn't have." >&2 exit 1 fi diff --git a/Build/source/texk/dvipsk/test-overflow-buffers.test b/Build/source/texk/dvipsk/test-overflow-buffers.test index 28e314ef0ad..76ed3374c02 100755 --- a/Build/source/texk/dvipsk/test-overflow-buffers.test +++ b/Build/source/texk/dvipsk/test-overflow-buffers.test @@ -3,10 +3,14 @@ # Public domain. Various buffer overflows, reported by # Andy Nguyen of ETH Zurich. The program should detect and abort. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + for tst in overflow-color-push overflow-epsfile \ overflow-ifffile overflow-psbox; do : - if ./dvips $srcdir/testdata/$tst.dvi -o; then + if $_dvips $srcdir/testdata/$tst.dvi -o; then echo "$0: test $tst should have failed." >&2 exit 1 fi @@ -15,7 +19,7 @@ done # overflow-keyword succeeds, because the special is ignored, # because the file (named with 999 a's) does not exist. tst=overflow-keyword -./dvips $srcdir/testdata/$tst.dvi -o || exit 1 +$_dvips $srcdir/testdata/$tst.dvi -o || exit 1 grep ' @setspecial' $tst.ps || exit 1 exit 0 diff --git a/Build/source/texk/dvipsk/uptex-vf.test b/Build/source/texk/dvipsk/uptex-vf.test index 4cb39074cd7..82701b7c4e2 100755 --- a/Build/source/texk/dvipsk/uptex-vf.test +++ b/Build/source/texk/dvipsk/uptex-vf.test @@ -3,52 +3,60 @@ # Public domain. # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_dvips=$BinDir/dvips$ExeExt + TEXFONTS=".;$srcdir/testdata" SOURCE_DATE_EPOCH=1588474800 export TEXFONTS SOURCE_DATE_EPOCH rm -f upjf.vf upjv.vf upjf-g.ofm upjv-g.ofm upjf-r.ofm upjv-r.ofm +rc=0 + cp $srcdir/testdata/upjf_full.vf ./upjf.vf && \ cp $srcdir/testdata/upjv_full.vf ./upjv.vf && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ -mv upjf.ps upjf_full.ps || exit 1 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ +mv upjf.ps upjf_full.ps || rc=1 cp $srcdir/testdata/upjf_omit.vf ./upjf.vf && \ cp $srcdir/testdata/upjv_omit.vf ./upjv.vf && \ cp $srcdir/testdata/upjf-g00.ofm ./upjf-g.ofm && \ cp $srcdir/testdata/upjv-g00.ofm ./upjv-g.ofm && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ -mv upjf.ps upjf_omit.ps || exit 2 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ +mv upjf.ps upjf_omit.ps || rc=2 -diff upjf_full.ps upjf_omit.ps || exit 3 +diff upjf_full.ps upjf_omit.ps || rc=3 cp $srcdir/testdata/upjf-r00.ofm ./upjf-r.ofm && \ cp $srcdir/testdata/upjv-r00.ofm ./upjv-r.ofm && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ -mv upjf.ps upjf_omit2.ps || exit 4 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map && \ +mv upjf.ps upjf_omit2.ps || rc=4 -diff upjf_full.ps upjf_omit2.ps || exit 5 +diff upjf_full.ps upjf_omit2.ps || rc=5 rm -f upjf-r.ofm upjv-r.ofm cp $srcdir/testdata/upjf1_full.vf ./upjf.vf && \ cp $srcdir/testdata/upjv_full.vf ./upjv.vf && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ -mv upjf1.ps upjf1_full.ps || exit 6 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ +mv upjf1.ps upjf1_full.ps || rc=6 cp $srcdir/testdata/upjf1_omit.vf ./upjf.vf && \ cp $srcdir/testdata/upjv_omit.vf ./upjv.vf && \ cp $srcdir/testdata/upjf1-r.tfm ./upjf-r.tfm && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ -mv upjf1.ps upjf1_omit.ps || exit 7 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ +mv upjf1.ps upjf1_omit.ps || rc=7 -diff upjf1_full.ps upjf1_omit.ps || exit 8 +diff upjf1_full.ps upjf1_omit.ps || rc=8 cp $srcdir/testdata/upjf-r00.ofm ./upjf-r.ofm && \ cp $srcdir/testdata/upjv-r00.ofm ./upjv-r.ofm && \ -./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ -mv upjf1.ps upjf1_omit2.ps || exit 9 +$_dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf1.ps -u $srcdir/testdata/upjf.map && \ +mv upjf1.ps upjf1_omit2.ps || rc=9 + +diff upjf1_full.ps upjf1_omit2.ps || rc=10 -diff upjf1_full.ps upjf1_omit2.ps || exit 10 +exit $rc |