summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-09-17 09:06:29 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-09-17 09:06:29 +0000
commit7853a1ad37caf3886afd4f8ad64aa7e30307e608 (patch)
tree89817ba73fd233d362ed7ebfeef42932731a258b /Build/source/texk/web2c/mplibdir
parentb9e0682dcd290839d2d5ed2a90213c835ac983e5 (diff)
web2c: Make easier to test on Windows
git-svn-id: svn://tug.org/texlive/trunk@68304 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog5
-rwxr-xr-xBuild/source/texk/web2c/mplibdir/mptraptest.test16
2 files changed, 17 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index 5829ed62d1a..26e8f2fc59b 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,3 +1,8 @@
+2023-09-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * mptraptest.test:
+ Make easier to test on Windows.
+
2023-09-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* mp.w: Fixed a buffer overflow.
diff --git a/Build/source/texk/web2c/mplibdir/mptraptest.test b/Build/source/texk/web2c/mplibdir/mptraptest.test
index f1f610dce0d..95a55c82083 100755
--- a/Build/source/texk/web2c/mplibdir/mptraptest.test
+++ b/Build/source/texk/web2c/mplibdir/mptraptest.test
@@ -6,6 +6,14 @@ ExeExt=${ExeExt:-}
_mpost=$BinDir/mpost$ExeExt
_pltotf=$BinDir/pltotf$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
+
testdir=$abs_srcdir/triptrap
TEXMFCNF=$testdir; export TEXMFCNF
@@ -28,10 +36,10 @@ $LN_S $testdir/mtrap.mp . || exit 1
$_mpost --ini mtrap
diff $testdir/mtrap.log mtrap.log
-diff $testdir/mtrap.0 mtrap.0
-diff $testdir/mtrap.1 mtrap.1
-diff $testdir/writeo writeo
-diff $testdir/writeo.2 writeo.2
+$DIFF $testdir/mtrap.0 mtrap.0
+$DIFF $testdir/mtrap.1 mtrap.1
+$DIFF $testdir/writeo writeo
+$DIFF $testdir/writeo.2 writeo.2
$LN_S $testdir/trap.mp . || exit 1
$LN_S $testdir/trap.mpx . || exit 1