From 580e66220eb45ed1e114a3796e4a39d1e35f748b Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Tue, 28 May 2019 14:59:37 +0000 Subject: [e][u]ptexdir: add new tests. git-svn-id: svn://tug.org/texlive/trunk@51243 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/uptexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/uptexdir/am/uptex.am | 3 ++- Build/source/texk/web2c/uptexdir/upver.test | 32 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100755 Build/source/texk/web2c/uptexdir/upver.test (limited to 'Build/source/texk/web2c/uptexdir') diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index 355170372b5..a08660abef2 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,8 @@ +2019-05-28 Hironobu Yamashita + + * am/uptex.am: Add a new test. + * upver.test: New test file for version number consistency. + 2019-05-25 TANAKA Takuji * uptex-m.ch: diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index 6980b637e7e..ed9c00e431f 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -157,8 +157,9 @@ EXTRA_DIST += \ uptexdir/ChangeLog # upTeX Tests -uptex_tests = uptexdir/uptriptest.test +uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +uptexdir/upver.log: uptex$(EXEEXT) upweb_tests = \ uptexdir/upbibtex.test \ uptexdir/updvitype.test \ diff --git a/Build/source/texk/web2c/uptexdir/upver.test b/Build/source/texk/web2c/uptexdir/upver.test new file mode 100755 index 00000000000..3aca618a467 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/upver.test @@ -0,0 +1,32 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2019 Hironobu Yamashita +# You may freely use, modify and/or distribute this file. + +LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE + +TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF +TEXINPUTS=$srcdir/ptexdir/tests:.; export TEXINPUTS + +# check consistency between runtime terminal and log +./uptex -ini -interaction batchmode -jobname upver1-log pver1.tex >upver1-term.log || exit 1 +sed -nE 's/^This is ([-A-Za-z]+), Version [^-]+-([^ ]+) (.*)/\1 \2/p' \ + upver1-term.log >upver1-term_ed.log || exit 1 +sed -nE 's/^This is ([-A-Za-z]+), Version [^-]+-([^ ]+) (.*)/\1 \2/p' \ + upver1-log.log >upver1-log_ed.log || exit 1 +diff upver1-term_ed.log upver1-log_ed.log || exit 2 + +# check consistency between runtime and version output +./uptex -version >upver2-self.log || exit 1 +sed -nE '1 s/^([-A-Za-z]+) [^-]+-([^ ]+) (.*)/\1 \2/p' \ + upver2-self.log >upver2-self_ed.log || exit 1 +diff upver1-term_ed.log upver2-self_ed.log || exit 4 + +# check consistency between version output and version primitives +./uptex -ini -interaction batchmode -jobname upver2-prim pver2.tex || exit 1 +sed -nE 's/^Engine ([-A-Za-z]+) ([^ ]+) (.*)/\1 \2/p' \ + upver2-prim.log >upver2-prim_ed.log || exit 1 +diff upver2-self_ed.log upver2-prim_ed.log || exit 8 + +exit 0 + -- cgit v1.2.3