1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-17 15:01:40 +02:00
Commit graph

1101 commits

Author SHA1 Message Date
Daniel Shahaf
6a2a8acf09 48147/0001: tests: Add a unit test for zmathfunc and a regression test for workers/48146 affecting it. 2021-03-07 21:58:12 +00:00
Joshua Krusell
3d6e5b6231 47905: Add leading '-' to zparseopts option parsing errors 2021-02-13 00:54:59 +01:00
Bart Schaefer
465738fc25 47895: Remove trailing spaces from "print -ac" output lines. 2021-02-04 17:52:22 -08:00
Bart Schaefer
b803fbaa14 47865: More tests for globbing in restricted directories 2021-02-04 17:03:46 -08:00
Joshua Krusell
9120d1e841 47899: Improve error message from zparseopts. 2021-02-03 11:33:47 +00:00
Jun-ichi Takimoto
6e20f0e3d1 47849: do not skip tests requiring zpty on Cygwin 2021-01-20 13:49:42 +09:00
Mikael Magnusson
8773f01f2b 47494, 47495: Add -n option to strftime 2020-10-25 23:06:02 +01:00
Mikael Magnusson
ea64d2fd4b 47302: Test for print -v fix 2020-10-25 23:05:28 +01:00
Bart Schaefer
63b6398b70 47364: Enable extendedglob in pattern with ${(*)name/pattern/replacement}
Mikael Magnusson: 47382: Completion for 47364
2020-09-13 16:19:52 -07:00
Stephane Chazelas
24a82b9dad 47352 (+ extra test cases): fix %<n>K prompt expansion
Fixed a regression introduced by workers/30496 (5.0.3) whereby %2K would
no longer be the equivalent of %K{2} (%K{green}) in prompt expansion.

That was one missing case where the is_fg flag was not passed along to
match_colour() after code factorisation.

Add tests for the different syntax variants, using echoti
as a reference.
2020-09-10 07:34:56 +01:00
Daniel Shahaf
06265d2b83 47314: is-at-least false positive (5.8.0.2 / 5.8)
Actual behaviour:

    % is-at-least 5.8.0.2 5.8 && echo yes || echo no
    yes
    % is-at-least 5.8.0.2 5.8.0.0 && echo yes || echo no
    no

Expected behaviour: Both commands should have printed "no".
2020-08-16 14:24:29 +00:00
Daniel Shahaf
a2a0293d4f 47296 (+ unposted additional tests and comments): 'repeat' loops: Let the repeat count use $?.
It's an arithmetic expression.
2020-08-08 06:11:00 +00:00
Daniel Shahaf
b5f24592ad 46183: New XFail test: external command with =(...) on LHS of pipeline cleans up its tempfiles. 2020-07-12 15:57:49 +00:00
Daniel Shahaf
03407c2928 46204: Fix new test case for the theoretical case of having more than 100 files in the root directory. 2020-07-12 11:37:16 +00:00
Cedric Ware
4d7aa71d8e 46152: zsh/system: Re-allow '0' timeout in zsystem flock 2020-07-11 00:14:58 -05:00
Jun-ichi Takimoto
c04a391877 46215: make the test for RM_STAR_SILENT work on wider systems 2020-07-09 19:06:07 +09:00
Bart Schaefer
126a3158d5 46189: Ignore exit status of final zpty_flush in comptesteval 2020-07-07 09:36:11 -07:00
Daniel Shahaf
cf134c15a0 46175/0003: Fix the RM_STAR_SILENT bug from the parent commit. 2020-07-05 11:11:59 +00:00
Daniel Shahaf
b58141c4cf 46175/0002: Add a regression test for 46169: the RM_STAR_SILENT logic processes the current directory rather than the root directory.
The bug will be fixed in the next commit.
2020-07-05 11:11:59 +00:00
Daniel Shahaf
d1b4e60ff5 46175/0001: Add a unit test for the RM_STAR_SILENT option. 2020-07-05 11:11:59 +00:00
Daniel Shahaf
805b946b53 46174/0002: test harness: Restore indentation after the previous commit. No functional change. 2020-07-05 11:11:22 +00:00
Daniel Shahaf
63fde0b744 46174/0001: test harness: Plug a symlink attack
The test harness created tempfiles with a predictable names and sourced
them without verifying they had been created by itself.  This opened
anyone who ran the test suite to a symlink attacks from other local
users on the build machine.

Fix this by creating the file whilst NO_CLOBBER and ERR_EXIT are both in
scope, to ensure that we'll abort unless the file really was created as
expected.

Put the existing rm(1) call in a try/always block to help it be unlinked
on test failures, thus reducing the chances of the NO_CLOBBER check
triggering on tempfiles created by earlier test suite runs.

I had first tried to fix this by using the
.
    () { ... } =(:)
.
idiom, but couldn't get that to work: it broke the %prep code of X03
with ZTST_verbose unset (its default value) but not with ZTST_verbose=3.
(I tried to set the latter to debug zpty_flush.)

While there, add a needed-in-principle-but-noop-in-this-specific-case (q).

Indentation will be restored in the next commit.
2020-07-05 11:11:22 +00:00
Matthew Martin
4e471c3f89 46168: Update $PWD and call chpwd hook after normalizing path 2020-07-03 21:17:58 -05:00
Peter Stephenson
4e0058afc5 users/24971: ${(-)var} sorts on signed integers 2020-07-03 21:05:46 +01:00
Daniel Shahaf
0cffb0a6b3 46072 + 46136: Add the 'zle $widget -f nolast' syntax, to improve add-zle-hook-widget support for multiple hook functions.
See workers/46004 for the use-case.
2020-06-27 03:09:31 +00:00
Peter Stephenson
7865486994 46100: Fix =subst before =(subst)
This occurs with SH file expansion ordering.

