[Toybox] [PATCH] Add find tests.
Rob Landley
rob at landley.net
Mon Sep 14 23:55:07 PDT 2015
On 09/14/2015 12:28 PM, enh wrote:
> On Sat, Sep 12, 2015 at 5:07 PM, Daniel K. Levy <alliedenvy at gmail.com> wrote:
>> On Sat, 2015-09-12 at 16:22 -0700, enh wrote:
>>> add tests?
>>
>> Sure :)
>>
>> diff --git a/tests/find.test b/tests/find.test
>> index cbbce5f..9d69653 100755
>> --- a/tests/find.test
>> +++ b/tests/find.test
>> @@ -39,4 +39,18 @@ testing "find -type f -a -print" \
>> testing "find -print -o -print" \
>> "find dir -type f -a \( -print -o -print \)" "dir/file\n" "" ""
>>
>> +# Testing previous failures
>> +
>> +testing "find -type f -user -exec" \
>> + "find dir -type f -user $USER -exec ls {} \\;" "dir/file\n" "" ""
>> +testing "find -type l -newer -exec" \
>> + "find dir -type l -newer dir/file -exec ls {} \\;" "dir/link\n" "" ""
>> +testing "find unterminated -exec {}" \
>> + "find dir -type f -exec ls {}" "" "" ""
>> +
>> +# Still fails
>> +
>> +testing "find -exec {} +" \
>> + "find dir -type f -exec ls {} +" "dir/file\n" "" ""
>> +
>> rm -rf dir
>
> rob: it looks like the tests you committed
> (https://github.com/landley/toybox/commit/edae0b07db841e3bf8449d591971f04c9957ecbc)
> are commented out?
>
Yes, because those aren't calls to the testing function, those are just
the command lines I did, which by themselves aren't very interesting
because they need known filesystem state to operate on.
It's a todo item. :)
Rob
1442300107.0
More information about the Toybox
mailing list