From a232ab562423eccb9523c190c5e03242320cc3fd Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 30 Oct 2007 14:01:32 +0000 Subject: users/12149: "@" with splitting in double quotes retains empty fields --- Test/D04parameter.ztst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'Test/D04parameter.ztst') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 1910e60be..e8718a691 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -942,3 +942,35 @@ >some >sunny >day + + foo="line:with::missing::fields:in:it" + print -l ${(s.:.)foo} +0:Removal of empty fields in unquoted splitting +>line +>with +>missing +>fields +>in +>it + + foo="line:with::missing::fields:in:it" + print -l "${(s.:.)foo}" +0:Hacky removal of empty fields in quoted splitting with no "@" +>line +>with +>missing +>fields +>in +>it + + foo="line:with::missing::fields:in:it" + print -l "${(@s.:.)foo}" +0:Retention of empty fields in quoted splitting with "@" +>line +>with +> +>missing +> +>fields +>in +>it -- cgit 1.4.1