summaryrefslogtreecommitdiff
path: root/Test/A01grammar.ztst
AgeCommit message (Collapse)AuthorFilesLines
2024-09-1453088: enable `time' on builtins, assignments, and current-shell actionsBart Schaefer1-7/+0
2023-03-2951608: Don't execute commands after "continue &&"Peter Stephenson1-0/+36
Also ! continue ||
2022-12-1251134: ! return doesn't change the return statusPeter Stephenson1-0/+12
2022-03-0349792: Non-interative shell input is line buffered.Peter Stephenson1-0/+9
2021-11-2647599 (tweaked): New test for '{foo,bar}' in command positionDaniel Shahaf1-0/+8
It's currently treated as a list but should perhaps be a brace expansion.
2021-11-12github #82: Fix typosDimitris Apostolou1-1/+1
2021-09-0949353: Fix comments in sourced file.Peter Stephenson1-0/+9
If the file was sourced from an interactive shell with INTERACTIVE_COMMENTS not set, comments were not parsed. Note there is a remaining edge case where the sourced file is in fact entered at the comment line.
2021-05-0648787: Fix command status after failed ifPeter Stephenson1-0/+5
If "if" had a hard error in the condition, and there was no else clause, the command status was incorrectly cleared to zero. Add test.
2020-03-2645616: Remove token from count argument to repeatPeter Stephenson1-0/+7
2020-01-1645304: Do execute the always block even when the try/always block itself is ↵Daniel Shahaf1-1/+1
the last command. Fixes the test added in the previous commit (workers/45305).
2020-01-1645305: Add an XFail test: The exec-last-command optimization is applied to ↵Daniel Shahaf1-0/+4
try/always.
2019-12-2245111: zshmisc(1): Clarify the documentation of 'return' and 'exit' in ↵Daniel Shahaf1-0/+2
conjunction with try/always Having reviewed 20076, 20084, 21734, and 21735, my understanding is that the original intention was: - A 'return' in a function does run always-list - An 'exit' outside a function does not run always-list - A 'return' outside a function is treated as an 'exit' All of which are the case today. The remaining case, of 'exit' used inside a function, was not specified by the referenced -workers@ posts; does, as implemented, run the always-list; and furthermore, based in 21734 it's fair to assume that the original documentation was assuming that 'exit' would be used outside of any function, just like it assumed 'return' would be used inside a function. Therefore, have the documentation specify only the behaviour of 'exit' outside any function, and leave the behaviour of 'exit' inside a function unspecified. Anyone who relied on the documentation of 'exit' as documented until this commit would have run into the documentation/implementation discrepancy described in 45075.
2019-12-21unposted: Group related tests. No functional change.Daniel Shahaf1-8/+8
2019-05-2344345: fix wordcode traversal where ! without a following command could ↵Oliver Kiddle1-0/+33
result in a crash
2019-05-0344271: Fix breaks propagated from until or return.Peter Stephenson1-0/+10
If the until or return test caused continuation but there was a pending return, breaks didn't get cancelled causing enclosing scope to skip commands.
2018-10-2443726: Add tests for semicolon in the middle of a sublist not terminating it.Daniel Shahaf1-0/+10
2017-12-14add millisecond and microsecond options to TIMEFMT variabledana1-0/+4
2017-09-1041662: exec -a arguments weren't sanitisedPeter Stephenson1-0/+6
2017-08-0941504: make empty strings work in case patterns with no leading parenthesisPeter Stephenson1-0/+37
2017-04-2841020: Fix "command -p"; "-p" was incorrectly left in command argumentsPeter Stephenson1-1/+11
Also add tests for known precommand modifier issues.
2017-04-2741016: Test that quoted precommand modifiers now workPeter Stephenson1-0/+6
2017-04-2641008: Handle expansions for precommand modifiersPeter Stephenson1-0/+22
2016-10-1339625: case needs to reset lastval if no pattern matchedMartijn Dekker1-0/+17
2016-10-1039599: Don't reset status before "case" executionPeter Stephenson1-0/+8
2016-10-0339521: Refactor start of execcmd().Peter Stephenson1-9/+6
By splitting into _analyse and _exec execpline2() has easier access to the state at the start of execution. Use this to ensure we fork if this is a builtin with no arguments.
2016-09-3039517: back off 39502 (WC_ASSIGN causes fork in pipe).Peter Stephenson1-6/+9
This isn't a robust fix as WC_ASSIGNs simply precede the main wordcode.
2016-09-2939502: Fork for assignment in LHS of pipeline.Peter Stephenson1-0/+7
foo=bar | stuff left the value of foo set to bar as we didn't realise we needed to fork.
2016-09-2934943: Fixes for "command" with multiple options.Peter Stephenson1-0/+10
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-06-2138734: fix final case clauses terminating with ;&Peter Stephenson1-0/+8
2015-07-2935953: fix handling of command substitution in math contextBarton E. Schaefer1-0/+6
2015-07-1035760: Add ZTST_skip to test systemPeter Stephenson1-0/+13
2015-07-04Turning case parsed as multiple alternatives back into text.Peter Stephenson1-0/+24
Also add test.
2015-05-2135248: treat fully parenthised zsh patterns as complete case patterns againPeter Stephenson1-3/+33
2015-05-1835184: Additional case fix for 35168.Peter Stephenson1-0/+15
Lexical analysis flags got screwed up after a "|", so we didn't parse patterns properly, in particular those with parentheses.
2015-05-1835168: Improve parsing of case patterns.Peter Stephenson1-0/+39
"|" is now found properly by looking for words that come from the lexical analyser, rather than hacking a pattern returned in one dollop. Update some completion functions that need extra quoting as a result. Add test for new parsing. Update version number to 5.0.8-dev-3 because of wordcode incompatibility.
2015-05-13users/20203: nested functions in always blocks when exit pendingPeter Stephenson1-0/+22
2011-04-2229025: Test/A01grammar.ztst: in select test, assert LINES=3 to print listBart Schaefer1-1/+1
2011-02-2128783: allow parentheses to be special in more places with SH_GLOBPeter Stephenson1-0/+12
2010-03-18unposted: fix new test in A01grammar.ztstPeter Stephenson1-1/+1
2010-03-1627793 and follow ups: add PATH_SCRIPT option to find script using $PATHPeter Stephenson1-0/+18
2009-07-1127129: fix status at start of function, command subst, etc.Peter Stephenson1-0/+6
2009-07-1027126: a few more contexts where executing empty lists gives status zeroPeter Stephenson1-0/+22
2009-07-1027106: reset status on command that expands to emptyPeter Stephenson1-0/+4
27122: add POSIX_JOBS option
2009-07-0627092: missing then-clause for if wasn't an errorPeter Stephenson1-1/+6
2009-07-0227087: change return codes from failed "."Peter Stephenson1-2/+2
2009-07-0127083: non-zero status on failures to find or execute file in "."Peter Stephenson1-1/+8
2009-04-2126858: use zsh instead of sh in exec -l testPeter Stephenson1-2/+2
2009-02-2726622: improve comments within $(...) and add testPeter Stephenson1-0/+12
2008-05-11users/12848: return, break, continue in always block override try blockPeter Stephenson1-0/+8
2007-12-12users/12305: option output not well documentedPeter Stephenson1-1/+1
-c and SHIN_STDIN inconsistent with manual