Barton E. Schaefer
79005f1b79
use "diff -a" in case special characters were written to the test output
2017-02-20 13:26:50 -08:00
Barton E. Schaefer
574933e5a0
40565 (tweaked): test cases for assigning array to scalar with various combinations of SHWORDSPLIT and IFS
2017-02-20 13:26:49 -08:00
Daniel Shahaf
e9267adb49
40508: Make $functions re-settable.
2017-02-08 05:06:49 +00:00
Daniel Shahaf
ad1b46578e
40460: WARN_NESTED_VAR: Don't warn when assigning to a slice of an existing array
2017-02-01 01:49:45 +00:00
Jun-ichi Takimoto
0e25f1cb4d
40470: make the test work also with ASCII collation
...
a few OSs (macOS and some versions of BSDs) use ASCII collation even if
UTF-8 locale is in use
2017-02-01 10:42:45 +09:00
Peter Stephenson
ed855baf48
40465: update methods to output $PWD in tests.
...
Use method from B01cd.tst which resolves symbolic links and
matches against parameter in output.
2017-01-30 10:31:11 +00:00
Peter Stephenson
34f70c5dc0
40440: Add $functions_source hash to zsh/parameter.
...
This allows you to find out where a function was loaded from.
2017-01-28 19:33:27 +00:00
Peter Stephenson
1633b2800d
40423: WARN_NESTED_VARS, conversion the other way
2017-01-26 20:07:51 +00:00
Peter Stephenson
80e47a9a5d
40422: More WARN_NESTED_VAR cases.
...
Converting type when using a calling scope was broken in the
original patch.
2017-01-26 19:58:17 +00:00
Peter Stephenson
b3637caa90
40413: WARN_NESTED_VAR subscripted variable fix.
...
No warning needed on paramter that's created temporarily to
help assignment.
2017-01-25 09:35:30 +00:00
Mikael Magnusson
0e33ebc651
posted: Make D07 recognize more spellings of pl_PL.UTF-8
...
FreeBSD and probably others use this spelling in locale -a output, while
glibc uses the utf8 spelling.
2017-01-24 16:22:39 +01:00
Peter Stephenson
c861b17bbf
40391: Add WARN_NESTED_VAR option and functions -W.
...
These are companions to WARN_CREATED_GLOBAL, warning when a variable
from an enclosing scope is altered.
2017-01-23 09:50:57 +00:00
Peter Stephenson
d219f00609
43080: a few more tests for autoload with absolute path
2017-01-18 09:59:42 +00:00
Peter Stephenson
178e62dbfe
40342: Add directory name cache for autoload file paths.
...
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
2017-01-12 20:56:20 +00:00
Peter Stephenson
33799ae2b0
40335: More care with autoload function path.
...
If doing "autoload -X", the path present might actually be location
of file containing the function with the autoload -X. Add
an explicit flag to say it's a directory for autoload.
2017-01-12 13:54:29 +00:00
Oliver Kiddle
b6082cd1e2
40321: _arguments option groups
2017-01-11 20:50:02 +01:00
Peter Stephenson
f26d1ba6b0
Add features associated with autoloading a function using an absolute
...
path.
-d defaults to normal fpath
-r remembers the path without actually loading. May be combined with -d.
-R does the same but it's an error if not found
-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
2017-01-11 11:26:13 +00:00
Peter Stephenson
bb218704d2
40306 with doc tweaks: Change behaviour expanding alias in () function definition.
...
Now an error unless the () is part of the same error as the name.
Add ALIAS_FUNC_DEF option to allow it again.
2017-01-10 19:14:26 +00:00
Oliver Kiddle
c2b7c5abbe
40269: handle option exclusion within current word for clumped options
...
This replaces the change made in 13999 with an alternative approach.
2017-01-05 13:31:13 +01:00
Oliver Kiddle
8be732cbcc
40227: handle _arguments sets and rest arguments starting with a dash
...
This is a new approach to the problem first covered by 39611: checking
to see if an option-like argument belongs to one of the other sets.
2017-01-04 14:50:56 +01:00
Oliver Kiddle
a69b19d215
40226: tidy up some of the _arguments set code
...
Remove old code for applying explicit exclusions between sets which
fixes some odd behaviour. Some struct members were unused. Also added
some comments and test cases.
2017-01-04 14:42:39 +01:00
Oliver Kiddle
02eb1595e8
40162: _arguments support for a match spec in combination with sets
2016-12-22 16:12:42 +01:00
Daniel Shahaf
6bdb2e1deb
40203: Resolve 'printf --' question from grandparent commit (thanks Chet).
2016-12-16 00:59:57 +00:00
Barton E. Schaefer
c3e43541c0
40198: output of B02typeset differs when (( UID == 0 )) so do not attempt to redo that test in that case
2016-12-15 11:22:22 -08:00
Barton E. Schaefer
dc1f3aae60
40179: fix handling of "printf -" and "printf --"
...
unposted: regression test for 40179 / 37467
2016-12-14 11:01:09 -08:00
Daniel Shahaf
74b7c6b7d6
40139: tests: Convert comments to diagnostics; test backslashes. (after 40129)
2016-12-10 17:16:37 +00:00
Peter Stephenson
063391f0d9
unposted: minor D07 typos
2016-12-09 10:31:47 +00:00
Peter Stephenson
2e307108a0
40138: Move regex multibyte test.
...
Put it last as it has an additional dependency.
Output a failure message indicating this.
2016-12-09 10:18:24 +00:00
Oliver Kiddle
8c4e1b6832
40129: revert 39611, add code comments and test cases for _arguments
2016-12-09 00:00:30 +01:00
Barton E. Schaefer
88d12b809a
40110: attempt to fix test failures on Solaris
...
B02typeset: ignore strerror text in test output, it differs by OS
C02cond: discard stderr when looking for a path to the "mount" command
2016-12-06 21:32:14 -08:00
Peter Stephenson
98e297931a
40102: Use subdirectory for test I/O files
2016-12-05 16:52:22 +00:00
Peter Stephenson
9649ef5888
40100: ERR_EXIT and ERR_RETURN test for anonymous functions.
...
Should trigger on non-zero status at end of function even if
behaviour is suppressed by code inside the function at the point
the status is set.
2016-12-05 13:49:45 +00:00
Peter Stephenson
0e4aa6f2f6
Additional case for ERR_RETURN and ERR_EXIT.
...
Don't trigger just because status is non-zero at end of
current shell group.
2016-12-05 12:29:23 +00:00
Peter Stephenson
c03228f9ed
Extra case for ERR_RETURN and ERR_EXIT.
...
Don't trigger just because status is non-zero at end of
complex shell construct as this may be a case we've already
suppressed.
2016-12-05 11:21:01 +00:00
Peter Stephenson
af2ab02472
40088: atttempt to make interactive param test more robust
2016-12-04 19:19:59 +00:00
Barton E. Schaefer
ffed0695c2
unposted: regression test for 40071
2016-12-03 15:02:17 -08:00
Daniel Shahaf
334ed65e27
40068: Abort execution when setuid/setgid fail.
...
The incumbent code would print an error message and continue execution
with the previous uid/gid values, not even setting lastval:
% UID=42 id -u; echo $?
zsh: failed to change user ID: operation not permitted
1000
0
%
2016-12-03 10:00:08 +00:00
Daniel Shahaf
a81f280bfa
40010: builtins: Say 'bad option: +x', not 'bad option: -x', when +x was passed.
2016-11-28 07:16:38 +00:00
Daniel Shahaf
eccb7471b5
39757 plus test: Fix completion under parenthetical directory names, broken in 39412
2016-11-27 15:12:00 +00:00
Oliver Kiddle
07509be51a
unposted: add test case for partial completion matching of options with arguments
2016-11-23 11:57:02 +01:00
Oliver Kiddle
ee1222454e
unposted: fix printf -v to an array without format string reuse
2016-11-23 11:52:12 +01:00
Oliver Kiddle
85ba685813
39993: Tests for 39981.
2016-11-21 05:40:09 +00:00
Oliver Kiddle
cb5f100bd3
39986, 39989: improve handling of vi-repeat-change
...
Save previous vi change and throw away a new change that fails.
Add zle -f vichange to allow shell widget to be a single change.
Fix repeat of command where numeric arguments were multiplied.
2016-11-20 23:59:48 +01:00
Peter Stephenson
368884a3aa
39995 (from 39977): Optimise string parameter assignment.
...
If setter is the standard one and string length is unchnaged we can
copy into place.
2016-11-20 19:41:52 +00:00
Daniel Shahaf
c392e6c620
39915: whence: Honor PATH_DIRS option for arguments that start with './' or '../'.
...
While here, add some docstrings.
2016-11-17 15:28:42 +00:00
Oliver Kiddle
48bdcd7713
39959: when repeating vi changes advance through the numbered killring registers
...
Also fix numeric arguments with vi-repeat-change: and argument passed
to the repeat replaces that previously saved with the change.
2016-11-17 12:28:08 +01:00
Oliver Kiddle
7d2f805008
39945: allow further tab presses to move on to menu completion even when compstate[insert] is emptied
2016-11-16 09:42:49 +01:00
Peter Stephenson
921b39ac6b
39949: Special case for "-" in directory names.
...
It can be sh-tokenized to Dash to allow for appearing in ranges
after substitution, so needs to be turned back to "-" in that case.
2016-11-15 18:01:32 +00:00
Peter Stephenson
e9dbfa8046
39947: Additional test for array subscripts.
...
This checks out-of-range multiple subscripts with and without
the (@) flag.
2016-11-15 16:01:32 +00:00
Peter Stephenson
5f1700755f
39901: No EXIT trap on LHS of pipeline.
...
There is a special case if the LHS is a shell construct.
Add unit tests for both cases.
2016-11-10 10:37:27 +00:00