Add test.
2020-06-26 17:32:02 +01:00
oxiedi
c4540e154f 45895: ignore deduplication patterns in _sequence 2020-06-26 00:34:33 +02:00
Daniel Shahaf
dd6e702ee4 46068 (tweaked) (was: github #57): region_highlight: Add memo= support.
This is useful when multiple plugins add region_highlight entries and
subsequently want to remove only their own entries.  Without this
functionality, recognizing one's region_highlight entries is not trivial
because the 'start' and 'end' offsets are modified by editing of $BUFFER
and the highlight specification may not be unique or distinctive.

The tweaks are as follows:

- Change zfree() to zsfree() per workers/46070.

- Remove the mem.c hunk, as it changed the signature of only one out of
  two alternative definitions of zsfree().  (The definition that hunk
  touched is the one that's not used by default.)
2020-06-25 11:50:33 +00:00
Daniel Shahaf
304ce85a2a 46102: test harness: Make the XPass message distinct from the Fail message.
The new output is:

    ./Test/B02typeset.ztst: starting.
    Test ./Test/B02typeset.ztst was expected to fail, but passed.
    Was testing: this is the description that's after the colon on in the ztst file
    ./Test/B02typeset.ztst: test XPassed.
    **************************************
    0 successful test scripts, 1 failure, 0 skipped
    **************************************
    make[1]: *** [Makefile:190: check] Error 1
    make: *** [Makefile:263: check] Error 2

The new function is deliberately very similar to ZTST_testfailed() just
above it.
2020-06-25 10:24:11 +00:00
Peter Stephenson
af1c009c3e 46079: Ignore double quotes in math expressions.
Treat as white space.

This is required for compatibility and previously had no use in zsh
as it generated an error.
2020-06-23 12:17:32 +01:00
Daniel Shahaf
6be112fe74 46067: Add a unit test for workers/46060. 2020-06-18 10:34:11 +00:00
Peter Stephenson
3df604a4be 46026: Add CLOBBER_EMPTY option. 2020-06-09 18:07:01 +01:00
Peter Stephenson
40723b3991 45900: Fix issues with escaped newline in $-substitution. 2020-05-23 18:01:26 +01:00
Daniel Shahaf
c7da34dd71 45862: Add test cases for 45843#1 and 45843#2, adapted from Aaron Esau and pws. 2020-05-20 00:48:41 +00:00
Mikael Magnusson
06c0a39895 unposted: Add tests for previous commit 2020-05-12 15:58:41 +02:00
Daniel Shahaf
ab835f0c37 45764: Add a regression test for 45772. Test by Roman 2020-05-05 21:15:54 +00:00
Daniel Shahaf
deca7c9285 45730: _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
Also, write/extend docstrings for sepjoin() and zjoin().
2020-05-03 01:27:36 +00:00
Daniel Shahaf
34d69acbef 45737 (+ docs, and update the test from 45722): zstyle: When determining the weight (specificity) of a pattern, consider the number of components before anything else, as documented. 2020-05-02 01:12:07 +00:00
Daniel Shahaf
95adde8ddc unposted: Revert unintentional move from 45722. 2020-05-02 00:55:52 +00:00
Daniel Shahaf
5d9f7975a9 45722: docs: Change zstyle example to a non-hierarchical one 2020-05-02 00:51:26 +00:00
Cedric Ware
25c9b61a66 45708: zsh/system: Enable sub-second timeout in zsystem flock 2020-04-20 12:10:01 -05:00
Mikael Magnusson
8923d2a618 Add SHORT_REPEAT option 2020-04-02 07:42:16 +02:00
Daniel Shahaf
c57d660764 unposted: Make test platform-independent.
Follow-up to the grandparent commit.
2020-04-02 00:10:42 +00:00
dana
2bfe01df6f 45542: P01privileged: Use test-directory owner for auto-determined EUID/EGID
Prevents failure when the repo (or its parent) has mode 0700
2020-04-01 17:05:26 -05:00
dana
9818ddeefb unposted: D02glob: Fix platform-dependent test failure
workers/45583 introduced a test failure on macOS, *BSD, and Solaris, where wc
always outputs leading white space
2020-04-01 16:59:32 -05:00
Daniel Shahaf
5e55e3eaf8 unposted: Fix syntax error introduced in 45591. 2020-03-28 00:56:22 +00:00
Daniel Shahaf
5e3f6b60e8 45640: Fix new test when ${PWD}'s value contains symlinks. 2020-03-28 00:46:51 +00:00
Daniel Shahaf
c4f18c29c7 45584, 45620: zsh/rlimits: Skip the tests for this module when it wasn't compiled in. 2020-03-27 01:14:42 +00:00
Daniel Shahaf
32c4ed3977 45591 (Cf. 45587, 45620): In the test suite, centralize testing that compiled modules can be loaded successfully.
Have V01zmodload.ztst check that all modules enabled in config.modules
load successfully.  With this change, the test files for individual
modules may assume that if 'zmodload' fails that must be because the
module hadn't been compiled in, and mark themselves as skipped in that
case.
2020-03-27 01:14:42 +00:00
Peter Stephenson
2a9674862e 45616: Remove token from count argument to repeat 2020-03-26 20:54:37 +00:00