1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Minor improvements to the regression tests (#366)

- tests/basic.sh: Fix a regression test that was failing under dtksh by
  allowing the error message to name ksh 'lt-dtksh'. Additionally, fix
  the test's inaccurate failure message (a version string is not what
  the regression test expects).

- test/builtins.sh: Exclude the expr builtin from the unrecognized
  options test because it's incompatible. Additionally, put the
  unrecognized options test inside of a function to ensure that it works
  with the future local builtin (https://github.com/ksh93/ksh/issues/123).

- tests/io.sh: The long seek test may fail to seek past the 2 GiB
  boundary on 32-bit systems, so only allow it to run on 64-bit.
  References:
  3222ac2b59/f/ksh-1.0.0-beta.1-regre-tests.patch
  a5c692e1bd

- tests/substring.sh: Add a regression test for the ${.sh.match}
  crashing bug fixed in commit 1bf1d2f8.
This commit is contained in:
Johnothan King 2021-12-08 16:58:40 -08:00 committed by Martijn Dekker
parent caae7dd7c9
commit 1f5ad85cd4
4 changed files with 30 additions and 18 deletions

View file

@ -832,7 +832,7 @@ actual=$($SHELL --verson 2>&1)
actual_status=$?
expect='ksh: verson: bad option(s)'
expect_status=2
[[ "$actual" == ${expect}* ]] || err_exit "failed to get version string" \
[[ "$actual" == *${expect}* ]] || err_exit "failed to handle invalid flag" \
"(expected $(printf %q ${expect}*), got $(printf %q "$actual"))"
[[ $actual_status == $expect_status ]] ||
err_exit "wrong exit status (expected '$expect_status', got '$actual_status')"