summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-08-23 14:52:49 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2023-08-23 14:52:49 +0000
commiteeb5a3f1000b8ef8494c5cac723cbf8be57e706b (patch)
tree99ccf778c02d2dda9131e49647c2174a386f2f31
parentaf3199c1aeb3011e7e6b24ba5eaa938d1050ce97 (diff)
pplib: Make easier to test on Windows
git-svn-id: svn://tug.org/texlive/trunk@68027 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/pplib/ChangeLog4
-rwxr-xr-xBuild/source/libs/pplib/pplib.test20
2 files changed, 18 insertions, 6 deletions
diff --git a/Build/source/libs/pplib/ChangeLog b/Build/source/libs/pplib/ChangeLog
index 670b31af3c4..c42af621816 100644
--- a/Build/source/libs/pplib/ChangeLog
+++ b/Build/source/libs/pplib/ChangeLog
@@ -1,3 +1,7 @@
+2023-08-23 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * pplib.test: Make easier to test on Windows.
+
2023-05-27 Karl Berry <karl@freefriends.org>
* pplib-src/test/out2: no period at end of message.
diff --git a/Build/source/libs/pplib/pplib.test b/Build/source/libs/pplib/pplib.test
index d4b162d3b5d..76d957f8bce 100755
--- a/Build/source/libs/pplib/pplib.test
+++ b/Build/source/libs/pplib/pplib.test
@@ -4,6 +4,14 @@
# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
+# 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
+
#srcdir='../../../source/libs/pplib'
#PPLIB_TREE=pplib-src
@@ -13,12 +21,12 @@ mkdir test
cp $srcdir/$PPLIB_TREE/test/luaimage.pdf test
(cd test && ../pptest1 luaimage.pdf | sed -e 's/memused.*$//;s/memwaste.*$//;' >out1 || exit 1) \
-&& (cd test && ../pptest2 luaimage.pdf >out2 || exit 1) \
-&& (cd test && ../pptest3 luaimage.pdf >out3 || exit 1) || exit 1
+&& (cd test && ../pptest2 luaimage.pdf >out2 || exit 2) \
+&& (cd test && ../pptest3 luaimage.pdf >out3 || exit 3) || exit 4
-diff $srcdir/$PPLIB_TREE/test/out1 test/out1 || exit 1
-diff $srcdir/$PPLIB_TREE/test/out2 test/out2 || exit 1
-diff $srcdir/$PPLIB_TREE/test/luaimage.pdf.out test/luaimage.pdf.out || exit 1
-diff $srcdir/$PPLIB_TREE/test/out3 test/out3 || exit 1
+diff $srcdir/$PPLIB_TREE/test/out1 test/out1 || exit 5
+$DIFF $srcdir/$PPLIB_TREE/test/out2 test/out2 || exit 6
+diff $srcdir/$PPLIB_TREE/test/luaimage.pdf.out test/luaimage.pdf.out || exit 7
+$DIFF $srcdir/$PPLIB_TREE/test/out3 test/out3 || exit 8