sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion: tests: refactor tests to new init.sh-style shell scripts


From: Jim Meyering
Subject: Re: Suggestion: tests: refactor tests to new init.sh-style shell scripts
Date: Sat, 1 Apr 2017 23:44:05 -0700

On Sat, Apr 1, 2017 at 11:13 PM, Assaf Gordon <address@hidden> wrote:
> Hello,
>
> Attached an initial attempt to refactor the old sed tests and turn
> them into 'new style' shell-script tests.
> While the patch is big, it is very repetitive.
> Basically, every test that had TEST.sed,TEST.inp,TEST.good
> now has an additional TEST.sh which runs sed on the program
> and compares the output against the 'good' (=expected) output.
>
> It'll probably take few iterations to iron out all the issues,
> but this is the general direction.
>
> I also have a version where the sed/inp/good files are merged and embedded
> in the new SH file - this reduces the clutter and the number of files,
> at the expense of a bit more work during tests (e.g. creating the test files).
> Not sure if it's better or not.
>
> Comments welcomed,

Hi Assaf,

I've been (slowly) converting those old-style tests to the perl-based
form we use for some in coreutils. I much prefer to keep the sed
invocation, script, inputs and outputs near one another in the same
file, at least when they are not too large. What do you think?

Attachment: sed-perl-tests.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]