Peter Stephenson
bb2bbcc944
39517: back off 39502 (WC_ASSIGN causes fork in pipe).
...
This isn't a robust fix as WC_ASSIGNs simply precede the main wordcode.
2016-09-30 11:34:15 +01:00
Peter Stephenson
6ce696f352
39502: Fork for assignment in LHS of pipeline.
...
foo=bar | stuff
left the value of foo set to bar as we didn't realise we needed to
fork.
2016-09-29 17:29:58 +01:00
Peter Stephenson
07c8fbe596
34943: Fixes for "command" with multiple options.
...
These need to combine properly, and alos "command -p" with either
-v or -V needs to search for builtins and then using the default
system path.
2016-09-29 11:01:00 +01:00
Oliver Kiddle
fbafc5b509
39332: support ksh's [[ -v varname ]] condition for checking if variables are set
2016-09-16 00:00:28 +02:00
Peter Stephenson
a4b8ee13be
zsh-users/21903: Fix ${...?...} in interactive shell.
...
On failure should abort back to top level, but we reset the error
flag around commands. Add a hard error flag that's only reset at top level.
2016-09-14 10:33:18 +01:00
Peter Stephenson
1993a3cd2a
39292: Distinguish "=" and "==" tests in output.
...
This is both in xtrace output and shell code rebuilt from
internal structures.
2016-09-13 09:42:24 +01:00
Daniel Shahaf
1b6033489b
unposted: Add tests for ${(q)} being aware of the EQUALS option.
2016-09-09 09:36:12 +00:00
Peter Stephenson
198c7bc232
39222: test math functions in modules.
...
Use zsh/system.
2016-09-08 12:15:14 +01:00
Peter Stephenson
8e329ccb0a
39141: Use zsh instead of sh in SHLVL test.
...
This removes ambiguous behaviour of sh which may or may not
increment SHLVL.
2016-08-31 11:31:55 +01:00
Stephane Chazelas
8ce98c75f5
39125: More care needed decrementing SHLVL on exec.
...
Not needed in subshell.
2016-08-31 10:21:00 +01:00
Barton E. Schaefer
fa48711e31
39115: repair forced joining when (@) and (j) are used together
2016-08-29 08:34:03 -07:00
Daniel Shahaf
7154052ebe
39046 + 39061: New :P history modifier.
2016-08-22 03:34:30 +00:00
Barton E. Schaefer
a1a58dde6a
39035: ${(A)name=word} should expand as an array even when there is only one element.
2016-08-12 16:10:26 -07:00
Barton E. Schaefer
68e14c41f2
39028: more join/split cases fixed and tested.
2016-08-12 00:55:32 -07:00
Barton E. Schaefer
4234fccef6
39019 (cf. PWS 39013): add test cases for more join/split combinations
...
Accidentally omitted from previous commit.
2016-08-11 10:08:16 -07:00
Daniel Shahaf
f026a4dc12
38991: Make 'whence -v autoloaded-function' shows the defining filename.
...
This may also fix a problem whereby the %x prompt escape evaluated to
a function name rather than a filename, since %x is also backed by
scriptfilename.
2016-08-05 12:37:26 +00:00
Peter Stephenson
72e5fe7aab
38879: Unmetafy file names for glob sort.
...
Test using Polish UTF-8 collation sequence that'w known to
cause the problems.
2016-07-18 16:57:38 +01:00
Daniel Shahaf
8468f24af4
38728: Tests: Add tests for the ':a' and ':A' modifiers.
2016-07-05 04:57:28 +00:00
Daniel Shahaf
14dbc20b02
38652: test harness: Emit unified diffs instead of context diffs
2016-06-25 16:32:27 +00:00
Peter Stephenson
954cdd77d7
38746: Fix suffix alias expansion recursion.
...
This was problematic if the expansion landed you back in
command position.
Delay marking the alias as out of use until the text that
caused the expansion is finished.
2016-06-22 13:10:22 +01:00
Peter Stephenson
016929e043
38734: fix final case clauses terminating with ;&
2016-06-21 16:12:51 +01:00
Daniel Shahaf
7badf262c1
38653 + 38657: 'functions -T' tracing: recurse into anonymous functions.
2016-06-13 08:53:18 +00:00
Peter Stephenson
dcffad8326
38586: Metafication problem with $functions
...
If treated as a complete associative array or scanned (retrieving
individual values was not affected), it incorrectly unmetafied
the value so multibyte characters got confused.
Add test.
2016-06-03 10:28:52 +01:00
Jun T
724021779b
38445: subsequent tests rely on a file touched by the -N test, so it must always be touched
...
(Bart) Minor tweak to SECONDS loop to make total of sleeps be 60 seconds
2016-05-09 20:27:57 -07:00
Barton E. Schaefer
4712b8f4d5
38375 (tweaked per 38384): try harder to detect noatime filesystems.
2016-05-02 17:31:18 -07:00
Barton E. Schaefer
59de766e26
38358: "fgrep --" for noatime check in case a mount point is named "-"
2016-04-29 13:14:10 -07:00
Barton E. Schaefer
222dea055c
Mikael Berthe: 38307: PCRE segfault when parenthesized group matches nothing
...
unposted: regression test for 38307
2016-04-23 14:20:16 -07:00
Peter Stephenson
dc2397f754
users/21352: ensure $'' doesn't get elided.
...
Assign nulstring to it if empty. Test for all forms of quotation
marks.
2016-03-07 09:44:54 +00:00
Peter Stephenson
17fb014dc7
38094: Fix POSIX EXIT traps defined in function.
...
These aren't local, so set the local level to 0; else they can get
overridden incorrectly.
2016-03-07 09:42:21 +00:00
Peter Stephenson
c55d855171
38024: Improve POSIX and native EXIT traps compatibility.
...
Allow a nested function trap to leave save and restore a POSIX
trap.
Still fails if the POSIX trap was defined in a function.
2016-02-25 14:20:26 +00:00
Peter Stephenson
ab74c86edb
37999: Sticky behaviour of EXIT traps.
...
They now have POSIX or non-POSIX behaviour based on the setting
of POSIX_TRAPS where the trap was defined, rather than where the
trap would (or would not) be executed.
Tweaks possible.
2016-02-17 10:40:55 +00:00
Barton E. Schaefer
95663e9365
37914: reparse associative array subscripts in "unset" so keys with "[" or "]" may be backslash-escaped
...
Also fix erroneous test case this revealed.
2016-02-08 20:52:11 -08:00
Daniel Shahaf
1d9c6a746c
37752: More tests for the previous patch.
2016-01-29 09:14:54 +00:00
Daniel Shahaf
bced1beb8c
37700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax.
2016-01-29 09:14:53 +00:00
Peter Stephenson
7c59c953f2
37765: Use FS_FUNC on fucstack to find autoload -X target.
...
This is better than scriptname which can be updated due to e.g.
intervening "eval".
2016-01-25 16:23:16 +00:00
Peter Stephenson
1aec003155
37722: test builtin should return status 2 on syntax error
2016-01-21 16:30:21 +00:00
Peter Stephenson
1c41f98aab
37705: don't turn - to Dash after start of brace parameter
2016-01-20 11:22:09 +00:00
Peter Stephenson
ad16356e19
37689: ! and ^ need to be tokenised in character sets
2016-01-19 17:24:12 +00:00
Peter Stephenson
8eb9070d67
37678: Now possible to quote "-" in pattern range
2016-01-19 09:55:46 +00:00
Peter Stephenson
d0cd9032d8
37646: bit missed out of previous readonly commit.
...
I mean, the commit about readonly. Commits aren't readonly, this is git.
2016-01-19 09:49:40 +00:00
Daniel Shahaf
a8a00be442
37591: 'alias -L': skip with a warning aliases with '=' in their LHS
2016-01-13 01:25:46 +00:00
Barton E. Schaefer
5eae5b58b1
Jun T.: 37515: multibyte handling as per 35448.
2016-01-08 20:42:00 -08:00
Jun T
ead199291f
37501 (+ revise test): correct byte counts when simulating memstream via temp file
2016-01-04 22:29:37 -08:00
Peter Stephenson
524f802610
37489, tweaked: with POSIX_IDENTIFIERS create math var as scalar
2016-01-03 18:57:10 +00:00
Barton E. Schaefer
03adf52414
37493: readonly + POSIX_BUILTINS == typeset -gr
2016-01-02 12:40:31 -08:00
Barton E. Schaefer
15b73ea99b
37467: add "print -v var" / "printf -v var"
2015-12-31 12:38:10 -08:00
Oliver Kiddle
4f5d7b7b37
37453 (with Bart, started by Baptiste Daroussin, 37315): try to improve detection of noatime filesystem
2015-12-31 12:53:13 +01:00
Barton E. Schaefer
b475a85304
37460: make sure the default keymap is emacs before using that keymap to test bindings
2015-12-30 17:22:37 -08:00
Daniel Shahaf
9d2fe86564
37257 (in part): Add array assignment tests.
2015-12-19 09:53:05 +00:00
Peter Stephenson
fd13e8044c
37411: more bindkey tests
2015-12-16 12:10:01 +00:00
Peter Stephenson
0bd903abca
37405: Fix self-insert binding for multibyte sequences.
...
This makes it work even if the self-insert applies to a sequence longer
than an initial byte, including the case of a complete binding to a full
character sequence.
2015-12-15 12:41:20 +00:00
Peter Stephenson
a5233fd01e
37378: New bindkey tests.
...
Also fix Meta bug on pattern match in zpty -r.
2015-12-10 17:51:41 +00:00
Peter Stephenson
67877f6055
37364: "test" and "[" handling of parentheses.
...
If three arguments, need to prefer binary operators if possible.
Need to look for full string for parentheses.
2015-12-09 16:40:08 +00:00
Peter Stephenson
7f5b2f5709
37348: Tests and fix for ${(q+)...}.
...
Needs dupstring() for empty string case.
2015-12-08 15:08:24 +00:00
Peter Stephenson
f5b8efa7e0
37344: restore old printable quoting, add ${(q+)...}.
...
The \C- form is only used inside quotedzputs().
${(q+)...} outputs a quotedzputs() representation.
2015-12-07 21:49:07 +00:00
Peter Stephenson
d290874c48
37335: fix tests after 34314
2015-12-07 10:36:45 +00:00
Peter Stephenson
16684952fb
37305: typeset -p can now output arrays on one line
2015-12-04 15:39:53 +00:00
Peter Stephenson
dc8c39efff
37303: test WARN_CREATE_GLOBAL negative cases.
2015-12-04 11:24:21 +00:00
Daniel Shahaf
324a82b360
unposted (after 37243): Explain the breadcrumb by adding a comment.
2015-11-28 17:48:26 +00:00
Barton E. Schaefer
026cb6a812
37243: too many problems with inserting a line into B02, instead add a placeholder and substitute for it.
...
unposted: %cleanup block is not called when %prep sets ZTST_unimplemented,
so avoid leaving a mess
2015-11-27 11:20:33 -08:00
Barton E. Schaefer
3d962aacd5
37229: non-local assignment to a parameter name whose outermost declaration is private, is an error rather than a silent no-op.
...
Also fix %prep sed expression for Solaris.
2015-11-26 12:43:08 -08:00
Barton E. Schaefer
211889c982
Comment should say export is equivalent to typeset -xg
2015-11-26 11:15:51 -08:00
Barton E. Schaefer
2bab9f0394
37225: fix test for typeset with zsh/param/private
2015-11-26 09:30:05 -08:00
Barton E. Schaefer
e4aec8c197
37224: delete obsolete comment
2015-11-26 09:28:59 -08:00
Barton E. Schaefer
e73b73e0b0
37208: re-run the "typeset" tests with the private module loaded
2015-11-23 21:45:24 -08:00
Barton E. Schaefer
4e87006fc7
37205: update documentary comment
2015-11-23 11:27:22 -08:00
Peter Stephenson
544144debe
37188: New hash builtin test
2015-11-22 16:53:57 +00:00
Barton E. Schaefer
b1688305cc
37181: consistent use of zmodload and corresponding ZTST_unimplemented or ZTST_skip
2015-11-21 23:56:25 -08:00
Peter Stephenson
72a67716ac
20974: Bug with scalar assignment to special array in typeset
2015-11-20 11:18:16 +00:00
Peter Stephenson
ca0cb17011
37128: work around alias expansion trashing subscript parsing
2015-11-17 17:44:12 +00:00
Peter Stephenson
d814071b14
37096: Another $${(P)...} tweak.
...
Make a top level (P) work with nested ones, i.e. ${(P)${(P)...}...}
2015-11-12 14:28:15 +00:00
Peter Stephenson
7a951ef93e
37094: Further tweaks to parameter name references.
...
Safety in array test.
Make nested references work.
Add parameter tests.
2015-11-11 22:14:16 +00:00
Peter Stephenson
5ed0cb8bc5
37084: add implementation check to zsh/parm/private test
2015-11-10 09:32:04 +00:00
Barton E. Schaefer
d3d5325d27
37081: new module zsh/param/private for private-scoped parameters in functions
2015-11-08 16:19:37 -08:00
Peter Stephenson
e8d6041f69
37074: extend previous fix to over whitespace at end
2015-11-07 18:05:43 +00:00
Peter Stephenson
0fcc6c8fb2
37073: another SH_WORD_SPLIT problem.
...
In cases like x${:- y} the space was simply removed instead of
being used for splitting.
2015-11-06 17:28:02 +00:00
Daniel Shahaf
51d50218fb
unposted (after 37018): Fix typo in error message.
2015-10-30 15:03:12 +00:00
Peter Stephenson
de9effbce6
37018: Make WARNCREATEGLOBAL more consistent.
...
Wd don't need separate math handling any more, and can make it
output the function name in all cases.
2015-10-29 17:06:27 +00:00
Peter Stephenson
b498bd7ce5
36982: Fix bug with (#cN) patterns and remove redundant description.
...
We need to restore the current count of matches when returning to
match at the point where we previously matched.
2015-10-27 11:54:19 +00:00
Barton E. Schaefer
cb26e11c70
unposted: back out 36707, add test case for 36766
2015-10-03 22:11:09 -07:00
Daniel Shahaf
a5cb918d40
unposted: Test for 36669
2015-09-28 18:13:52 +00:00
Daniel Shahaf
2654cb43f6
36651: WARN_CREATE_GLOBAL += math expressions
...
Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn
about $x and $i, respectively, being created global.
2015-09-27 23:52:25 +00:00
Peter Stephenson
cc44b10da1
unposted: fix typo in test
2015-09-19 20:22:19 +01:00
Barton E. Schaefer
18130bed7f
36552 plus test: fix Nularg string in quotestring(QT_DOLLARS)
2015-09-17 21:44:14 -07:00
Jun-ichi Takimoto
8b1676e3b7
36491: Multibyte support for parameter expansion flags B,E,N
2015-09-12 20:35:56 +09:00
Peter Stephenson
e86b3cce47
36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests.
2015-09-10 20:05:48 +01:00
Peter Stephenson
ca9fdda408
36460: Discard benign error when no one is reading from pipe
2015-09-10 09:20:38 +01:00
Peter Stephenson
f52795ea3e
36415: remap bytes from invalid multibyte characters.
...
These now go to 0xdc00 + index. If wchar_t is a Unicode code point,
this is by construction an invalid character within the Unicode range.
If it isn't, we would hope the result was no worse than the current
fudge.
2015-09-04 10:07:51 +01:00
Daniel Shahaf
1ba2fac03d
36403: type -w += suffix alias
...
This makes 'type -w' distinguish suffix aliases from regular aliases,
like bare 'type' already does.
Use-case: detecting programmatically whether the command word is indeed
a valid command word (see <https://github.com/zsh-users/zsh-syntax-highlighting/issues/126 >)
2015-09-03 09:17:39 +00:00
Barton E. Schaefer
9f5dffa1f3
36393: process queued signals during dotrap()
2015-09-02 19:11:54 -07:00
Peter Stephenson
0e63286bd4
36399: Shell code text with multiple here documents wasn't shown properly.
2015-09-02 14:20:44 +01:00
Mikael Magnusson
8e3ca08f13
36347: Fix appending empty array to associations
2015-09-01 23:20:05 +02:00
Peter Stephenson
946e5d89a9
users/20466 plus comment: change test for skipping strftime extensions.
...
This test is known to fail on Solaris, but seems to work in other
common implementations. Hence there seems no point in having the
release fall over on this test. Needs further investigation later.
2015-08-28 09:42:31 +01:00
Barton E. Schaefer
51f5898dc0
cf. Axel Beckert 36292: discard even more extraneous stderr in "hang" test
2015-08-27 09:21:18 -07:00
Barton E. Schaefer
caaed169e5
36282: discard stderr of "hang" test
2015-08-26 21:38:55 -07:00
Peter Stephenson
e5d5a76dce
Test for 36265, no alias expansion after "function"
2015-08-21 17:12:46 +01:00
Peter Stephenson
61afb8dc8d
36262: Replace fix for missing unmeta in chdir().
...
It was needed in the argument to one of a pair of lchdir()s rather
than within zchdir().
Add tests for the case of a character with 0x83 within it.
2015-08-21 10:04:13 +01:00
Peter Stephenson
8ed6bc0a85
36241: Test for ztrftime fix, 36227 / f8164fb6
.
...
Check that embedded null characters get passed correctly through
the strftime module builtin.
2015-08-19 11:13:31 +01:00
Peter Stephenson
6fa8708bfc
36083: set array value when consistently retying scalar and array
2015-08-10 20:30:09 +01:00
Peter Stephenson
fe924b270c
36045: make effect of failures in wait test clearer
2015-08-10 13:55:25 +01:00