1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 23:14:14 +00:00
cde/src/cmd/ksh93/tests/_common
Johnothan King ef4fe4106c
Fix a few regression test failures (#222)
src/cmd/ksh93/tests/_common:
- Commit aed5c6d7 renamed the err_exit function,
  breaking a few tests in glob.sh that call the function
  directly instead of using the alias. Restore the function.

src/cmd/ksh93/tests/builtins.sh:
- The dtksh builtins don't have optget option parsing, so
  skip the unrecognized options test for those (this of
  course only has relevance when running dtksh against the
  regression tests).

src/cmd/ksh93/tests/pty.sh:
- If the vi editor couldn't be found on the $PATH, skip the
  regression test that involves it.
2021-03-14 21:32:04 +00:00

36 lines
1.6 KiB
Text

########################################################################
# #
# This file is part of the ksh 93u+m package #
# Copyright (c) 1982-2012 AT&T Intellectual Property #
# Copyright (c) 2021 Contributors to ksh 93u+m #
# <https://github.com/ksh93/ksh> #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# #
# A copy of the License is available at #
# http://www.eclipse.org/org/documents/epl-v10.html #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Martijn Dekker <martijn@inlv.org> #
# #
########################################################################
_message()
{
print -r $'\t'"${Command}[$1]: ${@:2}" >&2
}
function err_exit
{
_message "$@"
let Errors+=1
}
alias err_exit='err_exit $LINENO' # inaccurate err_exit name kept for historical integrity :)
alias warning='_message "$LINENO" "warning:"'
Command=${0##*/}
integer Errors=0
if ! [[ -d $tmp && -w $tmp && $tmp == "$PWD" ]]
then print -r "$Command: \$tmp not set; run this from shtests. Aborting." >&2
exit 1
fi