[Toybox] diff not passing tests?
Rob Landley
rob at landley.net
Thu Jul 28 12:02:20 PDT 2022
On 7/27/22 18:32, enh wrote:
> Heh, interesting. This works:
>
> $ ./diff <(echo -e '1\n2') <(echo -e '1\n3') --unchanged-line-format=U%l
> --old-line-format=D%l --new-line-format=A%l
> U1D2A3
>
> But actually making the "aa" and "bb" files and sticking them at the end does
> not? Hmmm... (Gimme a couple hours for dinner, I'll try to fix it this evening.)
>
>
> yeah, no hurry --- i've reverted us back to before the update, so no-one's
> annoyed that their tests are failing. (we've also added one of the affected
> tests to toybox's presubmit so we won't be able to submit a killall that broken
> again, whether or not we don't come up with a toybox test to cover this specific
> case.)
Hopefully fixed now, and I added a skeleton.test for it (which is where I've
been adding lib/args.c plumbing tests).
(The problem was --longopt= with nothing after it was advancing to eat the next
argument instead of saving "" as its argument. The two modifier bits of ; and
" " means there are four modes of argument parsing, and then each one has a
-short and --long path, so eight codepaths to test and that's BEFORE you get
into --longopt abc vs --longopt=abc having this corner case I just fixed...)
Sigh, possibly I should make skeleton have an & prefix where the first argument
has an imaginary dash because that's the OTHER mode of argument parsing that's
not being tested by skeleton right now. (And I should wire it up to ps so "ps
ax" and friends get parsed properly. It's there in "tar"...)
Rob
More information about the Toybox
mailing list