Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: documenting/testing framework ?
- X-seq: zsh-users 13784
- From: Marc Chantreux <khatar@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: documenting/testing framework ?
- Date: Fri, 30 Jan 2009 15:36:34 +0100
- In-reply-to: <2d460de70901300504l726a9757sb33246e1aedd824b@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090128080223.GA10155@xxxxxxxxxxxx> <2d460de70901291440u28d28d4fr498555d8cffed023@xxxxxxxxxxxxxx> <20090130074942.GA9835@xxxxxxxxxxxx> <2d460de70901292352w6ac68068ted4ab925b441fe1b@xxxxxxxxxxxxxx> <20090130083401.GB9835@xxxxxxxxxxxx> <2d460de70901300504l726a9757sb33246e1aedd824b@xxxxxxxxxxxxxx>
On Fri, Jan 30, 2009 at 02:04:03PM +0100, Richard Hartmann wrote:
> Well, to test, you either need to write wrapper scripts which set up a
> certain test environment and then call whatever you defined.
> To comment, I suggest
>
> # foo: This function prints foo
> foo() {
> echo foo
> }
searching of ideas ... what about:
^ \s* (function \s+)?
<valid_function_name>
( \s+ <valid_function_name> )*
\(\)
can match a function declaration line. I have to find in zsh source/doc
what's the exact regex for <valid_function_name>.
foo () {
# If i write doc here
# 1) it would be easier to parse
# 2) i can use vim syntax indent folding
#
# embedded tests can be TAP one?
#ok "foo prints foo" [[ `foo` == foo ]]
# after an empty line, it's just a normal comment
}
Regards
Messages sorted by:
Reverse Date,
Date,
Thread,
Author