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
Martijn Dekker 1fbbeaa19d Convert default typeset aliases to regular builtins
This converts the 'autoload', 'compound', 'float', 'functions',
'integer' and 'nameref' default aliases into regular built-in
commands, so that 'unalias -a' does not remove them. Shell
functions can now use these names, which improves compatibility
with POSIX shell scripts.

src/cmd/ksh93/data/aliases.c:
- Remove default typeset aliases.

src/cmd/ksh93/data/builtins.c,
src/cmd/ksh93/include/builtins.h:
- Add corresponding built-in command declarations. Typeset-style
  commands are now defined by a pointer range, SYSTYPESET ..
  SYSTYPESET_END. A couple need their own IDs (SYSCOMPOUND,
  SYSNAMEREF) for special-casing in sh/xec.c.
- Update 'typeset --man'.

src/cmd/ksh93/bltins/typeset.c: b_typeset():
- Recognise the new builtin commands by argv[0]. Implement them by
  inserting the corresponding 'typeset' options into the argument
  list before parsing options. This may seem like a bit of a hack,
  but it is simpler, shorter, more future-proof and less
  error-prone than manually copying and adapting all the complex
  flaggery from the option parsing loop.

src/cmd/ksh93/sh/parse.c,
src/cmd/ksh93/sh/xec.c:
- Recognise typeset-style commands by SYSTYPESET .. SYSTYPESET_END
  pointer range.
- Special-case 'compound' (SYSCOMPOUND) and 'nameref' (SYSNAMEREF)
  along with recognising the corresponding 'typeset' options.

src/cmd/ksh93/sh.1:
- Update to document the new built-ins.
- Since not all declaration commands are special built-ins now,
  identify declaration commands using a double-dagger "\(dd"
  character (which renders as '=' in ASCII) and disassociate their
  definition from that of special built-ins.

src/cmd/ksh93/tests/variables.sh:
- Adapt a regression test as there is no more 'integer' alias.
2020-07-15 20:54:06 +01:00
..
alias.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
append.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
arith.sh Fix a syntax error when ((...)) is combined with redirections (#68) 2020-07-09 22:12:04 +01:00
arrays.sh Fix crash when listing indexed arrays with 'typeset -a' 2020-07-09 16:42:16 +01:00
arrays2.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
attributes.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
basic.sh tests/basic.sh: fix tests to work with xtrace (re: c5820aab) 2020-07-15 05:02:29 +01:00
bracket.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
builtins.sh Millisecond precision for 'times' builtin (re: 65d363fd, 5c677a4c) 2020-07-15 04:22:45 +01:00
case.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
comvar.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
comvario.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
coprocess.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
cubetype.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
enum.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
exit.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
expand.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
functions.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
glob.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
grep.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
heredoc.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
io.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
leaks.sh tests/leaks.sh: workaround minor variation when run with shcomp 2020-07-10 23:01:22 +01:00
locale.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
math.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
nameref.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
namespace.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
options.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
path.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
pointtype.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
pty.sh Restore 'set -b'/'set -o notify' functionality (#74) 2020-07-14 22:00:28 +01:00
quoting.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
quoting2.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
readcsv.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
recttype.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
restricted.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
return.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
select.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
shtests tests/shtests: rm debug command that snuck through (re: d7afb57c) 2020-07-04 17:40:07 +02:00
sigchld.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
signal.sh Fix 'kill -INFO' on systems that support SIGINFO (#59) 2020-07-04 15:57:47 +01:00
statics.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
subshell.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
substring.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
tilde.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
timetype.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
treemove.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
types.sh Fix type names starting with lowercase 'a' (#69) 2020-07-10 17:54:51 +01:00
variables.sh Convert default typeset aliases to regular builtins 2020-07-15 20:54:06 +01:00
vartree1.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00
vartree2.sh shtests: use central temporary directory; add --keep option 2020-07-04 01:28:08 +02:00