1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 15:04:13 +00:00
cde/src/cmd/ksh93/tests
Johnothan King 5461f11968
Fix handling of '--posix' and '--default' (#265)
src/cmd/ksh93/sh/args.c: sh_argopts():
- Remove special-casing for --posix (see also data/builtins.c) and
  move the case -5: to the case ':' instead, so this option is
  handled like all other long options. This change fixes two bugs:
  1. 'set --posix' had no effect on the letoctal or braceexpand
     options. Reproducer:
       $ set --posix
       $ [[ -o braceexpand ]]; echo $?
       0
       $ [[ -o letoctal ]]; echo $?
       1
  2. 'ksh --posix' could not run scripts correctly because it
     wrongly enabled '-c'. Reproducer:
       $ ksh --posix < <(echo 'exit 0')
       ksh: -c requires argument
       Usage: ksh [--posix] [arg ...]
       Help: ksh [ --help | --man ] 2>&1
- Don't allow 'set --default' to unset the restricted option.

src/cmd/ksh93/tests/options.sh:
- Add regression tests for the bugs described above, using -o posix
  and --posix.

src/cmd/ksh93/tests/restricted.sh:
- Add a regression test for 'set --default' in rksh.

Co-authored-by: Martijn Dekker <martijn@inlv.org>
2021-04-09 23:26:07 +01:00
..
_common Fix a few regression test failures (#222) 2021-03-14 21:32:04 +00:00
alias.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
append.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
arith.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
arrays.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
arrays2.sh tests/array2.sh: fix broken tests 2021-03-30 15:38:29 +01:00
attributes.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
basic.sh tests/basic.sh: fix embarrassing typo (re: 4a846a9d) 2021-04-09 04:06:54 +01:00
bracket.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
builtins.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
case.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
comvar.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
comvario.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
coprocess.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
cubetype.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
enum.sh Backport bugfixes for arrays of 'enum' types from ksh 93v- beta 2021-04-06 06:33:32 +01:00
exit.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
expand.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
functions.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
glob.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
grep.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
heredoc.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
io.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
jobs.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
leaks.sh Properly fix $LINENO crash on ARM (re: 23b7a163) and other bugs 2021-04-08 00:56:09 +01:00
locale.sh Fix 'printf %T' ignoring the current locale in LC_TIME (#263) 2021-04-09 03:49:48 +01:00
math.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
nameref.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
namespace.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
options.sh Fix handling of '--posix' and '--default' (#265) 2021-04-09 23:26:07 +01:00
path.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
pointtype.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
pty.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
quoting.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
quoting2.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
readcsv.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
readonly.sh Make readonly variables exportable again (re: 264ba48b) 2021-04-08 06:40:25 +01:00
recttype.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
restricted.sh Fix handling of '--posix' and '--default' (#265) 2021-04-09 23:26:07 +01:00
return.sh Save $? when discipline triggered without command (#226) 2021-03-16 16:13:13 +00:00
select.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
shtests shtests: make aliases work again for shcomp tests (re: aed5c6d7) 2021-03-23 03:49:32 +00:00
sigchld.sh Fix more compiler warnings, typos and other minor issues (#260) 2021-04-08 19:58:07 +01:00
signal.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
statics.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
subshell.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
substring.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
tilde.sh Allow proper tilde expansion overrides (#225) 2021-03-17 21:07:14 +00:00
timetype.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
treemove.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
types.sh Fix various minor problems and update the documentation (#237) 2021-03-21 14:39:03 +00:00
variables.sh Add LC_TIME to the supported locale variables (#257) 2021-04-08 13:06:22 +01:00
vartree1.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00
vartree2.sh ...and now make it work with shcomp (re: aed5c6d7) 2021-03-13 19:27:15 +00:00