summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pmpostdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-09-22 11:39:52 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-09-22 11:39:52 +0000
commit2810785765f50ceb5a18d65346f1866c160dd34d (patch)
treece206101037caaed78f5515bf9f09ff99dc50a8f /Build/source/texk/web2c/pmpostdir
parenta24bf8c59f33a1f347db0fd2270862a2a59a1954 (diff)
pMetaPost, upMetaPost: Add realistic test cases
git-svn-id: svn://tug.org/texlive/trunk@35230 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pmpostdir')
-rw-r--r--Build/source/texk/web2c/pmpostdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/pmpostdir/am/pmpost.am15
-rwxr-xr-xBuild/source/texk/web2c/pmpostdir/pmpsamp.test35
-rw-r--r--Build/source/texk/web2c/pmpostdir/tests/psample.mp16
-rwxr-xr-xBuild/source/texk/web2c/pmpostdir/upmpsamp.test35
5 files changed, 103 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/pmpostdir/ChangeLog b/Build/source/texk/web2c/pmpostdir/ChangeLog
index 0e3eeadb4d5..aa615995ad6 100644
--- a/Build/source/texk/web2c/pmpostdir/ChangeLog
+++ b/Build/source/texk/web2c/pmpostdir/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pmpsamp.test, upmpsamp.test, tests/psample.mp: Shell scripts
+ and data for new tests.
+
2014-09-17 Peter Breitenlohner <peb@mppmu.mpg.de>
* ptfmin.ch: Allow character codes up to 0xffff.
@@ -9,4 +14,4 @@
* Import pMetaPost and upMetaPost from ???.
* Rename change files and adapt to TeX Live build system.
* Handle pMetaPost/upMetaPost differences via '#ifdef UPMP'.
- * pmpost.test, upmpost.test: Shell scripts for simple test.
+ * pmpost.test, upmpost.test: Shell scripts for simple tests.
diff --git a/Build/source/texk/web2c/pmpostdir/am/pmpost.am b/Build/source/texk/web2c/pmpostdir/am/pmpost.am
index b0d5a86b06b..e6e1d9f1654 100644
--- a/Build/source/texk/web2c/pmpostdir/am/pmpost.am
+++ b/Build/source/texk/web2c/pmpostdir/am/pmpost.am
@@ -167,14 +167,21 @@ DISTCLEANFILES += $(nodist_pmpost_SOURCES) \
## (u)pMetaPost Tests
##
-pmp_tests = pmpostdir/pmpost.test pmpostdir/upmpost.test
+pmpost_tests = pmpostdir/pmpost.test pmpostdir/pmpsamp.test
+upmpost_tests = pmpostdir/upmpost.test pmpostdir/upmpsamp.test
-EXTRA_DIST += $(pmp_tests)
+EXTRA_DIST += $(pmpost_tests) $(upmpost_tests)
if PMP
-TESTS += pmpostdir/pmpost.test
+TESTS += $(pmpost_tests)
endif PMP
if UPMP
-TESTS += pmpostdir/upmpost.test
+TESTS += $(upmpost_tests)
endif UPMP
+EXTRA_DIST += pmpostdir/tests/psample.mp
+## pmpostdir/pmpsamp.test
+DISTCLEANFILES += pmpsamp.*
+## pmpostdir/upmpsamp.test
+DISTCLEANFILES += upmpsamp.*
+
diff --git a/Build/source/texk/web2c/pmpostdir/pmpsamp.test b/Build/source/texk/web2c/pmpostdir/pmpsamp.test
new file mode 100755
index 00000000000..aba36e6dcba
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/pmpsamp.test
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+tests=pmpostdir/tests
+
+test -d $tests || mkdir -p $tests
+
+TEXMFCNF=$srcdir/../kpathsea
+
+tfmpath=`$KPSEWHICH cmr10.tfm` || exit 77
+TFMFONTS="$srcdir/$tests;`echo $tfmpath | sed 's,/fonts/tfm/.*$,/fonts/tfm//,'`"
+
+mppath=`$KPSEWHICH plain.mp` || exit 77
+MPINPUTS=".;`dirname $mppath`"
+
+mappath=`$KPSEWHICH psfonts.map` || exit 77
+TEXFONTMAPS=`echo $mappath | sed 's,/fonts/map/.*$,/fonts/map//,'`
+
+t1path=`$KPSEWHICH cmmi10.pfb` || exit 77
+T1FONTS="$srcdir/$tests;`echo $t1path | sed 's,/fonts/type1/.*$,/fonts/type1//,'`"
+
+vfpath=`$KPSEWHICH min10.vf` || exit 77
+VFFONTS="$srcdir/$tests;`dirname $vfpath`"
+
+export TEXMFCNF TFMFONTS MPINPUTS TEXFONTMAPS T1FONTS VFFONTS
+
+eptex -version >/dev/null 2>&1 || exit 77
+
+echo 'input plain;' >pmpsamp.mp
+cat "$srcdir/$tests/psample.mp" >>pmpsamp.mp
+
+./pmpost -ini -kanji=utf8 -tex=eptex pmpsamp || exit 1
+
diff --git a/Build/source/texk/web2c/pmpostdir/tests/psample.mp b/Build/source/texk/web2c/pmpostdir/tests/psample.mp
new file mode 100644
index 00000000000..db5867ba8df
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/tests/psample.mp
@@ -0,0 +1,16 @@
+prologues:=3;
+outputformat:="eps";
+outputtemplate:="%j.%o";
+beginfig(1);
+ u=1cm;
+ drawarrow (-.5u,0)--(4u,0);
+ drawarrow (0,-.5u)--(0,2u);
+ pickup pencircle scaled 1pt;
+ draw (0,0){up}
+ for i=1 upto 8: ..(i/2,sqrt(i/2))*u endfor;
+ label.lrt(btex 関数$y=\sqrt{x}$ etex, (3,sqrt(3))*u);
+ label.rt(btex $x$軸 etex, (4,0)*u);
+ label.top(btex $y$軸 etex, (0,2)*u);
+ label.llft(btex 原点$O$ etex, (0,0));
+endfig;
+end.
diff --git a/Build/source/texk/web2c/pmpostdir/upmpsamp.test b/Build/source/texk/web2c/pmpostdir/upmpsamp.test
new file mode 100755
index 00000000000..f4dfe95e3ae
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/upmpsamp.test
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+tests=pmpostdir/tests
+
+test -d $tests || mkdir -p $tests
+
+TEXMFCNF=$srcdir/../kpathsea
+
+tfmpath=`$KPSEWHICH cmr10.tfm` || exit 77
+TFMFONTS="$srcdir/$tests;`echo $tfmpath | sed 's,/fonts/tfm/.*$,/fonts/tfm//,'`"
+
+mppath=`$KPSEWHICH plain.mp` || exit 77
+MPINPUTS=".;`dirname $mppath`"
+
+mappath=`$KPSEWHICH psfonts.map` || exit 77
+TEXFONTMAPS=`echo $mappath | sed 's,/fonts/map/.*$,/fonts/map//,'`
+
+t1path=`$KPSEWHICH cmmi10.pfb` || exit 77
+T1FONTS="$srcdir/$tests;`echo $t1path | sed 's,/fonts/type1/.*$,/fonts/type1//,'`"
+
+vfpath=`$KPSEWHICH upjisr-h.vf` || exit 77
+VFFONTS="$srcdir/$tests;`dirname $vfpath`"
+
+export TEXMFCNF TFMFONTS MPINPUTS TEXFONTMAPS T1FONTS VFFONTS
+
+euptex -version >/dev/null 2>&1 || exit 77
+
+echo 'input plain;' >upmpsamp.mp
+cat "$srcdir/$tests/psample.mp" >>upmpsamp.mp
+
+./upmpost -ini -tex=euptex upmpsamp || exit 1
+