Hi,
In message "[ruby-talk:00655] Your wish is fulfilled (erhm, almost ;-)"
on 99/08/12, Clemens Hintze <c.hintze / gmx.net> writes:
>I suddenly have an enlightment ;-) So I have found a way how you can
>build the reports from templates. I have followed your hint. And here
>it comes:
Wow! I always feel freshness in your ideas :-)
>To build a report template, you can use strings and insert some special
>substitution modifier. These are currently...
>
> %C -- Category number
<...>
> %{<cond>,<text>} -- If <cond> is "0", then <text> will be
> skipped. <cond> may be e.g. `%S'.
> %(<cond>,<text1>,<text2>) -- If <cond> is "1", <text1> will be
> substituted into the template.
> However, if <cond> is not "1",
> <text2> will be substituted.
>
>With that you can build you own reports. BTW: All standard reports are
>build with these templates :-)
>
>Example:
> "Test%(%NT,,s) finished (totally %NT test%(%NT,,s)"+
> "%{%NF,; %NF test%(%NF,,s) failed})"
>
> Would substitute to the following reports depending of the
> current state of `ntests' and `nfails'.
Oh! `%{}' and `%()' is smart. I have no objection.
>Furthermore I have now introduced the `section' command. Now you can
>group you tests like that:
>
> :
> start_tests
>
> section 1,"Ruby tests"
>
> section 2,"Base tests"
>
> check "assignment"
>
> a=[]; a[0] ||= "bar";
> ok(a[0] == "bar")
> :
>What do you think?
Well, my favorite is hierarchy by ruby block because the semantics is
clear and also it can be easily indented. But your proposal is not
bad, I can agree it.
>I will doing some documentation for `rd2html' before I release the new
>version.
I'm happy to hear it :-)
Today, another version of rd2html was posted. Check it out:
ftp://ftp.netlab.co.jp/pub/lang/ruby/in.coming/rdtool-0.1.2.tar.gz
>LONG LIVE RUBY!
ditto!
-- gotoken