1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 06:20:55 +01:00
Commit graph

883 commits

Author SHA1 Message Date
Peter Stephenson
408b92b168 41008: Handle expansions for precommand modifiers 2017-04-26 09:44:38 +01:00
Peter Stephenson
68466f327e 40995: Don't disable alias expansion when finding command substitution limits
This is needed in some unusual cases in order to identify the exit
condition without encountering a parse error.
2017-04-23 17:06:26 +01:00
Peter Stephenson
f6ab9a281d 40932: Parameter subscripts need to count parentheses.
Otherwise they can terminate in the middle of an expression.
2017-04-03 10:04:03 +01:00
Sebastian Gniazdowski
5aec3f9742 40909: Stress test for parameter substitution 2017-03-30 12:16:24 +01:00
Peter Stephenson
e78ec8610d 40891: fix more zero-length matches.
This time at the end of the trial string.
2017-03-23 21:01:59 +00:00
Peter Stephenson
086656241c 22601: Fix for parameter substitution pattern matches.
It was not possible to math against a zero-length string in
some cases.
2017-03-23 09:35:20 +00:00
Peter Stephenson
27a55d8591 Improve comment at top of GDBM test 2017-03-21 09:57:00 +00:00
Daniel Shahaf
d044530afd 40816: Document interaction of 'print -P' and 'print -f'. 2017-03-12 19:37:18 +00:00
Jun-ichi Takimoto
2ff71e84ba 40820: add a few tests of strftime, related to 40681 2017-03-12 21:04:22 +09:00
Peter Stephenson
018992123e 40803, 40804, 40805, 40806: Parameter test additions.
Potentially dodgy string for ${(z)...} splitting from Sebastian.

Check that $- and ${-} produce plausible results.
2017-03-09 12:18:54 +00:00
Sebastian Gniazdowski
6f25cbae04 40706: Fix ordering dependence in gdbm test 2017-03-07 10:55:20 +00:00
Peter Stephenson
f3f8537cfa 40760: Always tokenize unquoted - to Dash.
This fixes use of pattern match character ranges in unusual contexts.

Attempt to detect a tokenized - in cases where we don't care.
2017-03-07 10:43:58 +00:00
Sebastian Gniazdowski
8522e996ec 40781: optimize array assignment, similar to 39995 for string assignment 2017-03-04 15:35:19 -08:00
Peter Stephenson
efe5e6a2f0 40173: No error on failure to load zsh/db/gdbm in test.
This is a soft error causing the test to be skipped, with a report
to that effect.
2017-03-03 10:20:16 +00:00
Peter Stephenson
47c05f6b66 40622 with typos fixed: functions -Ms.
This adds the capability for mathematical functions based on shell
functions to have a string argument.  Module functions have had
this for a long time.
2017-03-01 10:01:01 +00:00
Sebastian Gniazdowski
24497ad196 40562: gdbm tests omitted from previous commit 2017-03-01 09:52:46 +00:00
Daniel Shahaf
c7048cd88f Revert 40626 which broke tests. 2017-02-26 06:11:19 +00:00
Daniel Shahaf
6c476c2211 40626: Make $options re-settable.
Follow-up to 40508.

Reported-by: James McGlashan
2017-02-25 08:05:11 +00:00
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