diff options
-rw-r--r-- | Build/source/texk/web2c/omegafonts/ChangeLog | 4 | ||||
-rwxr-xr-x | Build/source/texk/web2c/omegafonts/check.test | 10 | ||||
-rwxr-xr-x | Build/source/texk/web2c/omegafonts/repeat.test | 4 | ||||
-rwxr-xr-x | Build/source/texk/web2c/omegafonts/selectfont.test | 10 |
4 files changed, 24 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog index cd24d36bd07..d7df7a08bf6 100644 --- a/Build/source/texk/web2c/omegafonts/ChangeLog +++ b/Build/source/texk/web2c/omegafonts/ChangeLog @@ -1,3 +1,7 @@ +2023-09-03 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * {check,repeat,selectfont}.test: Update tests for Windows. + 2023-08-26 Karl Berry <karl@freefriends.org> * ligkern.test: protect against $rc being defined in the environment. diff --git a/Build/source/texk/web2c/omegafonts/check.test b/Build/source/texk/web2c/omegafonts/check.test index 4a0ec1ac256..9526c31de8b 100755 --- a/Build/source/texk/web2c/omegafonts/check.test +++ b/Build/source/texk/web2c/omegafonts/check.test @@ -8,6 +8,14 @@ BinDir=${BinDir:-.} ExeExt=${ExeExt:-} _omfonts=$BinDir/omfonts$ExeExt +# pre-generated test results in the repository are stored in LF +# but the output might be written in CRLF on some platform. +# if 'diff --strip-trailing-cr' is available, exploit it. +# (useful for tests on win32 binaries run on MSYS shell) +DIFF="diff" +$DIFF --strip-trailing-cr $0 $0 \ + && DIFF="diff --strip-trailing-cr" || echo + tests=tests test -d $tests || mkdir -p $tests @@ -30,6 +38,6 @@ echo && echo "*** ofm2opl xchecked stdout (xchecked.opl)" $_omfonts -ofm2opl $tests/xchecked >$tests/xchecked.opl || rc=4 echo && echo "*** diff checked.opl xchecked.opl" -diff $srcdir/$tests/checked.opl $tests/xchecked.opl || rc=5 +$DIFF $srcdir/$tests/checked.opl $tests/xchecked.opl || rc=5 exit $rc diff --git a/Build/source/texk/web2c/omegafonts/repeat.test b/Build/source/texk/web2c/omegafonts/repeat.test index 5331922b9ea..835c921515d 100755 --- a/Build/source/texk/web2c/omegafonts/repeat.test +++ b/Build/source/texk/web2c/omegafonts/repeat.test @@ -13,10 +13,10 @@ tests=tests test -d $tests || mkdir -p $tests TEXMFCNF=$srcdir/../../kpathsea \ - ./omfonts -opl2ofm -verbose $srcdir/$tests/repeat $tests/xrepeated || exit 1 + $_omfonts -opl2ofm -verbose $srcdir/$tests/repeat $tests/xrepeated || exit 1 TEXMFCNF=$srcdir/../../kpathsea \ - ./omfonts -ofm2opl -verbose $tests/xrepeated $tests/xrepeated || exit 2 + $_omfonts -ofm2opl -verbose $tests/xrepeated $tests/xrepeated || exit 2 diff $srcdir/$tests/repeated.opl $tests/xrepeated.opl || exit 3 diff --git a/Build/source/texk/web2c/omegafonts/selectfont.test b/Build/source/texk/web2c/omegafonts/selectfont.test index 9e605587028..7cfa8af3741 100755 --- a/Build/source/texk/web2c/omegafonts/selectfont.test +++ b/Build/source/texk/web2c/omegafonts/selectfont.test @@ -8,6 +8,14 @@ BinDir=${BinDir:-.} ExeExt=${ExeExt:-} _omfonts=$BinDir/omfonts$ExeExt +# pre-generated test results in the repository are stored in LF +# but the output might be written in CRLF on some platform. +# if 'diff --strip-trailing-cr' is available, exploit it. +# (useful for tests on win32 binaries run on MSYS shell) +DIFF="diff" +$DIFF --strip-trailing-cr $0 $0 \ + && DIFF="diff --strip-trailing-cr" || echo + tests=tests test -d $tests || mkdir -p $tests @@ -35,6 +43,6 @@ $_omfonts -ovp2ovf -verbose $srcdir/$tests/sample.ovp $tests/sample2.ovf || rc=8 $_omfonts -ovf2ovp -verbose $tests/sample2 sample2 >$tests/xsample2.out || rc=9 -diff $srcdir/$tests/sample.out $tests/xsample2.out || rc=10 +$DIFF $srcdir/$tests/sample.out $tests/xsample2.out || rc=10 exit $rc |