mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix disabling SHOPT_FIXEDARRAY (re: 2182ecfa
)
It was easier than expected to fix this one. The many regression
test failures caused by disabling it were all due to one bug:
'typeset -p' output broke when building without this option.
src/cmd/ksh93/sh/nvtree.c: nv_attribute():
- In this function to print the attributes of a name-value pair,
move four lines of code out of #if SHOPT_FIXEDARRAY...#endif that
were inadvertently moved into the #if block in ksh93 2012-05-18.
See the changes to nvtree.c in this multishell repo commit:
aabab56a
src/cmd/ksh93/data/builtins.c:
- Update/rewrite 'typeset -a' documentation.
- Make it adapt to SHOPT_FIXEDARRAY.
- Fix a few typos.
src/cmd/ksh93/tests/arrays2.sh:
- Only one regression test needs a SHOPT_FIXEDARRAY check.
.github/workflows/ci.yml:
- Disable SHOPT_FIXEDARRAY when regression-testing without SHOPTs.
- Enable xtrace, add ':' commands for traced comments. This should
make the CI runner output logs a little more readable.
This commit is contained in:
parent
2182ecfa08
commit
76ea18dcbd
5 changed files with 29 additions and 11 deletions
|
@ -222,7 +222,7 @@ compound cx
|
|||
typeset -a cx.ar[4][4]
|
||||
print -v cx > /dev/null
|
||||
print -v cx | read -C l 2> /dev/null || err_exit 'read -C fails from output of print -v'
|
||||
[[ ${cx%cx=} == "${l%l=}" ]] || err_exit 'print -v for compound variable with fixed 2d array not working'
|
||||
((SHOPT_FIXEDARRAY)) && [[ ${cx%cx=} != "${l%l=}" ]] && err_exit 'print -v for compound variable with fixed 2d array not working'
|
||||
|
||||
# ======
|
||||
# Multidimensional arrays with an unset method shouldn't cause a crash.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue