diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:51:21 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:51:21 +0000 |
commit | 90b01bdcdd2ccd28a9c98a38aa024fefb8f5e195 (patch) | |
tree | 236bab730c5f14389539ecf8a6036414d8112b2c | |
parent | 9cee84ce5c109fcb12d9bbed68afb99b1933ff58 (diff) |
musixtnt: update a test
git-svn-id: svn://tug.org/texlive/trunk@67912 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/musixtnt/ChangeLog | 4 | ||||
-rwxr-xr-x | Build/source/texk/musixtnt/musixtnt-src/msxlint.test | 26 |
2 files changed, 23 insertions, 7 deletions
diff --git a/Build/source/texk/musixtnt/ChangeLog b/Build/source/texk/musixtnt/ChangeLog index 5b976b2b98c..27a27c5f957 100644 --- a/Build/source/texk/musixtnt/ChangeLog +++ b/Build/source/texk/musixtnt/ChangeLog @@ -1,3 +1,7 @@ +2023-08-13 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * musixtnt-src/msxlint.test: Make easier to test on Windows. + 2022-08-30 Karl Berry <karl@freefriends.org> * musixtnt-src/msxlint.1: typo fixes from Hilmar Preu\ss{}e, diff --git a/Build/source/texk/musixtnt/musixtnt-src/msxlint.test b/Build/source/texk/musixtnt/musixtnt-src/msxlint.test index 9cd33d22c8f..169bd293816 100755 --- a/Build/source/texk/musixtnt/musixtnt-src/msxlint.test +++ b/Build/source/texk/musixtnt/musixtnt-src/msxlint.test @@ -3,28 +3,40 @@ # Copyright 2015 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_msxlint=$BinDir/msxlint$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 + LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE echo && echo "*** msxlint --help" -./msxlint --help || exit 1 +$_msxlint --help || exit 1 echo && echo "*** msxlint --version" -./msxlint --version || exit 1 +$_msxlint --version || exit 2 : ${testsrc:=$srcdir/tests} echo && echo "*** msxlint -d tests/badtest" -./msxlint -d $testsrc/badtest && exit 1 +$_msxlint -d $testsrc/badtest && exit 3 echo && echo "*** msxlint tests/linttest >linttest.out1" -./msxlint $testsrc/linttest | sed '/^This/,/^Processing/d' >linttest.out1 || exit 1 +$_msxlint $testsrc/linttest | sed '/^This/,/^Processing/d' >linttest.out1 || exit 4 echo && echo "*** diff tests/linttest.out linttest.out1" -diff $testsrc/linttest.out linttest.out1 || exit 1 +$DIFF $testsrc/linttest.out linttest.out1 || exit 5 echo && echo "*** cat tests/linttest.tex | msxlint >linttest.out2" -cat $testsrc/linttest.tex | ./msxlint | sed '/^This/,/^Processing/d' >linttest.out2 || exit 1 +cat $testsrc/linttest.tex | $_msxlint | sed '/^This/,/^Processing/d' >linttest.out2 || exit 6 echo && echo "*** diff tests/linttest.out linttest.out2" -diff $testsrc/linttest.out linttest.out2 || exit 1 +$DIFF $testsrc/linttest.out linttest.out2 || exit 7 |