texlive[67908] Build/source/texk/detex: detex: update a test

commits+takuji at tug.org commits+takuji at tug.org
Sun Aug 13 15:50:57 CEST 2023


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

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

Modified: trunk/Build/source/texk/detex/ChangeLog
===================================================================
--- trunk/Build/source/texk/detex/ChangeLog	2023-08-13 13:50:50 UTC (rev 67907)
+++ trunk/Build/source/texk/detex/ChangeLog	2023-08-13 13:50:56 UTC (rev 67908)
@@ -1,3 +1,7 @@
+2023-08-13  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* detex.test: Make easier to test on Windows.
+
 2022-09-15  Karl Berry  <karl at freefriends.org>
 
 	* configure.ac (detex_version): 2.8.91.

Modified: trunk/Build/source/texk/detex/detex.test
===================================================================
--- trunk/Build/source/texk/detex/detex.test	2023-08-13 13:50:50 UTC (rev 67907)
+++ trunk/Build/source/texk/detex/detex.test	2023-08-13 13:50:56 UTC (rev 67908)
@@ -4,17 +4,29 @@
 # Copyright 2009 Peter Breitenlohner <tex-live at tug.org>
 # You may freely use, modify and/or distribute this file.
 
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_detex=$BinDir/detex$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
+
 echo '#' >texmf.cnf
 
-./detex $srcdir/test.tex >test.out \
-	&& diff test.out $srcdir/test.lout \
+$_detex $srcdir/test.tex >test.out \
+	&& $DIFF test.out $srcdir/test.lout \
 	|| exit 1
 
-./detex -l $srcdir/test.tex >test.out \
-	&& diff test.out $srcdir/test.lout \
-	|| exit 1
+$_detex -l $srcdir/test.tex >test.out \
+	&& $DIFF test.out $srcdir/test.lout \
+	|| exit 2
 
-./detex -t $srcdir/test.tex >test.out \
-	&& diff test.out $srcdir/test.tout \
-	|| exit 1
+$_detex -t $srcdir/test.tex >test.out \
+	&& $DIFF test.out $srcdir/test.tout \
+	|| exit 3
 



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