<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 27, 2022 at 2:47 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 7/27/22 11:05, enh wrote:<br>
> trying to take the fix for killall, but it looks like diff is broken?<br>
<br>
Sigh, "make tests" doesn't run the diff.tests because it's in pending and the<br>
test hasn't got +x on it...<br>
<br>
> -- diff<br>
> /system/bin/sh: /data/local/tmp/toybox-tests/runtest.sh[231]: syntax error:<br>
> unexpected operator/operand '=~'<br>
<br>
Ah, bash introduced =~ long enough ago for the 7 year rule, but right: you<br>
aren't using #!/bin/bash in your test setup.<br>
<br>
> PASS: diff unknown argument<br>
> PASS: diff missing<br>
> PASS: diff - -<br>
> PASS: diff simple<br>
> PASS: diff -r<br>
> PASS: diff --strip-trailing-cr off<br>
> PASS: diff --strip-trailing-cr on<br>
> PASS: diff line format<br>
> FAIL: diff line format empty<br>
> echo -ne '' | "/system/bin/diff" --unchanged-line-format= --old-line-format=D%l<br>
> --new-line-format=A%l aa bb<br>
> --- expected 2022-07-27 15:42:10.739996975 +0000<br>
> +++ actual 2022-07-27 15:42:10.763996975 +0000<br>
> @@ -1 +1,2 @@<br>
> -D2A3<br>
> \ No newline at end of file<br>
> +--old-line-format=D12<br>
> +A3<br>
> \ No newline at end of file<br>
<br>
Heh, interesting. This works:<br>
<br>
$ ./diff <(echo -e '1\n2') <(echo -e '1\n3') --unchanged-line-format=U%l<br>
--old-line-format=D%l --new-line-format=A%l<br>
U1D2A3<br>
<br>
But actually making the "aa" and "bb" files and sticking them at the end does<br>
not? Hmmm... (Gimme a couple hours for dinner, I'll try to fix it this evening.)<br></blockquote><div><br></div><div>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.)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>