texlive[67909] Build/source/texk/dvipos: dvipos: update a test

commits+takuji at tug.org commits+takuji at tug.org
Sun Aug 13 15:51:03 CEST 2023


Revision: 67909
          http://tug.org/svn/texlive?view=revision&revision=67909
Author:   takuji
Date:     2023-08-13 15:51:02 +0200 (Sun, 13 Aug 2023)
Log Message:
-----------
dvipos: update a test

Modified Paths:
--------------
    trunk/Build/source/texk/dvipos/ChangeLog
    trunk/Build/source/texk/dvipos/dvipos.test

Modified: trunk/Build/source/texk/dvipos/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipos/ChangeLog	2023-08-13 13:50:56 UTC (rev 67908)
+++ trunk/Build/source/texk/dvipos/ChangeLog	2023-08-13 13:51:02 UTC (rev 67909)
@@ -1,3 +1,7 @@
+2023-08-13  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* dvipos.test: Make easier to test on Windows.
+
 2022-08-30  Karl Berry  <karl at freefriends.org>
 
 	* dvipos.1: typo fixes from Hilmar Preu\ss{}e,

Modified: trunk/Build/source/texk/dvipos/dvipos.test
===================================================================
--- trunk/Build/source/texk/dvipos/dvipos.test	2023-08-13 13:50:56 UTC (rev 67908)
+++ trunk/Build/source/texk/dvipos/dvipos.test	2023-08-13 13:51:02 UTC (rev 67909)
@@ -3,6 +3,18 @@
 # Copyright 2021 TANAKA Takuji
 # You may freely use, modify and/or distribute this file.
 
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_dvipos=$BinDir/dvipos$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
+
 TEXMFCNF=$srcdir/../kpathsea
 TFMFONTS="$srcdir/tests"
 export TEXMFCNF TFMFONTS
@@ -10,10 +22,10 @@
 ## play.dvi has no "pos:" specials
 rm -rf play*.*
 cp $srcdir/tests/play.dvi .
-./dvipos -b -o play.loc play.dvi || exit 1
+$_dvipos -b -o play.loc play.dvi || exit 1
 diff play.loc $srcdir/tests/play.loc || exit 2
 
 grep -v 'Processing_data_and_time' $srcdir/tests/play.pos > play_0.pos \
   && grep -v 'Processing_data_and_time' play.pos > play_1.pos \
-  && diff play_0.pos play_1.pos || exit 3
+  && $DIFF play_0.pos play_1.pos || exit 3
 



More information about the tex-live-commits mailing list.