[#600] A `File' is not a `IO'????? — clemens.hintze@...

17 messages 1999/08/10
[#602] Re: A `File' is not a `IO'????? — matz@... (Yukihiro Matsumoto) 1999/08/10

Hi,

[#679] Documentation about RD? — Clemens Hintze <c.hintze@...>

Hi,

78 messages 1999/08/17
[#680] Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

=begin

[#683] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, Toshiro Kuwabara wrote:

[#686] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#687] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, GOTO Kentaro wrote:

[#693] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#695] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/18

On 19 Aug, Toshiro Kuwabara wrote:

[#697] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#703] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Toshiro Kuwabara wrote:

[#706] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#681] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#682] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#684] Re: Summary of discussion about RD (Re: Documentation about RD?) — TAKAHASHI Masayoshi <maki@...> 1999/08/18

Hi Tosh and all,

[#685] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#689] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#694] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/18

Hi,

[#700] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#702] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/19

Hi,

[#704] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Yukihiro Matsumoto wrote:

[#719] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#720] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 20 Aug, Toshiro Kuwabara wrote:

[#721] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#722] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 21 Aug, Toshiro Kuwabara wrote:

[#723] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#737] RD with multi charset — Minero Aoki <aamine@...>

Hi, I'm Minero Aoki. This is my first mail in this mailling list.

26 messages 1999/08/22

[ruby-talk:00655] Your wish is fulfilled (erhm, almost ;-)

From: Clemens Hintze <c.hintze@...>
Date: 1999-08-12 17:41:18 UTC
List: ruby-talk #655
Hi Gotoken,

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:

To build a report template, you can use strings and insert some special
substitution modifier. These are currently...

	%C   -- Category number
	%L   -- Locality (Set by `ok' if test not OK; (caller[0]))
	%S   -- Section number or "0" if no section used yet.
	%T   -- Test number
	%W   -- `What' text, defined by last `section' or `check' cmd

	The following substitutions are valid between `start_tests' and
	`end_tests'. They will be reset by the latter.
	
	%NT  -- Amount of all tests executed.
	%NC  -- Amount of all categories used so far.
	%NF  -- Amount of all failed tests.

	The last two substitutions should support you to define more
	complex or complicated text.

	%{<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'.


	ntests==1, nfails==0
	==>  "Tests finished (totally 1 test)"

	ntests==1, nfails==1 	
	==>  "Tests finished (totally 2 tests; 1 test failed)"

	ntests==1, nfails==2
	==>  "Tests finished (totally 2 tests; 2 tests failed)"

	ntests==2, nfails==0 
	==>  "Tests finished (totally 2 tests)"

	ntests==2, nfails==1
	==>  "Tests finished (totally 1 tests; 1 test failed)"

	ntests==2, nfails==2
	==>  "Tests finished (totally 1 tests; 2 tests failed)"

Would that be sufficient for you?

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")
	h={}; h["foo"] ||= "bar";
	ok(h["foo"] == "bar")
	
	check "condition"

	$x = '0';

	$x == $x && ok(true)
	$x != $x && ok(false)

	section 2,"Complex tests"

	:

	end_tests
	:

What do you think?

I will doing some documentation for `rd2html' before I release the new
version.

LONG LIVE RUBY!

\cle

In This Thread

Prev Next