Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange function/pipestatus behavior, maybe a scope bug?
On Fri, 25 Oct 2013 00:17:38 +0900
"Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> On Mac OS X, A05execution.ztst fails as
>
> *** 1 ****
> ! 2048 0 0 0
> --- 1 ----
> ! 2048 0 0 0
> Test ./A05execution.ztst failed: output differs from expected as shown above for:
> repeat 2048; do (: | : | while false; do
> break
> done;
> print "${pipestatus[@]}")
> ZTST_hashmark
> done | sort | uniq -c
>
> i.e., number of spaces output by 'uniq -c' before the count is different.
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index c42e454..fd13e91 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -184,8 +184,8 @@
done;
print "${pipestatus[@]}")
ZTST_hashmark
- done | sort | uniq -c
+ done | sort | uniq -c | sed 's/^ *//'
0:Check whether `$pipestatus[]' behaves.
-> 2048 0 0 0
+>2048 0 0 0
F:This test checks for a bug in `$pipestatus[]' handling. If it breaks then
F:the bug is still there or it reappeared. See workers-29973 for details.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author