[#539] A new discussion topic ;-) — Clemens Hintze <c.hintze@...>
Hi all,
[#546] Question concerning modules (1) — clemens.hintze@...
[#548] Bug: concerning Modules! — clemens.hintze@...
[#564] Ruby 1.3.7 — Yukihiro Matsumoto <matz@...>
Ruby 1.3.7 is out, check out:
[#567] New feature request! :-) — clemens.hintze@...
On 6 Aug, Yukihiro Matsumoto wrote:
Hi,
On 6 Aug, Yukihiro Matsumoto wrote:
[#590] Bug in Array#clone! — clemens.hintze@...
Hi,
Hi,
[#600] A `File' is not a `IO'????? — clemens.hintze@...
Hi,
On 10 Aug, Yukihiro Matsumoto wrote:
Hi,
Hi,
Hi,
On 11 Aug, GOTO Kentaro wrote:
Hi,
On 11 Aug, Yukihiro Matsumoto wrote:
Hi,
[#607] How to pass by `new' method of superclass? — clemens.hintze@...
[#626] Next misbehavior (sorry :-) — clemens.hintze@...
Hi,
[#634] ANN: testsupp.rb 0.1 — Clemens Hintze <c.hintze@...>
Hi,
[#637] Backtrace of SIGSEGV — Clemens Hintze <c.hintze@...>
Hi,
Hi,
On 12 Aug, Yukihiro Matsumoto wrote:
Hi,
On 12 Aug, Yukihiro Matsumoto wrote:
Hi,
[#655] Your wish is fulfilled (erhm, almost ;-) — Clemens Hintze <c.hintze@...>
Hi Gotoken,
[#667] How do I use `callcc' — Clemens Hintze <c.hintze@...>
Hi,
[#668] Way to intercept method calls? — Clemens Hintze <c.hintze@...>
Hi,
[#679] Documentation about RD? — Clemens Hintze <c.hintze@...>
Hi,
=begin
On 18 Aug, Toshiro Kuwabara wrote:
Hi,
On 18 Aug, GOTO Kentaro wrote:
Hi,
On 19 Aug, Toshiro Kuwabara wrote:
Hi,
On 19 Aug, Toshiro Kuwabara wrote:
Hi,
Hi,
On 19 Aug, Toshiro Kuwabara wrote:
Hi
Hi,
Hi,
Hi Tosh and all,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
Hi,
On 19 Aug, Yukihiro Matsumoto wrote:
Hi,
On 20 Aug, Toshiro Kuwabara wrote:
Hi,
On 21 Aug, Toshiro Kuwabara wrote:
Hi,
On 21 Aug, Toshiro Kuwabara wrote:
Hi,
Hi,
Hi,
On 24 Aug, Toshiro Kuwabara wrote:
Hi,
I thought people might be interested in this. Here's how I am plugging
On 31 Aug, Jonathan Aseltine wrote:
[#737] RD with multi charset — Minero Aoki <aamine@...>
Hi, I'm Minero Aoki. This is my first mail in this mailling list.
Hi,
Hi,
Hi,
Hi,
On 28 Aug, Minero Aoki wrote:
Hi,
[ruby-talk:00642] Re: ANN: testsupp.rb 0.1
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