diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:50:56 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:50:56 +0000 |
commit | a8685149544b33ddd9b893e46946e226188d8afc (patch) | |
tree | 29c1be59f0d47f198624edf232dfd57fa7b90418 /Build | |
parent | 52b65a3bc0146979fbe0bc851d97d07b38bab70e (diff) |
detex: update a test
git-svn-id: svn://tug.org/texlive/trunk@67908 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/detex/ChangeLog | 4 | ||||
-rwxr-xr-x | Build/source/texk/detex/detex.test | 28 |
2 files changed, 24 insertions, 8 deletions
diff --git a/Build/source/texk/detex/ChangeLog b/Build/source/texk/detex/ChangeLog index 53ff466210a..aa78331d9ec 100644 --- a/Build/source/texk/detex/ChangeLog +++ b/Build/source/texk/detex/ChangeLog @@ -1,3 +1,7 @@ +2023-08-13 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * detex.test: Make easier to test on Windows. + 2022-09-15 Karl Berry <karl@freefriends.org> * configure.ac (detex_version): 2.8.91. diff --git a/Build/source/texk/detex/detex.test b/Build/source/texk/detex/detex.test index fd3b3f50054..e4f796b8c85 100755 --- a/Build/source/texk/detex/detex.test +++ b/Build/source/texk/detex/detex.test @@ -4,17 +4,29 @@ # Copyright 2009 Peter Breitenlohner <tex-live@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 |