coreutils
[Top][All Lists]
Advanced

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

Re: cut -DF


From: Rob Landley
Subject: Re: cut -DF
Date: Wed, 5 Jan 2022 14:37:18 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 1/5/22 2:19 PM, Assaf Gordon wrote:
>> This is working and in use in Android, and now in busybox, and it would 
>> simplify
>> my regression test suite if coreutils was in sync, so I thought I'd ask if 
>> you
>> were interested.
>> 
> 
> I personally like the idea (at the very list "-D" will indeed replace
> awk for many simple use-cases).
> 
> I'm working on a proof-of-concept (will share later today for feedback 
> and comments).

Feel free to use any of the new lines in that busybox patch, it was my code and
you can relicense it as you like. And the toybox implementation at
https://github.com/landley/toybox/blob/master/toys/posix/cut.c is 0BSD so as
always, loot freely.

> Do you mind sharing your test suite?

The relevant file is:
https://github.com/landley/toybox/blob/master/tests/cut.test

What I did to test busybox was "PATH=/busybox:$PATH TEST_HOST=1 make test_cut"
with the attached patch applied to switch a longopt busybox didn't implement to
the short option it did, and to yank the "toybox only" annotations on the two -D
tests.

(Wanting to clean that patch out of my working tree was what reminded me to poke
you guys about it, if I remove the "toyonly" without coreutils support I stop
being able to regression check my test suite against devuan's host tools...)

Busybox took the larger of the two towards the end of:
https://git.busybox.net/busybox/tree/testsuite/cut.tests#n68

Don't see anything relevant in the broken-out ones:
https://git.busybox.net/busybox/tree/testsuite/cut

Thanks,

Rob

Attachment: cut-test-busybox.patch
Description: Text Data


reply via email to

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