Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2014 01:18:13 +0200
From:      Julio Merino <jmmv@freebsd.org>
To:        Fabian Keil <freebsd-listen@fabiankeil.de>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Subject:   Re: atf_check() equivalent to test individual shell functions?
Message-ID:  <CAFY7cWD1h0XhFZWaFyYC%2Bo_RnQZ24vZ%2BD3-2hcb5GUfveJ5t2w@mail.gmail.com>
In-Reply-To: <CAFY7cWDunqCZGVQdBbi0YZP-wxBa201zeFjgofsBw04WZmAdDw@mail.gmail.com>
References:  <41d8a2fb.75b47028@fabiankeil.de> <CAFY7cWDunqCZGVQdBbi0YZP-wxBa201zeFjgofsBw04WZmAdDw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 28, 2014 at 2:00 AM, Julio Merino <jmmv@freebsd.org> wrote:
> On Sat, Jul 26, 2014 at 4:30 AM, Fabian Keil
> <freebsd-listen@fabiankeil.de> wrote:
>> What I'm looking for is something like this:
>>
>> | atf_check_shell_function -s return:0 -o empty -e empty zogftw_string_ends_with "abc" "c"
>
> That could be interesting.
>
> However, note that atf_check currently is just a thin wrapper over the
> atf-check binary and that's the reason why you cannot feed shell
> functions into it. Implementing an atf_check_shell_function would
> involve rewriting atf-check's functionality in libatf-sh.subr.

FYI

Take a look at this email I just sent:
https://groups.google.com/forum/#!topic/kyua-discuss/yhcDuchVtrs

The new code I'm prototyping in that repository has atf-check
functionality that can be invoked on shell functions, so it would
solve your problem. (Don't start using that code just yet given that
it's not even merged into the master branch, but please let me know if
you'd be interested in it!)

Cheers



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFY7cWD1h0XhFZWaFyYC%2Bo_RnQZ24vZ%2BD3-2hcb5GUfveJ5t2w>