[#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:00642] Re: ANN: testsupp.rb 0.1

From: Clemens Hintze <c.hintze@...>
Date: 1999-08-12 07:22:43 UTC
List: ruby-talk #642
On 12 Aug, GOTO Kentaro wrote:
> Hi,
> 
> In message "[ruby-talk:00638] Re: ANN: testsupp.rb 0.1"
>     on 99/08/12, Clemens Hintze <c.hintze@gmx.net> writes:

[...]
 
> Sorry for shortage of my words :-(
> I intendet hierarchical test like as
> 
>   test_section("File processing") do
>     test_section("open and close") do
>       ok f = Foo.open("foo.txt")
>       ok f.close
>     end
> 
>     test_section("translation") do
>       Foo.open("foo.txt"){
> 	ok f.translate(Foo:Japanese, Foo:English)
> 	ok f.translate(Foo:English)
>       }
>     end
>   end
> 
>   test_section("Inline processing") do
>     ...
>   end
> 
> Of course, now TestSupp does not support such deep leveled nest. But,
> I want categorization by block at least. I feel that start_test makes
> blurred the range of each test block.

Hmmm. Normally you would only use one `start_tests' and one
`end_tests'. It is a little bit confuse in my example, I agree. So
intention is, to write:

	start_tests

	check "open and close"
	
	ok f = Foo.open("foo.txt")
	ok f.close	

	check "translation"
	
	Foo.open("foo.txt"){
	    ok f.translate(Foo:Japanese, Foo:English)
	    ok f.translate(Foo:English)
	}

	end_tests

That would output (hopefully ;-):

	1. open and close
		1.1 ... ok
		1.2 ... ok

	2. translation
		2.1 ... ok
		2.2 ... ok

	tests finished (totally 4 tests in 2 categories)

My two main concerns against your proposal is:
	1. It is pretty by using blocks, ok! But I could not easily
	   reuse results from one block in another one. I would have to
	   initialize variables, that should hold such results for later
	   usage, before I enter a test block. That breaks the beauty of
	   your concept, I think.

	2. If you have many tests and/or code that prepare them, I think
	   the `do ... end' construct will be very large. You would have
	   to take sorrow for properly indentation to not loose
	   overview, IMHO. Futhermore you have to look, whether your
	   test descriptions are correct closed with corresponding
	   `end's.

But the hierarchical idea is good! Would you think, that implementing a
`section' command would be enough for you? You could write then:

	start_tests

	section 1, "File processing"

	check "open and close"
	
	ok f = Foo.open("foo.txt")
	ok f.close	

	check "translation"
	
	Foo.open("foo.txt"){
	    ok f.translate(Foo:Japanese, Foo:English)
	    ok f.translate(Foo:English)
	}

	section 1, "whatever..."

	check "don't know"

	ok true
	
	end_tests

The syntax would be: `section <level>, <title>'. So you could have your
groupings, but no additional structuring. The output would be:

	1. File processing

	1.1 open and close
		1.1.1 ... ok
		1.1.2 ... ok

	1.2 translation
		1.2.1 ... ok
		1.2.2 ... ok

	2. whatever...

	2.1 don't know
		2.1.1 ... ok

	tests finished (totally 5 tests in 3 categories)

What do you think? BTW: I could enable `section' to produce some
intermediate output too; means close the previous section with a short
report. 

> 
>>> 2. quiet option for all method
>>
>>What dou you mean with it? What would a `quiet' option do? Suppress the
>>whole output?
> 
> Yes. Usually I need only error report. 

Nullo problemo :-)

> 
>>> 3. customizable output format
>>

[...]
 
> Well, a proposal is
>   %C  for @catnum
>   %T  for @testnum
>   %N  for @ntests
>   %W  for @what
> 
> Then use irb/main.rb:prompt() technic. How do you think?

Hmm again :-/ A main problem remains with your template idea. The words
within the template, would not be easily adaptable regarding the
grammar! Please have a look to the short output:

	test finished (totally 1 test)!
	tests finished (totally 2 tests in 1 category)
	tests finished (totally 2 tests in 2 categories)

As you can see, the words `test' and `category' are changed concerning
the grammar numerus. That is very difficult to handle via template.

If I, however, could call anoter method (Proc?) with that parameters,
it would very easy, as the called report method would have to handle
that! ;-)))))

[...]

> 
> By the way, would you try RD? CGI.rb (in contrib/) is a example for RD
> documentation. And rd2html is generate html file from .rb file. 

I will have a look! Thanks for the pointer. :-)

> 
> -- gotoken

\cle

In This Thread

Prev Next