cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH 8/8] tests/test22: expand a backtick command

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Mon, 10 Nov 2014 14:04:20 +0100

On Monday 10 November 2014 09:26:57 Daniel Stenberg wrote:
> On Thu, 6 Nov 2014, Peter Wu wrote:
>
> > This is the only user of the backtick operator in the command. As the
> > commands will soon not be executed by a shell anymore (but by perl), replace
> > the command with its output.
>
> Basically the same comment/question as for part 7: what do you want to do here
> and why? I think expanding a test case almost 10K with repeated letters makes
> it significantly harder to read and use so I think it is an unfortunate change
> that requires motivation.

See patch 7, I want to get rid of the shell requirement for invoking commands.
If repeated output is a concern, then I propose to add pre-processing
functionality to the tests, to be enabled only when an attribute is present on
the tag.

If you are concerned about the readability, consider that the current test
already contains a very long line in the expected output section... If you would
like to be able to read the test, you can do this:

    sed 's/aaaaaa*/aaaaa...aaa/' test22

This patch was the easiest way to prepare for the future patch, I am open for
alternative approaches though.

-- 
Kind regards,
Peter
https://lekensteyn.nl
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-10