From c103b7963628e6ff10a1fc025aebd0bba5f72a55 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 24 Jan 2012 13:22:01 +0000 Subject: pltotf, vptovf, and Co: scanning real numbers git-svn-id: svn://tug.org/texlive/trunk@25190 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/omegaware/ChangeLog | 8 ++++++++ Build/source/texk/web2c/omegaware/am/omegaware.am | 7 +++++-- Build/source/texk/web2c/omegaware/opl2ofm.web | 2 +- Build/source/texk/web2c/omegaware/ovp2ovf.web | 2 +- Build/source/texk/web2c/omegaware/realnum.test | 19 +++++++++++++++++++ Build/source/texk/web2c/omegaware/tests/realnum.opl | 14 ++++++++++++++ Build/source/texk/web2c/omegaware/tests/realnum.out | 20 ++++++++++++++++++++ 7 files changed, 68 insertions(+), 4 deletions(-) create mode 100755 Build/source/texk/web2c/omegaware/realnum.test create mode 100644 Build/source/texk/web2c/omegaware/tests/realnum.opl create mode 100644 Build/source/texk/web2c/omegaware/tests/realnum.out (limited to 'Build/source/texk/web2c/omegaware') diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog index 299ca6c1704..bce4803320c 100644 --- a/Build/source/texk/web2c/omegaware/ChangeLog +++ b/Build/source/texk/web2c/omegaware/ChangeLog @@ -1,3 +1,11 @@ +2012-01-24 Peter Breitenlohner + + * opl2ofm.web, ovp2ovf.web: Interpret "--" as "+", not "-". + + * realnum.test, tests/realnum.opl, tests/realnum.out (new): + Shell script and data for a new test. + * am/omegaware.am: Add the new test. + 2012-01-22 Peter Breitenlohner * ofm2opl.web, ovf2ovp.web: Add missing space in error message. diff --git a/Build/source/texk/web2c/omegaware/am/omegaware.am b/Build/source/texk/web2c/omegaware/am/omegaware.am index a264f5bf776..484b8446c86 100644 --- a/Build/source/texk/web2c/omegaware/am/omegaware.am +++ b/Build/source/texk/web2c/omegaware/am/omegaware.am @@ -1,6 +1,6 @@ ## texk/web2c/omegaware/am/omegaware.am: Makefile fragment for omegaware web programs. ## -## Copyright (C) 2009-2011 Peter Breitenlohner +## Copyright (C) 2009-2012 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. omegaware_tools = odvicopy odvitype otangle @@ -101,7 +101,7 @@ DISTCLEANFILES += ovp2ovf.web OTANGLE_tests = omegaware/odvicopy.test omegaware/odvitype.test \ omegaware/otangle.test OMFONTS_tests = omegaware/level1.test omegaware/ofonts.test \ - omegaware/omfonts.test omegaware/repeat.test \ + omegaware/omfonts.test omegaware/realnum.test omegaware/repeat.test \ omegaware/selectfont.test omegaware/specialhex.test EXTRA_DIST += $(OTANGLE_tests) $(OMFONTS_tests) @@ -146,6 +146,9 @@ DISTCLEANFILES += omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \ omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* ## omegaware/otangle.test DISTCLEANFILES += cftest.p +## omegaware/realnum.test +EXTRA_DIST += omegaware/tests/realnum.opl omegaware/tests/realnum.out +DISTCLEANFILES += omegaware/tests/xrealnum.* ## omegaware/repeat.test EXTRA_DIST += omegaware/tests/repeat.opl omegaware/tests/repeated.opl DISTCLEANFILES += omegaware/tests/xrepeated.* diff --git a/Build/source/texk/web2c/omegaware/opl2ofm.web b/Build/source/texk/web2c/omegaware/opl2ofm.web index 89a591d8666..9d0dd6f93f4 100644 --- a/Build/source/texk/web2c/omegaware/opl2ofm.web +++ b/Build/source/texk/web2c/omegaware/opl2ofm.web @@ -1433,7 +1433,7 @@ end; @ @= repeat get_next; if cur_char="-" then begin - cur_char:=" "; negative:=true; + cur_char:=" "; negative:=not negative; end else if cur_char="+" then cur_char:=" "; until cur_char<>" " diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.web b/Build/source/texk/web2c/omegaware/ovp2ovf.web index ad9def4bf73..63c2977fba2 100644 --- a/Build/source/texk/web2c/omegaware/ovp2ovf.web +++ b/Build/source/texk/web2c/omegaware/ovp2ovf.web @@ -1711,7 +1711,7 @@ end; @ @= repeat get_next; if cur_char="-" then begin - cur_char:=" "; negative:=true; + cur_char:=" "; negative:=not negative; end else if cur_char="+" then cur_char:=" "; until cur_char<>" " diff --git a/Build/source/texk/web2c/omegaware/realnum.test b/Build/source/texk/web2c/omegaware/realnum.test new file mode 100755 index 00000000000..d0ea71e6e2d --- /dev/null +++ b/Build/source/texk/web2c/omegaware/realnum.test @@ -0,0 +1,19 @@ +#! /bin/sh + +# Copyright (C) 2012 Peter Breitenlohner +# You may freely use, modify and/or distribute this file. + +tests=omegaware/tests + +test -d $tests || mkdir -p $tests + +TEXMFCNF=$srcdir/../kpathsea +OFMFONTS=./$tests +export TEXMFCNF OFMFONTS + +./opl2ofm -verbose $srcdir/$tests/realnum $tests/xrealnum || exit 1 + +./ofm2opl -verbose xrealnum $tests/xrealnum || exit 1 + +diff $srcdir/$tests/realnum.out $tests/xrealnum.opl || exit 1 + diff --git a/Build/source/texk/web2c/omegaware/tests/realnum.opl b/Build/source/texk/web2c/omegaware/tests/realnum.opl new file mode 100644 index 00000000000..fbe0975ece9 --- /dev/null +++ b/Build/source/texk/web2c/omegaware/tests/realnum.opl @@ -0,0 +1,14 @@ +(DESIGNSIZE R 10.0) +(CHARACTER C A + (COMMENT no space, tab, or sign required after R) + (CHARWD R) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R+1) + ) +(CHARACTER C B + (CHARWD R .) + (CHARHT R 1.) + (CHARDP R .1) + (CHARIC R--1) + ) diff --git a/Build/source/texk/web2c/omegaware/tests/realnum.out b/Build/source/texk/web2c/omegaware/tests/realnum.out new file mode 100644 index 00000000000..83fdc2bf093 --- /dev/null +++ b/Build/source/texk/web2c/omegaware/tests/realnum.out @@ -0,0 +1,20 @@ +(FAMILY UNSPECIFIED) +(FACE F MRR) +(CODINGSCHEME UNSPECIFIED) +(DESIGNSIZE R 10.0) +(COMMENT DESIGNSIZE IS IN POINTS) +(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) +(CHECKSUM H 3996EA86) +(SEVENBITSAFEFLAG TRUE) +(CHARACTER H 41 + (CHARWD R 0.0) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R 1.0) + ) +(CHARACTER H 42 + (CHARWD R 0.0) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R 1.0) + ) -- cgit v1.2.3