Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: expanding parameters like echo/print builtins



On Wed, 11 May 2011 18:38:46 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> The c and e flags will have tendencies to output unprintable
> characters, can I write them in the expected test output somehow?

The way to do this is to capture the output via a pipe or $(...) or
whatever and then make that output readable by using ${(q)...} or
something such.  There will be examples somewhere.  This does rely on
the shell getting the reverse conversion right, but we test the features
its relying on elsewhere so in theory we shouldn't get errors cancelling
each other out.  (I'm loath to rely on od, and certainly xxd isn't
standard enough.)

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author