diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-23 04:46:24 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-08-08 06:11:00 +0000 |
commit | a2a0293d4f1f488e92b11db7b85f28f294384131 (patch) | |
tree | 7e52b217e91a2bd564cc34bd4d054669717d5c11 /Test/A05execution.ztst | |
parent | d4da2c73f0a1767d6562e735ede40251f9f4366b (diff) | |
download | zsh-a2a0293d4f1f488e92b11db7b85f28f294384131.tar.gz zsh-a2a0293d4f1f488e92b11db7b85f28f294384131.tar.xz zsh-a2a0293d4f1f488e92b11db7b85f28f294384131.zip |
47296 (+ unposted additional tests and comments): 'repeat' loops: Let the repeat count use $?.
It's an arithmetic expression.
Diffstat (limited to 'Test/A05execution.ztst')
-rw-r--r-- | Test/A05execution.ztst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst index 20a594b68..c65642988 100644 --- a/Test/A05execution.ztst +++ b/Test/A05execution.ztst @@ -401,3 +401,17 @@ F:anonymous function, and a descriptor leak when backgrounding a pipeline (( exit 130 ) | { sleep 1; echo hello }) 0:exit code 130 isn't mistaken for a signal (unit test for workers/46060) >hello + + (exit 3); repeat "$?" echo x + (exit 3); repeat '?' echo y +0:'repeat' loop can use lastval in the count +>x +>x +>x +>y +>y +>y + + (exit 4); repeat 0 do done +0:'repeat 0' resets lastval + |